pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: ikedamsh <ikedamsh@oss.nttdata.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: It is not documented that pg_promote can exit standby mode
Date: Mon, 20 Apr 2020 20:38:36 +0900
Message-ID: <dc6041f6-db27-d2a8-9ba9-379d7ad90522@oss.nttdata.com> (raw)
In-Reply-To: <17718.1587145597@sss.pgh.pa.us>
References: <de0068417a9f4046bac693cbcc00bdc9@oss.nttdata.com>
	<a0df06f3-4441-ce7f-582e-ee4c023ddf1e@oss.nttdata.com>
	<17718.1587145597@sss.pgh.pa.us>



On 2020/04/18 2:46, Tom Lane wrote:
> Fujii Masao <masao.fujii@oss.nttdata.com> writes:
>> Thanks for the report and the patch! It looks good to me.
>> Barring any objection, I will commit this patch.
> 
> It might be worth writing "<function>pg_promote()</function> is called"
> (adding parentheses) to make it clearer that a function is being
> referred to.  No objection otherwise.

Yes. Also Masahiro-san reported me, off-list, that there are other places
where pg_promote is mentioned without parentheses. I think it's better to
add parentheses there. Attached is the updated version of the patch.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachments:

0001-fix-doc-about-the-way-to-exit-standby-mode_v2.patch (text/plain, 2.3K) download diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index a71ca62463..a14df06292 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -4114,7 +4114,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" Specifies a trigger file whose presence ends recovery in the standby. Even if this value is not set, you can still promote the standby using <command>pg_ctl promote</command> or calling - <function>pg_promote</function>. + <function>pg_promote()</function>. This parameter can only be set in the <filename>postgresql.conf</filename> file or on the server command line. </para> diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index 4659b9ef5d..52e47379cc 100644 --- a/doc/src/sgml/high-availability.sgml +++ b/doc/src/sgml/high-availability.sgml @@ -644,7 +644,8 @@ protocol to make nodes agree on a serializable transactional order. <para> Standby mode is exited and the server switches to normal operation - when <command>pg_ctl promote</command> is run or a trigger file is found + when <command>pg_ctl promote</command> is run, + <function>pg_promote()</function> is called, or a trigger file is found (<varname>promote_trigger_file</varname>). Before failover, any WAL immediately available in the archive or in <filename>pg_wal</filename> will be restored, but no attempt is made to connect to the master. @@ -1470,11 +1471,11 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' <para> To trigger failover of a log-shipping standby server, run - <command>pg_ctl promote</command>, call <function>pg_promote</function>, + <command>pg_ctl promote</command>, call <function>pg_promote()</function>, or create a trigger file with the file name and path specified by the <varname>promote_trigger_file</varname>. If you're planning to use <command>pg_ctl promote</command> or to call - <function>pg_promote</function> to fail over, + <function>pg_promote()</function> to fail over, <varname>promote_trigger_file</varname> is not required. If you're setting up the reporting servers that are only used to offload read-only queries from the primary, not for high availability purposes, you don't

view thread (7+ messages)  latest in thread

Message-ID: <dc6041f6-db27-d2a8-9ba9-379d7ad90522@oss.nttdata.com>
Permalink:  ../dc6041f6-db27-d2a8-9ba9-379d7ad90522@oss.nttdata.com/
Also on:    postgresql.org/message-id/dc6041f6-db27-d2a8-9ba9-379d7ad90522@oss.nttdata.com

 ·  · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: masao.fujii@oss.nttdata.com, tgl@sss.pgh.pa.us, ikedamsh@oss.nttdata.com
  Subject: Re: It is not documented that pg_promote can exit standby mode
  In-Reply-To: <dc6041f6-db27-d2a8-9ba9-379d7ad90522@oss.nttdata.com>
  References: <de0068417a9f4046bac693cbcc00bdc9@oss.nttdata.com> <a0df06f3-4441-ce7f-582e-ee4c023ddf1e@oss.nttdata.com> <17718.1587145597@sss.pgh.pa.us> <dc6041f6-db27-d2a8-9ba9-379d7ad90522@oss.nttdata.com>

* 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