Skip to content

Commit ae4e688

Browse files
Silence REINDEX
Previously REINDEX DATABASE and REINDEX SCHEMA produced a stream of NOTICE messages. Removing that since it is inconsistent for such a command to produce output without a VERBOSE option.
1 parent 1135aab commit ae4e688

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/backend/commands/indexcmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ ReindexObject(const char *objectName, ReindexObjectType objectKind)
19361936
if (reindex_relation(relid,
19371937
REINDEX_REL_PROCESS_TOAST |
19381938
REINDEX_REL_CHECK_CONSTRAINTS))
1939-
ereport(NOTICE,
1939+
ereport(DEBUG1,
19401940
(errmsg("table \"%s.%s\" was reindexed",
19411941
get_namespace_name(get_rel_namespace(relid)),
19421942
get_rel_name(relid))));

src/test/regress/expected/create_index.out

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2841,8 +2841,6 @@ CREATE TABLE schema_to_reindex.table1(col1 SERIAL PRIMARY KEY);
28412841
CREATE TABLE schema_to_reindex.table2(col1 SERIAL PRIMARY KEY, col2 VARCHAR(100) NOT NULL);
28422842
CREATE INDEX ON schema_to_reindex.table2(col2);
28432843
REINDEX SCHEMA schema_to_reindex;
2844-
NOTICE: table "schema_to_reindex.table1" was reindexed
2845-
NOTICE: table "schema_to_reindex.table2" was reindexed
28462844
BEGIN;
28472845
REINDEX SCHEMA schema_to_reindex; -- failure, cannot run in a transaction
28482846
ERROR: REINDEX SCHEMA cannot run inside a transaction block
@@ -2852,8 +2850,6 @@ CREATE ROLE reindexuser login;
28522850
SET SESSION ROLE user_reindex;
28532851
ERROR: role "user_reindex" does not exist
28542852
REINDEX SCHEMA schema_to_reindex;
2855-
NOTICE: table "schema_to_reindex.table1" was reindexed
2856-
NOTICE: table "schema_to_reindex.table2" was reindexed
28572853
-- Clean up
28582854
RESET ROLE;
28592855
DROP ROLE user_reindex;

0 commit comments

Comments
 (0)