Re: [HACKERS] make async slave to wait for lsn to be replayed

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Dmitry Ivanov <d(dot)ivanov(at)postgrespro(dot)ru>
Cc: Ivan Kartyshov <i(dot)kartyshov(at)postgrespro(dot)ru>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed
Date: 2018-03-06 11:50:00
Message-ID: CANP8+j+e7M4eJ_h_A1UxZ6E4Q_XLd+WXOobaxVZb3pT7UkabLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6 March 2018 at 11:24, Dmitry Ivanov <d(dot)ivanov(at)postgrespro(dot)ru> 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)
>
>
> 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.

+1

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2018-03-06 12:04:16 Re: Fwd: [BUGS] pg_trgm word_similarity inconsistencies or bug
Previous Message Claudio Freire 2018-03-06 11:43:30 Re: Faster inserts with mostly-monotonically increasing values