pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kartyshov Ivan <i.kartyshov@postgrespro.ru>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: Anna Akenteva <a.akenteva@postgrespro.ru>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: tgl@sss.pgh.pa.us
Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed
Date: Wed, 08 Apr 2020 02:14:48 +0300
Message-ID: <ccdc6c31218f61a2970c84cc850c8a41@postgrespro.ru> (raw)
In-Reply-To: <CAPpHfdt-_MZkW2eJHP_cQsPkZVH-nF4rt6gLEj+V2XnM+2ZPiw@mail.gmail.com>
References: <80f267591b373db5588d580fdfb432f0@postgrespro.ru>
	<20200306.145445.1788163547829857988.horikyota.ntt@gmail.com>
	<3cc883048264c2e9af022033925ff8db@postgrespro.ru>
	<f4100c14985b1b7983aefd00cb6b491c@postgrespro.ru>
	<a679788da2581506329c4b314ecaf2c7@postgrespro.ru>
	<674ad239b725a11d89c21574e44e376b@postgrespro.ru>
	<69a363498b76cd079ae19c4ee93bced0@postgrespro.ru>
	<06bfb1e542a25c3ebfc4232be4d49555@postgrespro.ru>
	<CAPpHfdu+wp1y=SLaaWiujemr=_bd=Q6=jB8=fVKZbXgVftPBxg@mail.gmail.com>
	<9d112e474c311b6b4c20566314283638@postgrespro.ru>
	<e544ce8b7e6ceadf6bb89094aef68c26@postgrespro.ru>
	<CAA4eK1JC-CSNXjRt3Ct4MFSX3owaD7J34gjzE7GamzfwBFfuCg@mail.gmail.com>
	<ee2821c0f87ff6f959f5eeb5e7f92cd2@postgrespro.ru>
	<CAPpHfdt-_MZkW2eJHP_cQsPkZVH-nF4rt6gLEj+V2XnM+2ZPiw@mail.gmail.com>

On 2020-04-08 00:27, Tom Lane wrote:
> Alexander Korotkov <akorotkov@postgresql.org> writes:
»   WAIT FOR LSN lsn [ TIMEOUT timeout ]
> 
> This seems like a really carelessly chosen syntax —- *three* new
> keywords, when you probably didn't need any.  Are you not aware that
> there is distributed overhead in the grammar for every keyword?
> Plus, each new keyword carries the risk of breaking existing
> applications, since it no longer works as an alias-not-preceded-by-AS.
> 

To avoid creating new keywords, we could change syntax in the following 
way:
WAIT FOR => DEPENDS ON
LSN => EVENT
TIMEOUT => WITH INTERVAL

So
START TRANSACTION WAIT FOR LSN '0/3F07A6B1' TIMEOUT 5000;
would instead look as
START TRANSACTION DEPENDS ON EVENT '0/3F07A6B1' WITH INTERVAL '5 
seconds';

[1] 
https://www.postgresql.org/message-id/28209.1586294824%40sss.pgh.pa.us

-- 
Ivan Kartyshov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company





view thread (216+ messages)  latest in thread

Message-ID: <ccdc6c31218f61a2970c84cc850c8a41@postgrespro.ru>
Permalink:  ../ccdc6c31218f61a2970c84cc850c8a41@postgrespro.ru/
Also on:    postgresql.org/message-id/ccdc6c31218f61a2970c84cc850c8a41@postgrespro.ru

 · 

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-hackers@postgresql.org
  Cc: i.kartyshov@postgrespro.ru, a.korotkov@postgrespro.ru, a.akenteva@postgrespro.ru, amit.kapila16@gmail.com, pgsql-hackers@lists.postgresql.org, tgl@sss.pgh.pa.us
  Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed
  In-Reply-To: <ccdc6c31218f61a2970c84cc850c8a41@postgrespro.ru>

* 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