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

From: Ivan Kartyshov <i(dot)kartyshov(at)postgrespro(dot)ru>
To: 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:24:24
Message-ID: eba47566350c8b221645e4d7f202fe07@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund писал 2018-03-02 03:47:
> On 2018-02-02 19:41:37 +0000, Simon Riggs wrote:
>> On 2 February 2018 at 18:46, Robert Haas <robertmhaas(at)gmail(dot)com>
>> wrote:
>> > On Fri, Feb 2, 2018 at 3:46 AM, Simon Riggs <simon(at)2ndquadrant(dot)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().
>>
>> Yes, it sounds very similar. It's the behavior that differs; I read
>> and agreed with yours and Thomas' earlier comments on that point.
>>
>> As pointed out upthread, the key difference is whether it gets
>> cancelled on Hot Standby and whether you can call it in a non-READ
>> COMMITTED transaction.
>
> Given that nobody has updated the patch or even discussed doing so, I
> assume this would CF issue should now appropriately be classified as
> returned with feedback?

Hello, I now is preparing the patch over syntax that Simon offered. And
in few day I will update the patch.
Thank you for your interest in thread.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Ivanov 2018-03-06 11:24:53 Re: [HACKERS] make async slave to wait for lsn to be replayed
Previous Message Etsuro Fujita 2018-03-06 11:09:50 Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw