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.