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 1jPILu-0006jp-5y for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Apr 2020 04:11:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jPILt-0003px-2F for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Apr 2020 04:11:41 +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 1jPILs-0003pq-Rm for pgsql-hackers@lists.postgresql.org; Fri, 17 Apr 2020 04:11:40 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jPILp-0005je-76 for pgsql-hackers@postgresql.org; Fri, 17 Apr 2020 04:11:40 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTP id 9809B60696 for ; Fri, 17 Apr 2020 13:11:31 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at oss.nttdata.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_b4034180878df6d20b291f784d6675cf" Date: Fri, 17 Apr 2020 13:11:31 +0900 From: ikedamsh To: pgsql-hackers@postgresql.org Subject: It is not documented that pg_promote can exit standby mode Message-ID: X-Sender: ikedamsh@oss.nttdata.com User-Agent: Roundcube Webmail/1.1.9 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=_b4034180878df6d20b291f784d6675cf Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed Hi,  The document(high-availability.sgml) says that there are only two ways to exit standby mode.  26.2.2. Standby Server Operation  Standby mode is exited and the server switches to normal operation when pg_ctl promote is run or a trigger file is found (promote_trigger_file). But there is another way, by calling pg_promote function. I think we need to document it, doesn't it? I attached a patch. Please review and let me know your thoughts. Regards, Masahiro Ikeda --=_b4034180878df6d20b291f784d6675cf Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=0001-fix-doc-about-the-way-to-exit-standby-mode.patch Content-Disposition: attachment; filename=0001-fix-doc-about-the-way-to-exit-standby-mode.patch; size=1201 RnJvbSA3MTliNzU0YzM2ZjQ1MzdhYWFiN2M2ZGUxOTUxZDdiN2VjNDc1OWY2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXNhaGlybyBJa2VkYSA8aWtlZGFtc2hAb3NzLm50dGRhdGEu Y29tPgpEYXRlOiBUdWUsIDcgQXByIDIwMjAgMDg6MzQ6NTUgKzA5MDAKU3ViamVjdDogW1BBVENI XSBmaXggZG9jIGFib3V0IHRoZSB3YXkgdG8gZXhpdCBzdGFuZGJ5IG1vZGUKCi0tLQogZG9jL3Ny Yy9zZ21sL2hpZ2gtYXZhaWxhYmlsaXR5LnNnbWwgfCA0ICsrLS0KIDEgZmlsZSBjaGFuZ2VkLCAy IGluc2VydGlvbnMoKyksIDIgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvZG9jL3NyYy9zZ21s L2hpZ2gtYXZhaWxhYmlsaXR5LnNnbWwgYi9kb2Mvc3JjL3NnbWwvaGlnaC1hdmFpbGFiaWxpdHku c2dtbAppbmRleCA0NjU5YjllLi44OGJmOTYwIDEwMDY0NAotLS0gYS9kb2Mvc3JjL3NnbWwvaGln aC1hdmFpbGFiaWxpdHkuc2dtbAorKysgYi9kb2Mvc3JjL3NnbWwvaGlnaC1hdmFpbGFiaWxpdHku c2dtbApAQCAtNjQ0LDggKzY0NCw4IEBAIHByb3RvY29sIHRvIG1ha2Ugbm9kZXMgYWdyZWUgb24g YSBzZXJpYWxpemFibGUg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