Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mN9xB-0005ez-Pd for pgsql-admin@arkaria.postgresql.org; Mon, 06 Sep 2021 08:26:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mN9xA-0001K4-Px for pgsql-admin@arkaria.postgresql.org; Mon, 06 Sep 2021 08:26:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mN9xA-0001Ju-Bg for pgsql-admin@lists.postgresql.org; Mon, 06 Sep 2021 08:26:08 +0000 Received: from relternet-01.developpement-durable.gouv.fr ([194.5.170.13]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mN9x6-00016D-9e for pgsql-admin@lists.postgresql.org; Mon, 06 Sep 2021 08:26:07 +0000 X-Virus-Scanned: Scan at equipement.gouv.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=developpement-durable.gouv.fr; s=dkim; t=1630916762; bh=zBkf0u7Dz/SfwEw34lgX+i7LWNMRmsNHyNvw1gt9EFA=; h=Subject:To:References:From:Date:In-Reply-To:From; b=w83pycMOeMoI+hfqDNaN2QUPTRC2VIOV7KhYSbnOp6dnDzo3Rc6KuJLH7rx8pEjjI xUEqQM3HhN4fb54qRxxmckA1a9urL1Ka+vvO5bZmxbTMnUq39lXGS7alGmbCS61UPA MoVX6xZx5pati9WLOoA8gZh+MChHdGtNNGnrzgUQ= X-decod-Pamela: v1.1.2; le 06/09/2021 10:26:02; + mdf=0; rechld=1; entld=1; balm2=1; vider=0; Subject: Re: Standby.signal file is not getting deleted after failover in all scanarios To: pgsql-admin@lists.postgresql.org References: From: =?UTF-8?Q?CONVERS_Yann_=2D_DREAL_Auvergne=2DRh=C3=B4ne=2DAlpes=2FCIDDA?= =?UTF-8?Q?E=2FSIG?= Organization: =?UTF-8?Q?DREAL_Auvergne-Rh=c3=b4ne-Alpes/CIDDAE/SIG?= Message-ID: Date: Mon, 6 Sep 2021 10:26:00 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk

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.