From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: tgl@sss.pgh.pa.us
Cc: a.akenteva@postgrespro.ru
Cc: a.korotkov@postgrespro.ru
Cc: i.kartyshov@postgrespro.ru
Cc: amit.kapila16@gmail.com
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed
Date: Thu, 9 Apr 2020 16:35:22 +0900
Message-ID: <880834ee-4b18-6d5d-9dae-6520c5eb2bef@oss.nttdata.com> (raw)
In-Reply-To: <20200409.161107.580344062273684114.horikyota.ntt@gmail.com>
References: <20200408.100945.375702947246835193.horikyota.ntt@gmail.com>
<d3ff2e363af60b345f82396992595a03@postgrespro.ru>
<13716.1586378146@sss.pgh.pa.us>
<20200409.161107.580344062273684114.horikyota.ntt@gmail.com>
On 2020/04/09 16:11, Kyotaro Horiguchi wrote:
> At Wed, 08 Apr 2020 16:35:46 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote in
>> Anna Akenteva <a.akenteva@postgrespro.ru> writes:
>>> I'd like to hear others' opinions on the syntax as well.
>>
>> Pardon me for coming very late to the party, but it seems like there are
>> other questions that ought to be answered before we worry about any of
>> this. Why is this getting grafted onto BEGIN/START TRANSACTION in the
>> first place? It seems like it would be just as useful as a separate
>> command, if not more so. You could always start a transaction just
>> after waiting. Conversely, there might be reasons to want to wait
>> within an already-started transaction.
>>
>> If it could survive as a separate command, then I'd humbly suggest
>> that it requires no grammar work at all. You could just invent one
>> or more functions that take suitable parameters.
>
> The rationale for not being a fmgr function is stated in the following
> comments.
This issue happens because the function is executed after BEGIN? If yes,
what about executing the function (i.e., as separate transaction) before BEGIN?
If so, the snapshot taken in the function doesn't affect the subsequent
transaction whatever its isolation level is.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
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-hackers@postgresql.org
Cc: masao.fujii@oss.nttdata.com, horikyota.ntt@gmail.com, tgl@sss.pgh.pa.us, a.akenteva@postgrespro.ru, a.korotkov@postgrespro.ru, i.kartyshov@postgrespro.ru, amit.kapila16@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed
In-Reply-To: <880834ee-4b18-6d5d-9dae-6520c5eb2bef@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