pgsql: Ensure acquire_inherited_sample_rows sets its output parameters. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Ensure acquire_inherited_sample_rows sets its output parameters.
Date
Msg-id E1piFQw-000f8d-IZ@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6f7ca625b9d3f6298a3e1ecd0187d123c25316a4

Modified Files
--------------
src/backend/commands/analyze.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: pgsql: pg_regress: Emit TAP compliant output
Next
From: Tom Lane
Date:
Subject: pgsql: Reject system columns as elements of foreign keys.