pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Philip Semanchuk <philip@americanefficient.com>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: pg_stat_user_tables.n_mod_since_analyze persistence?
Date: Mon, 15 Feb 2021 15:55:10 -0500
Message-ID: <2274377.1613422510@sss.pgh.pa.us> (raw)
In-Reply-To: <F89A47FA-BC9F-480B-AF42-3DC74C26C67C@americanefficient.com>
References: <F89A47FA-BC9F-480B-AF42-3DC74C26C67C@americanefficient.com>

Philip Semanchuk <philip@americanefficient.com> writes:
> I saw some unexpected behavior that I'm trying to understand. I suspect it might be a quirk specific to AWS Aurora and I'd like to confirm that.

> When I restart my local Postgres instance (on my Mac), the values in pg_stat_user_tables.n_mod_since_analyze are preserved. In other words, if table foo had n_mod_since_analyze=33 before the reboot, it still has n_mod_since_analyze=33 after the restart. 

> When I restart an AWS Aurora instance, the values in pg_stat_user_tables.n_mod_since_analyze all seem to be reset to 0. 

> Can anyone confirm (or refute) that the behavior I see on my Mac (preservation of these values through a restart) is common & expected behavior?

Yeah, in PG those stats would be preserved, at least as long as it's
a clean shutdown.

			regards, tom lane





view thread (3+ messages)  latest in thread

Message-ID: <2274377.1613422510@sss.pgh.pa.us>
Permalink:  ../2274377.1613422510@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2274377.1613422510@sss.pgh.pa.us

 · 

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-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, philip@americanefficient.com
  Subject: Re: pg_stat_user_tables.n_mod_since_analyze persistence?
  In-Reply-To: <2274377.1613422510@sss.pgh.pa.us>
  References: <F89A47FA-BC9F-480B-AF42-3DC74C26C67C@americanefficient.com> <2274377.1613422510@sss.pgh.pa.us>

* 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