Ensure acquire_inherited_sample_rows sets its output parameters. The totalrows/totaldeadrows outputs were left uninitialized in cases where we find no analyzable child tables of a partitioned table. This could lead to setting the partitioned table's pg_class.reltuples value to garbage. It's not clear that that would have any very bad effects in practice, but fix it anyway because it's making valgrind unhappy.
Reported and diagnosed by Alexander Lakhin (bug #17880). Discussion: https://postgr.es/m/[email protected] Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d0d92fe3d49934042f64539ccf2bb33c5f82158a Modified Files -------------- src/backend/commands/analyze.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
