pg_stat_user_tables.n_mod_since_analyze persistence?

From: Philip Semanchuk <philip(at)americanefficient(dot)com>
To: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: pg_stat_user_tables.n_mod_since_analyze persistence?
Date: 2021-02-15 16:57:55
Message-ID: F89A47FA-BC9F-480B-AF42-3DC74C26C67C@americanefficient.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,
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?

Thanks
Philip

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2021-02-15 16:58:34 Re: ADD FOREIGN KEY fails, but the records exist
Previous Message Ron 2021-02-15 16:55:09 Re: ADD FOREIGN KEY fails, but the records exist