pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Keep stats up to date for partitioned tables
Date: Sat, 28 Aug 2021 20:03:58 +0000
Message-ID: <E1mK4YY-0007v8-SV@gemulon.postgresql.org> (raw)

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 <yuzukohosoya@gmail.com>
Co-authored-by: Justin Pryzby <pryzby@telsasoft.com>
Co-authored-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Reported-by: Justin Pryzby <pryzby@telsasoft.com>
Discussion: https://postgr.es/m/20210816222810.GE10479@telsasoft.com

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e1efc5b465c844969a0ed0d07e1364f3ce424d8c

Modified Files
--------------
src/backend/commands/analyze.c  | 37 +++++++++++++++++++++++++------------
src/backend/postmaster/pgstat.c | 11 ++++++++---
2 files changed, 33 insertions(+), 15 deletions(-)



view thread (2+ messages)

Message-ID: <E1mK4YY-0007v8-SV@gemulon.postgresql.org>
Permalink:  ../E1mK4YY-0007v8-SV@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mK4YY-0007v8-SV@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Keep stats up to date for partitioned tables
  In-Reply-To: <E1mK4YY-0007v8-SV@gemulon.postgresql.org>
  References: <E1mK4YY-0007v8-SV@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox