pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_stat_user_tables.n_mod_since_analyze persistence?
3+ messages / 2 participants
[nested] [flat]
* pg_stat_user_tables.n_mod_since_analyze persistence?
@ 2021-02-15 16:57 Philip Semanchuk <philip@americanefficient.com>
2021-02-15 20:55 ` Re: pg_stat_user_tables.n_mod_since_analyze persistence? Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Philip Semanchuk @ 2021-02-15 16:57 UTC (permalink / raw)
To: PostgreSQL General <pgsql-general@lists.postgresql.org>
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pg_stat_user_tables.n_mod_since_analyze persistence?
2021-02-15 16:57 pg_stat_user_tables.n_mod_since_analyze persistence? Philip Semanchuk <philip@americanefficient.com>
@ 2021-02-15 20:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-02-16 18:06 ` Re: pg_stat_user_tables.n_mod_since_analyze persistence? Philip Semanchuk <philip@americanefficient.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2021-02-15 20:55 UTC (permalink / raw)
To: Philip Semanchuk <philip@americanefficient.com>; +Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pg_stat_user_tables.n_mod_since_analyze persistence?
2021-02-15 16:57 pg_stat_user_tables.n_mod_since_analyze persistence? Philip Semanchuk <philip@americanefficient.com>
2021-02-15 20:55 ` Re: pg_stat_user_tables.n_mod_since_analyze persistence? Tom Lane <tgl@sss.pgh.pa.us>
@ 2021-02-16 18:06 ` Philip Semanchuk <philip@americanefficient.com>
0 siblings, 0 replies; 3+ messages in thread
From: Philip Semanchuk @ 2021-02-16 18:06 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
> 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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-02-16 18:06 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15 16:57 pg_stat_user_tables.n_mod_since_analyze persistence? Philip Semanchuk <philip@americanefficient.com>
2021-02-15 20:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-02-16 18:06 ` Philip Semanchuk <philip@americanefficient.com>
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