aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2014-11-15 22:49:54 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2014-11-15 22:49:54 +0000
commit0f66d2120154e51960a21062b214d468782d8554 (patch)
tree3e5c002e51883003f28721ef9df5e82d11d7f4b1
parent85b506bbfc2937c9abdfcce4e01a8feca8e64ee8 (diff)
downloadpostgresql-0f66d2120154e51960a21062b214d468782d8554.tar.gz
postgresql-0f66d2120154e51960a21062b214d468782d8554.zip
Emit msg re skipping ANALYZE for absent inh tree
When checking a table that has an inheritance tree marked, if no child tables remain, we skip ANALYZE. This patch emits a message to show that the action has been skipped. Author: Etsuro Fujita Reviewer: Furuya Osamu
-rw-r--r--src/backend/commands/analyze.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 954e5a68b6b..732ab228cc6 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -1483,6 +1483,10 @@ acquire_inherited_sample_rows(Relation onerel, int elevel,
/* CCI because we already updated the pg_class row in this command */
CommandCounterIncrement();
SetRelationHasSubclass(RelationGetRelid(onerel), false);
+ ereport(elevel,
+ (errmsg("skipping analyze of \"%s.%s\" inheritance tree --- this inheritance tree contains no child tables",
+ get_namespace_name(RelationGetNamespace(onerel)),
+ RelationGetRelationName(onerel))));
return 0;
}