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

From Dmitry Ivanov
Subject Re: [HACKERS] make async slave to wait for lsn to be replayed
Date
Msg-id e481bbfe699b2abf090c1c9a3c997418@postgrespro.ru
Whole thread Raw
In response to Re: [HACKERS] make async slave to wait for lsn to be replayed  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: [HACKERS] make async slave to wait for lsn to be replayed  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
> In PG11, I propose the following command, sticking mostly to Ants'
> syntax, and allowing to wait for multiple events before it returns. It
> doesn't hold snapshot and will not get cancelled by Hot Standby.
> 
> WAIT FOR event [, event ...] options
> 
> event is
> LSN value
> TIMESTAMP value
> 
> options
> TIMEOUT delay
> UNTIL TIMESTAMP timestamp
> (we have both, so people don't need to do math, they can use whichever
> they have)

I have a (possibly) dumb question: if we have specified several events, 
should WAIT finish if only one of them triggered? It's not immediately 
obvious if we're waiting for ALL of them to trigger, or just one will 
suffice (ANY). IMO the syntax could be extended to something like:

WAIT FOR [ANY | ALL] event [, event ...] options,

with ANY being the default variant.


-- 
Dmitry Ivanov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


pgsql-hackers by date:

Previous
From: Ivan Kartyshov
Date:
Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed
Next
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] Partition-wise aggregation/grouping