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



> On Feb 15, 2021, at 3:55 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> 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.


Thanks, Tom. A colleague pointed me to a blog post by Michael Vitale that confirms this bug on AWS and contains more detail:
https://elephas.io/685-2/


Hope this helps someone else
Philip




view thread (3+ messages)

Message-ID: <298AB498-BC58-4657-B99F-48EB34C4CDB9@americanefficient.com>
Permalink:  ../298AB498-BC58-4657-B99F-48EB34C4CDB9@americanefficient.com/
Also on:    postgresql.org/message-id/298AB498-BC58-4657-B99F-48EB34C4CDB9@americanefficient.com

 · 

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: philip@americanefficient.com, tgl@sss.pgh.pa.us
  Subject: Re: pg_stat_user_tables.n_mod_since_analyze persistence?
  In-Reply-To: <298AB498-BC58-4657-B99F-48EB34C4CDB9@americanefficient.com>
  References: <F89A47FA-BC9F-480B-AF42-3DC74C26C67C@americanefficient.com> <2274377.1613422510@sss.pgh.pa.us> <298AB498-BC58-4657-B99F-48EB34C4CDB9@americanefficient.com>

* 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