Re: Standby.signal file is not getting deleted after failover in all scanarios

Поиск
Список
Период
Сортировка
От Swati Patil
Тема Re: Standby.signal file is not getting deleted after failover in all scanarios
Дата
Msg-id CAJCVjRRFziwrFub+DMewQkyJ6D2hR+X3b0qt9vrD1PHekRTOaA@mail.gmail.com
обсуждение исходный текст
Ответ на Standby.signal file is not getting deleted after failover in all scanarios  (Swati Patil <swatipatiltg@gmail.com>)
Ответы Re: Standby.signal file is not getting deleted after failover in all scanarios  (Swati Patil <swatipatiltg@gmail.com>)
Список 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.convers@developpement-durable.gouv.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.convers@developpement-durable.gouv.fr
adresse de la boite d’unité : boite unité

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  Site Internet

Le 03/09/2021 à 11:39, > swatipatiltg (par Internet, dépôt pgsql-admin-owner+m63745-343831@lists.postgresql.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.

В списке pgsql-admin по дате отправления:

Предыдущее
От: Frédéric Boulet
Дата:
Сообщение: Re: PgBackRest PITR restore
Следующее
От: Swati Patil
Дата:
Сообщение: Re: Standby.signal file is not getting deleted after failover in all scanarios