pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: CONVERS Yann - DREAL Auvergne-Rhône-Alpes/CIDDAE/SIG <yann.convers@developpement-durable.gouv.fr>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Standby.signal file is not getting deleted after failover in all scanarios
Date: Mon, 6 Sep 2021 10:26:00 +0200
Message-ID: <efc7062d-d93e-1524-a691-e2f7e8ff71ef@developpement-durable.gouv.fr> (raw)
In-Reply-To: <CAJCVjRSHAkXDo4gJ9WzCVGH3hbEZGwtE=BDK6cO9L-3-on50zw@mail.gmail.com>
References: <CAJCVjRSHAkXDo4gJ9WzCVGH3hbEZGwtE=BDK6cO9L-3-on50zw@mail.gmail.com>

<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi,</p>
    <p>Did user postgres can delete this file ? <br>
    </p>
    <p>Because you have create this file manually to be able to listen
      to the primary server?</p>
    <p>But I'm not sure that the way it does <br>
    </p>
    <p>See :
      <a class="moz-txt-link-freetext" href="https://www.postgresql.org/docs/12/warm-standby-failover.html">https://www.postgresql.org/doc...;
    <p><span class="productname" style="box-sizing: border-box; color:
        rgb(13, 10, 11); font-family: &quot;Open Sans&quot;, sans-serif;
        font-size: 14.4px; font-style: normal; font-variant-ligatures:
        normal; font-variant-caps: normal; font-weight: 400;
        letter-spacing: normal; orphans: 2; text-align: left;
        text-indent: 0px; text-transform: none; white-space: normal;
        widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255); text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;">PostgreSQL</span><span style="color: rgb(13, 10, 11);
        font-family: &quot;Open Sans&quot;, sans-serif; font-size:
        14.4px; font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; font-weight: 400; letter-spacing:
        normal; orphans: 2; text-align: left; text-indent: 0px;
        text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255); text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial; display: inline !important; float: none;"><span> </span>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.</span></p>
    <p><span style="color: rgb(13, 10, 11); font-family: &quot;Open
        Sans&quot;, sans-serif; font-size: 14.4px; font-style: normal;
        font-variant-ligatures: normal; font-variant-caps: normal;
        font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: left; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
        255); text-decoration-thickness: initial; text-decoration-style:
        initial; text-decoration-color: initial; display: inline
        !important; float: none;">it depends on how you have done the
        failover process : <br>
      </span></p>
    <p><br>
      <code class="command" style="box-sizing: border-box; font-family:
        monospace, monospace; font-size: 14.4px; color: rgb(13, 10, 11);
        overflow-wrap: break-word; background-color: rgb(248, 249, 250);
        border-radius: 0.25rem; margin: 0.6rem 0px; font-weight: 400;
        font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; letter-spacing: normal; orphans: 2;
        text-align: left; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;">using pg_ctl promote</code><span style="color: rgb(13,
        10, 11); font-family: &quot;Open Sans&quot;, sans-serif;
        font-size: 14.4px; font-style: normal; font-variant-ligatures:
        normal; font-variant-caps: normal; font-weight: 400;
        letter-spacing: normal; orphans: 2; text-align: left;
        text-indent: 0px; text-transform: none; white-space: normal;
        widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255); text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial; display: inline !important; float: none;"><span> </span>or
        to call<span> </span></span><code class="function"
        style="box-sizing: border-box; font-family: monospace,
        monospace; font-size: 14.4px; color: rgb(13, 10, 11);
        overflow-wrap: break-word; background-color: rgb(248, 249, 250);
        border-radius: 0.25rem; margin: 0.6rem 0px; font-weight: 400;
        font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; letter-spacing: normal; orphans: 2;
        text-align: left; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;">pg_promote</code><span style="color: rgb(13, 10, 11);
        font-family: &quot;Open Sans&quot;, sans-serif; font-size:
        14.4px; font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; font-weight: 400; letter-spacing:
        normal; orphans: 2; text-align: left; text-indent: 0px;
        text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255); text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial; display: inline !important; float: none;"><span> </span>to
        fail over<code>?</code></span></p>
    <p><code>or</code><br>
      <span style="color: rgb(13, 10, 11); font-family: &quot;Open
        Sans&quot;, sans-serif; font-size: 14.4px; font-style: normal;
        font-variant-ligatures: normal; font-variant-caps: normal;
        font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: left; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
        255); text-decoration-thickness: initial; text-decoration-style:
        initial; text-decoration-color: initial; display: inline
        !important; float: none;"><code></code><span><code></code></span></span></p>
    <p><span style="color: rgb(13, 10, 11); font-family: &quot;Open
        Sans&quot;, sans-serif; font-size: 14.4px; font-style: normal;
        font-variant-ligatures: normal; font-variant-caps: normal;
        font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: left; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
        255); text-decoration-thickness: initial; text-decoration-style:
        initial; text-decoration-color: initial; display: inline
        !important; float: none;"><span><code></code></span></span><code
        class="varname" style="box-sizing: border-box; font-family:
        monospace, monospace; font-size: 14.4px; color: rgb(13, 10, 11);
        overflow-wrap: break-word; background-color: rgb(248, 249, 250);
        border-radius: 0.25rem; margin: 0.6rem 0px; font-weight: 400;
        font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; letter-spacing: normal; orphans: 2;
        text-align: left; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;">promote_trigger_file?</code></p>
    <p><code class="varname" style="box-sizing: border-box; font-family:
        monospace, monospace; font-size: 14.4px; color: rgb(13, 10, 11);
        overflow-wrap: break-word; background-color: rgb(248, 249, 250);
        border-radius: 0.25rem; margin: 0.6rem 0px; font-weight: 400;
        font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; letter-spacing: normal; orphans: 2;
        text-align: left; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;">Many methods are doing job.<br>
      </code></p>
    <p><code class="varname" style="box-sizing: border-box; font-family:
        monospace, monospace; font-size: 14.4px; color: rgb(13, 10, 11);
        overflow-wrap: break-word; background-color: rgb(248, 249, 250);
        border-radius: 0.25rem; margin: 0.6rem 0px; font-weight: 400;
        font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; letter-spacing: normal; orphans: 2;
        text-align: left; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;">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</code></p>
    <p><code class="varname" style="box-sizing: border-box; font-family:
        monospace, monospace; font-size: 14.4px; color: rgb(13, 10, 11);
        overflow-wrap: break-word; background-color: rgb(248, 249, 250);
        border-radius: 0.25rem; margin: 0.6rem 0px; font-weight: 400;
        font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; letter-spacing: normal; orphans: 2;
        text-align: left; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;">like this :</code></p>
    <p><br>
      <code class="varname" style="box-sizing: border-box; font-family:
        monospace, monospace; font-size: 14.4px; color: rgb(13, 10, 11);
        overflow-wrap: break-word; background-color: rgb(248, 249, 250);
        border-radius: 0.25rem; margin: 0.6rem 0px; font-weight: 400;
        font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; letter-spacing: normal; orphans: 2;
        text-align: left; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;"><code class="varname" style="box-sizing: border-box;
          font-family: monospace, monospace; font-size: 14.4px; color:
          rgb(13, 10, 11); overflow-wrap: break-word; background-color:
          rgb(248, 249, 250); border-radius: 0.25rem; margin: 0.6rem
          0px; font-weight: 400; font-style: normal;
          font-variant-ligatures: normal; font-variant-caps: normal;
          letter-spacing: normal; orphans: 2; text-align: left;
          text-indent: 0px; text-transform: none; white-space: normal;
          widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
          text-decoration-thickness: initial; text-decoration-style:
          initial; text-decoration-color: initial;">promote_trigger_file
          ='/home/user/master_on' in the postgresql.conf file of the
          secoundary server.</code></code></p>
    <p><code class="varname" style="box-sizing: border-box; font-family:
        monospace, monospace; font-size: 14.4px; color: rgb(13, 10, 11);
        overflow-wrap: break-word; background-color: rgb(248, 249, 250);
        border-radius: 0.25rem; margin: 0.6rem 0px; font-weight: 400;
        font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; letter-spacing: normal; orphans: 2;
        text-align: left; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;"><code class="varname" style="box-sizing: border-box;
          font-family: monospace, monospace; font-size: 14.4px; color:
          rgb(13, 10, 11); overflow-wrap: break-word; background-color:
          rgb(248, 249, 250); border-radius: 0.25rem; margin: 0.6rem
          0px; font-weight: 400; font-style: normal;
          font-variant-ligatures: normal; font-variant-caps: normal;
          letter-spacing: normal; orphans: 2; text-align: left;
          text-indent: 0px; text-transform: none; white-space: normal;
          widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
          text-decoration-thickness: initial; text-decoration-style:
          initial; text-decoration-color: initial;"><br>
          Hope this help you!</code></code></p>
    <p><code class="varname" style="box-sizing: border-box; font-family:
        monospace, monospace; font-size: 14.4px; color: rgb(13, 10, 11);
        overflow-wrap: break-word; background-color: rgb(248, 249, 250);
        border-radius: 0.25rem; margin: 0.6rem 0px; font-weight: 400;
        font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; letter-spacing: normal; orphans: 2;
        text-align: left; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;"><code class="varname" style="box-sizing: border-box;
          font-family: monospace, monospace; font-size: 14.4px; color:
          rgb(13, 10, 11); overflow-wrap: break-word; background-color:
          rgb(248, 249, 250); border-radius: 0.25rem; margin: 0.6rem
          0px; font-weight: 400; font-style: normal;
          font-variant-ligatures: normal; font-variant-caps: normal;
          letter-spacing: normal; orphans: 2; text-align: left;
          text-indent: 0px; text-transform: none; white-space: normal;
          widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
          text-decoration-thickness: initial; text-decoration-style:
          initial; text-decoration-color: initial;"><br>
          Yann</code></code></p>
    <p><br>
    </p>
    <div class="moz-signature">
      <meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
      <title></title>
      <meta name="GENERATOR" content="OpenOffice.org 2.3 (Win32)">
      <meta name="AUTHOR" content="dreal-ra">
      <meta name="CREATED" content="20110608;16534339">
      <meta name="CHANGEDBY" content="Yann CONVERS">
      <meta name="CHANGED" content="20120220;8494106">
      <meta name="CHANGEDBY" content="Yann CONVERS">
      <meta name="CHANGEDBY" content="dreal-aura">
      <meta name="CHANGEDBY" content="dreal-aura">
      <meta name="CHANGEDBY" content="dreal-aura">
      <style type="text/css">
	<!--
		@page { size: 21cm 29.7cm; margin: 2cm }
		P { margin-bottom: 0.21cm }
	-->
	</style>
      <pre><b>Yann Convers</b>
Gestionnaire de l'infrastructure, des référentiels et des outils<p>
<font color="#000000"><b>DREAL Auvergne-Rhône-Alpes</b></font></p>
<pre>Service Connaissance, Information, Développement Durable, Autorité Environnementale - Pole Système d Information Géographique
Tél : 04 26 28 67 89
courriel : <a href="mailto:yann.convers@developpement-durable.gouv.fr">yann.convers@developpement-durable.gouv.fr</a></pre>adresse de la boite d’unité : <a href="mailto:sig.dreal-ara@developpement-durable.gouv.fr">boite unité</a>

<p>Pour toute commande interne de prestations, merci d utilisez le formulaire suivant : <a href="http://postgis-aura.projets.appli.i2/projects/demandes-de-prestations/issues/new">http://post...;
<b>Adresse postale :</b> DREAL Auvergne-Rhône-Alpes, CIDDAE - SIG
 69453 LYON CEDEX 06
<b>Adresse physique :</b> 5
place Jules Ferry (immeuble Lugdunum - métro Brotteaux) -
69006 Lyon
<b>Standard :</b> 04 26 28 60 00
<b>Liens :</b><a href="http://intra.dreal-rhone-alpes.i2/">Site
Intranet</a>  <a href="http://www.auvergne-rhone-alpes.developpement-durable.gouv.fr/">Site
Internet</a>
<p style="margin-bottom: 0cm">

</p>

</pre>
    </div>
    <div class="moz-cite-prefix">Le 03/09/2021 à 11:39, &gt;
      swatipatiltg (par Internet, dépôt
      <a class="moz-txt-link-abbreviated" href="mailto:pgsql-admin-owner+m63745-343831@lists.postgresql.org">pgsql-admin-owner+m63745-343831@lists.postgresql.org</a>) a écrit :<br>
    </div>
    <blockquote
cite="mid:CAJCVjRSHAkXDo4gJ9WzCVGH3hbEZGwtE=BDK6cO9L-3-on50zw@mail.gmail.com"
      type="cite">
      <div dir="auto">Hi 
        <div dir="auto"><br>
        </div>
        <div dir="auto">Could you please help me to clarify why
          standby.signal is not getting deleted after failover in below
          scenario</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Steps:</div>
        <div dir="auto">1. Deactivate secondary server</div>
        <div dir="auto">2. Restore data from primary or secondary at
          primary server.</div>
        <div dir="auto">3. Enable replication.</div>
        <div dir="auto">4. Activate secondary server.</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Your reply will be more appreciated.</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Thanks,</div>
        <div dir="auto">Swati Yadav.</div>
      </div>
    </blockquote>
    <br>
  </body>
</html>





view thread (4+ messages)  latest in thread

Message-ID: <efc7062d-d93e-1524-a691-e2f7e8ff71ef@developpement-durable.gouv.fr>
Permalink:  ../efc7062d-d93e-1524-a691-e2f7e8ff71ef@developpement-durable.gouv.fr/
Also on:    postgresql.org/message-id/efc7062d-d93e-1524-a691-e2f7e8ff71ef@developpement-durable.gouv.fr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: yann.convers@developpement-durable.gouv.fr, pgsql-admin@lists.postgresql.org
  Subject: Re: Standby.signal file is not getting deleted after failover in all scanarios
  In-Reply-To: <efc7062d-d93e-1524-a691-e2f7e8ff71ef@developpement-durable.gouv.fr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox