Skip to content

Commit e51bad8

Browse files
committed
Fix error reporting in reindexdb
When failing to reindex a table or an index, reindexdb would generate an extra error message related to a database failure, which is misleading. Backpatch all the way down, as this has been introduced by 85e9a5a. Discussion: https://postgr.es/m/CAOBaU_Yo61RwNO3cW6WVYWwH7EYMPuexhKqufb2nFGOdunbcHw@mail.gmail.com Author: Julien Rouhaud Reviewed-by: Daniel Gustafsson, Álvaro Herrera, Tom Lane, Michael Paquier Backpatch-through: 9.4
1 parent b721e20 commit e51bad8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/scripts/reindexdb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,10 @@ reindex_one_database(const char *name, const char *dbname, const char *type,
325325
if (strcmp(type, "TABLE") == 0)
326326
pg_log_error("reindexing of table \"%s\" in database \"%s\" failed: %s",
327327
name, PQdb(conn), PQerrorMessage(conn));
328-
if (strcmp(type, "INDEX") == 0)
328+
else if (strcmp(type, "INDEX") == 0)
329329
pg_log_error("reindexing of index \"%s\" in database \"%s\" failed: %s",
330330
name, PQdb(conn), PQerrorMessage(conn));
331-
if (strcmp(type, "SCHEMA") == 0)
331+
else if (strcmp(type, "SCHEMA") == 0)
332332
pg_log_error("reindexing of schema \"%s\" in database \"%s\" failed: %s",
333333
name, PQdb(conn), PQerrorMessage(conn));
334334
else

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy