Keep stats up to date for partitioned tables
authorAlvaro Herrera
Sat, 28 Aug 2021 19:58:23 +0000 (15:58 -0400)
committerAlvaro Herrera
Sat, 28 Aug 2021 19:58:23 +0000 (15:58 -0400)
commit375aed36ad83f0e021e9bdd3a0034c0c992c66dc
tree90d5fa4c65ee034827ad7b3ac87c26214dfffd1f
parent1f092a309eeecd097938bacc201c779574ced3b6
Keep stats up to date for partitioned tables

In the long-going saga for analyze on partitioned tables, one thing I
missed while reverting 0827e8af70f4 is the maintenance of analyze count
and last analyze time for partitioned tables.  This is a mostly trivial
change that enables users assess the need for invoking manual ANALYZE on
partitioned tables.

This patch, posted by Justin and modified a bit by me (Álvaro), can be
mostly traced back to Hosoya-san, though any problems introduced with
the scissors are mine.

Backpatch to 14, in line with 6f8127b73901.

Co-authored-by: Yuzuko Hosoya
Co-authored-by: Justin Pryzby
Co-authored-by: Álvaro Herrera
Reported-by: Justin Pryzby
Discussion: https://postgr.es/m/20210816222810[email protected]
src/backend/commands/analyze.c
src/backend/postmaster/pgstat.c