]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Ensure acquire_inherited_sample_rows sets its output parameters.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 31 Mar 2023 14:08:40 +0000 (10:08 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 31 Mar 2023 14:08:40 +0000 (10:08 -0400)
commite46a309bd8b257642ebe406188e79cce22db43f7
tree885a8564b594b1567381fd25fbf9ae7552edb4ae
parent07554c99dfdbba7809b73e8028cf8a9f5cbfa36f
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/17880-9282037c923d856e@postgresql.org
src/backend/commands/analyze.c