Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLyMh-0000zR-Ej for pgsql-admin@arkaria.postgresql.org; Mon, 04 Dec 2017 21:33:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLyMg-00062S-VR for pgsql-admin@arkaria.postgresql.org; Mon, 04 Dec 2017 21:33:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eLyMg-00062F-LW for pgsql-admin@lists.postgresql.org; Mon, 04 Dec 2017 21:33:26 +0000 Received: from mimolette.dalibo.net ([212.85.157.144] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eLyMd-0006W5-DU for pgsql-admin@postgresql.org; Mon, 04 Dec 2017 21:33:25 +0000 Received: from [192.168.1.14] (LFbn-LYO-1-593-46.w90-119.abo.wanadoo.fr [90.119.170.46]) by mail.dalibo.com (Postfix) with ESMTPSA id 5BA192C05A7; Mon, 4 Dec 2017 22:33:20 +0100 (CET) Subject: Re: No stats after promoting standby? To: Don Seiler , pgsql-admin References: From: Adrien Nayrat Message-ID: <2c483dd8-e669-2fdb-3551-fb082e15b48c@dalibo.com> Date: Mon, 4 Dec 2017 22:37:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9TFB6f0ekp1rb3oUs1DJVuNifElHVam35" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9TFB6f0ekp1rb3oUs1DJVuNifElHVam35 Content-Type: multipart/mixed; boundary="gwuuIHbILH8aUCxRq8ugPDT5KhOAdX0ln"; protected-headers="v1" From: Adrien Nayrat To: Don Seiler , pgsql-admin Message-ID: <2c483dd8-e669-2fdb-3551-fb082e15b48c@dalibo.com> Subject: Re: No stats after promoting standby? References: In-Reply-To: --gwuuIHbILH8aUCxRq8ugPDT5KhOAdX0ln Content-Type: text/plain; charset=utf-8 Content-Language: fr-classic Content-Transfer-Encoding: quoted-printable On 12/04/2017 08:26 PM, Don Seiler wrote: > Do stats not automatically get preserved when a standby is promoted? Di= d > something go wrong here or should I know/expect to have to manually gat= her 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 prima= ry 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, --=20 Adrien NAYRAT --gwuuIHbILH8aUCxRq8ugPDT5KhOAdX0ln-- --9TFB6f0ekp1rb3oUs1DJVuNifElHVam35 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEm0vCLGPoatLA5LoUsupItzJ4s38FAlolwBcACgkQsupItzJ4 s3/E1Af/XbVeK9shIleElyp59N0RX6m9Xs2C8mrI0iDFPkUl2O2X6o/I6D1GVKR/ lDhmf2mLDAo50DuwMUyQ+VWTWPIaRMNjyR+2M8JuJqhpILtBJ/wIzFepiX51PzW7 9yW8KYQf23LbQQCmXfp36ZTLJDWQGeFV6JN0VNlCYLjL/EcYjQawM+p1OtY0FDmL lJ7nmscmlZSVitxaarOoXUnPjIKKLjmbDzrh99zwnUfjHD19YMWut8ZV5PYz8DZl INVb6ZiYuwGFfeDrOD0PxYWcGYB5rb1CW0sUPvNXIoDs1ss/eVKbFhJ60Ep1ksQe +maf/RZD/6C0aFznkJyTYloMnQdMfw== =736f -----END PGP SIGNATURE----- --9TFB6f0ekp1rb3oUs1DJVuNifElHVam35--