pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrien Nayrat <adrien.nayrat@dalibo.com>
To: Don Seiler <don@seiler.us>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: No stats after promoting standby?
Date: Mon, 4 Dec 2017 22:37:27 +0100
Message-ID: <2c483dd8-e669-2fdb-3551-fb082e15b48c@dalibo.com> (raw)
In-Reply-To: <CAHJZqBB=NPK5MmGk2xuP96yrvCY3U024n=BGkdrKsQe5BHvM9g@mail.gmail.com>
References: <CAHJZqBB=NPK5MmGk2xuP96yrvCY3U024n=BGkdrKsQe5BHvM9g@mail.gmail.com>

On 12/04/2017 08:26 PM, Don Seiler wrote:
> 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)?

Hi,

Stats are deleted after promotion :
" The stats file is deleted at the start of recovery, so stats from primary and
standby will differ; this is considered a feature, not a bug."
https://www.postgresql.org/docs/current/static/hot-standby.html

Or : https://www.postgresql.org/message-id/31781.1508448417%40sss.pgh.pa.us

You have to do an ANALYZE just after promotion.

Regards,


-- 
Adrien NAYRAT

Attachments:

  signature.asc (application/pgp-signature, 487B) download

view thread (8+ messages)  latest in thread

Message-ID: <2c483dd8-e669-2fdb-3551-fb082e15b48c@dalibo.com>
Permalink:  ../2c483dd8-e669-2fdb-3551-fb082e15b48c@dalibo.com/
Also on:    postgresql.org/message-id/2c483dd8-e669-2fdb-3551-fb082e15b48c@dalibo.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: adrien.nayrat@dalibo.com, don@seiler.us
  Subject: Re: No stats after promoting standby?
  In-Reply-To: <2c483dd8-e669-2fdb-3551-fb082e15b48c@dalibo.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