postgres stats on the new primary

From: Ayub M <hiayub(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: postgres stats on the new primary
Date: 2020-07-28 00:08:36
Message-ID: CAOS0qEuCjfRwD2tYQyVg1kQ8EAZQn7ptNnzBwcS2xT_u5S1yOQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a RDS PostgreSQL v11.6 with primary and standby. On the primary,
vacuum/analyze were running and pg_stat_all_tables's
last_vacuum/analyze/autovacuum/autoanalyze were having values when
vacuum/analyze were run.

1. Switchover to Standby happened, now when I see pg_stat_all_tables (on
the active primary which was standby earlier), the last vacuum/analyze
columns are all nulls. Would primary-standby replication not replicate
system tables? Is this how it behaves?

2. On the new primary, would the table have stats on them? (I do see
pg_stats entries for the tables on new standby), are they reliable or do I
need to gather stats and run vacuum after failover/switchover to standby?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ian Barwick 2020-07-28 01:53:49 Re: postgres stats on the new primary
Previous Message David Rowley 2020-07-28 00:04:30 Re: is JIT available