No stats after promoting standby?

From: Don Seiler <don(at)seiler(dot)us>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: No stats after promoting standby?
Date: 2017-12-04 19:26:14
Message-ID: CAHJZqBB=NPK5MmGk2xuP96yrvCY3U024n=BGkdrKsQe5BHvM9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I created a test standby that was recovering from our prod primary via
restored WAL files. When I broke recovery and opened up that test standby,
I saw that records in pg_stat_all_tables for tables that contain many
millions of rows (and have for years) were saying a few hundred rows, with
last_analyze and last_autoanalyze being null. I know this isn't the case
for pg_stat_all_tables on prod.

Do stats not automatically get preserved when a standby is promoted? Did
something go wrong here or should I know/expect to have to manually gather
DB stats after a failover (like we do with major upgrades)?

This is PG 9.2.22 on CentOS.

Don.

--
Don Seiler
www.seiler.us

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Don Seiler 2017-12-04 21:35:18 Re: No stats after promoting standby?
Previous Message Jerry Sievers 2017-12-01 15:20:23 Re: Upgrading from 9.2 -> 9.6: ERROR with 'could not execute query: ERROR: permission denied for type my_type_name'