From: | Swati Patil <swatipatiltg(at)gmail(dot)com> |
---|---|
To: | CONVERS Yann - DREAL Auvergne-Rhône-Alpes/CIDDAE/SIG <yann(dot)convers(at)developpement-durable(dot)gouv(dot)fr> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Standby.signal file is not getting deleted after failover in all scanarios |
Date: | 2021-09-07 16:36:10 |
Message-ID: | CAJCVjRRFziwrFub+DMewQkyJ6D2hR+X3b0qt9vrD1PHekRTOaA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi Yann
Thank you for the reply.
We have configured promote_trigger_file at postgres.conf.auto file.
The standby.signal file gets deleted automatically during normal failover
e.g. Deactivate the secondary server, restore data from primary to
secondary server and activate the secondary server.
However, in some scenarios this file is not getting deleted after failover
e.g Deactivate the secondary server, restore the data from primary to
secondary, enable the replication and activate the secondary server.
Thanks,
Swati Yadav.
On Mon, Sep 6, 2021 at 1:56 PM CONVERS Yann - DREAL
Auvergne-Rhône-Alpes/CIDDAE/SIG <yann(dot)convers(at)developpement-durable(dot)gouv(dot)fr>
wrote:
> Hi,
>
> Did user postgres can delete this file ?
>
> Because you have create this file manually to be able to listen to the
> primary server?
>
> But I'm not sure that the way it does
>
> See : https://www.postgresql.org/docs/12/warm-standby-failover.html
>
> PostgreSQL does not provide the system software required to identify a
> failure on the primary and notify the standby database server. Many such
> tools exist and are well integrated with the operating system facilities
> required for successful failover, such as IP address migration.
>
> it depends on how you have done the failover process :
>
>
> using pg_ctl promote or to call pg_promote to fail over?
>
> or
>
> promote_trigger_file?
>
> Many methods are doing job.
>
> I don't see in documentation if the stand.signal must be deleted by the
> process in postgresql v12 or highest, but i remember that the recovery.conf
> on the standby renamed to recovery.done where the standby serveur is
> promote with a trigger_file (you need to write a file on the secondary
> serveur to start failover process and had before a command to use this
> trigger_file
>
> like this :
>
>
> promote_trigger_file ='/home/user/master_on' in the postgresql.conf file
> of the secoundary server.
>
>
> Hope this help you!
>
>
> Yann
>
>
> *Yann Convers*
> Gestionnaire de l'infrastructure, des référentiels et des outils
>
> *DREAL Auvergne-Rhône-Alpes*
>
> Service Connaissance, Information, Développement Durable, Autorité Environnementale - Pole Système d Information Géographique
> Tél : 04 26 28 67 89
> courriel : yann(dot)convers(at)developpement-durable(dot)gouv(dot)fr
>
> adresse de la boite d’unité : boite unité
> <sig(dot)dreal-ara(at)developpement-durable(dot)gouv(dot)fr>
>
> Pour toute commande interne de prestations, merci d utilisez le formulaire
> suivant :
> http://postgis-aura.projets.appli.i2/projects/demandes-de-prestations/issues/new
> *Adresse postale :* DREAL Auvergne-Rhône-Alpes, CIDDAE - SIG 69453 LYON
> CEDEX 06 *Adresse physique :* 5 place Jules Ferry (immeuble Lugdunum -
> métro Brotteaux) - 69006 Lyon *Standard :* 04 26 28 60 00 *Liens :*Site
> Intranet <http://intra.dreal-rhone-alpes.i2/> Site Internet
> <http://www.auvergne-rhone-alpes.developpement-durable.gouv.fr/>
>
> Le 03/09/2021 à 11:39, > swatipatiltg (par Internet, dépôt
> pgsql-admin-owner+m63745-343831(at)lists(dot)postgresql(dot)org) a écrit :
>
> Hi
>
> Could you please help me to clarify why standby.signal is not getting
> deleted after failover in below scenario
>
> Steps:
> 1. Deactivate secondary server
> 2. Restore data from primary or secondary at primary server.
> 3. Enable replication.
> 4. Activate secondary server.
>
> Your reply will be more appreciated.
>
>
> Thanks,
> Swati Yadav.
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Swati Patil | 2021-09-07 16:39:51 | Re: Standby.signal file is not getting deleted after failover in all scanarios |
Previous Message | Frédéric Boulet | 2021-09-07 13:19:11 | Re: PgBackRest PITR restore |