Commit 0f66d212 authored by Simon Riggs's avatar Simon Riggs

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
parent 85b506bb
...@@ -1483,6 +1483,10 @@ acquire_inherited_sample_rows(Relation onerel, int elevel, ...@@ -1483,6 +1483,10 @@ acquire_inherited_sample_rows(Relation onerel, int elevel,
/* CCI because we already updated the pg_class row in this command */ /* CCI because we already updated the pg_class row in this command */
CommandCounterIncrement(); CommandCounterIncrement();
SetRelationHasSubclass(RelationGetRelid(onerel), false); 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; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment