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

From Robert Haas
Subject Re: [HACKERS] make async slave to wait for lsn to be replayed
Date
Msg-id CA+Tgmoa_gosB4o3jPjs0AjQWuQ2747+3_Zk+Kzbar30+62FCzA@mail.gmail.com
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
On Fri, Feb 2, 2018 at 3:46 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> 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)

WAIT FOR TIMEOUT sounds a lot like SELECT pg_sleep_for(), and WAIT
UNTIL TIMESTAMP sounds a lot like SELECT pg_sleep_until().

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)
Next
From: Simon Riggs
Date:
Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed