*** a/src/backend/commands/analyze.c
--- b/src/backend/commands/analyze.c
***************
*** 1478,1483 **** acquire_inherited_sample_rows(Relation onerel, int elevel,
--- 1478,1487 ----
  		/* 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;
  	}
  
