Re: [HACKERS] make async slave to wait for lsn to be replayed - Mailing list pgsql-hackers

From Kartyshov Ivan
Subject Re: [HACKERS] make async slave to wait for lsn to be replayed
Date
Msg-id ccdc6c31218f61a2970c84cc850c8a41@postgrespro.ru
Whole thread Raw
In response to Re: [HACKERS] make async slave to wait for lsn to be replayed  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Responses Re: [HACKERS] make async slave to wait for lsn to be replayed
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Using the rr debugging tool to debug Postgres
Next
From: Alvaro Herrera
Date:
Subject: Re: pgsql: Allow users to limit storage reserved by replication slots