diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2023-09-30 17:03:50 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2023-09-30 17:03:50 +0300 |
commit | c181f2e2bcecc2704c6461a0543894a38d7143df (patch) | |
tree | 58156e8e699b3ae2b2c446c44cf33c2a1dfb2987 /src/backend/utils/adt/tsvector.c | |
parent | 1d5caec221d85b8950a1ee3d8bb6fad262549ea6 (diff) | |
download | postgresql-c181f2e2bcecc2704c6461a0543894a38d7143df.tar.gz postgresql-c181f2e2bcecc2704c6461a0543894a38d7143df.zip |
Fix briefly showing old progress stats for ANALYZE on inherited tables.
ANALYZE on a table with inheritance children analyzes all the child
tables in a loop. When stepping to next child table, it updated the
child rel ID value in the command progress stats, but did not reset
the 'sample_blks_total' and 'sample_blks_scanned' counters.
acquire_sample_rows() updates 'sample_blks_total' as soon as the scan
starts and 'sample_blks_scanned' after processing the first block, but
until then, pg_stat_progress_analyze would display a bogus combination
of the new child table relid with old counter values from the
previously processed child table. Fix by resetting 'sample_blks_total'
and 'sample_blks_scanned' to zero at the same time that
'current_child_table_relid' is updated.
Backpatch to v13, where pg_stat_progress_analyze view was introduced.
Reported-by: Justin Pryzby
Discussion: https://www.postgresql.org/message-id/20230122162345.GP13860%40telsasoft.com
Diffstat (limited to 'src/backend/utils/adt/tsvector.c')
0 files changed, 0 insertions, 0 deletions