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

From Alexey Kondratov
Subject Re: [HACKERS] make async slave to wait for lsn to be replayed
Date
Msg-id 69a363498b76cd079ae19c4ee93bced0@postgrespro.ru
Whole thread Raw
In response to Re: [HACKERS] make async slave to wait for lsn to be replayed  (Anna Akenteva <a.akenteva@postgrespro.ru>)
Responses Re: [HACKERS] make async slave to wait for lsn to be replayed
List pgsql-hackers
On 2020-04-01 02:26, Anna Akenteva wrote:
> On 2020-03-27 04:15, Kartyshov Ivan wrote:
>> Anna, feel free to work on this patch.
> 
> Ivan and I worked on this patch a bit more. We fixed the bugs that we
> could find and cleaned up the code. For now, we've kept both options:
> WAIT as a standalone statement and WAIT as a part of BEGIN. The new
> patch is attached.
> 
> The syntax looks a bit different now:
> 
> - WAIT FOR [ANY | ALL] event [, ...]
> - BEGIN [ WORK | TRANSACTION ] [ transaction_mode [, ...] ] [ WAIT FOR
> [ANY | ALL] event [, ...]]
> where event is one of:
>     LSN value
>     TIMEOUT number_of_milliseconds
>     timestamp
> 
> Now, one event cannot contain both an LSN and a TIMEOUT.
> 

In my understanding the whole idea of having TIMEOUT was to do something 
like 'Do wait for this LSN to be replicated, but no longer than TIMEOUT 
milliseconds'. What is the point of having plain TIMEOUT? It seems to be 
equivalent to pg_sleep, doesn't it?


Regards
-- 
Alexey Kondratov

Postgres Professional https://www.postgrespro.com
Russian Postgres Company



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: adding partitioned tables to publications
Next
From: Tom Lane
Date:
Subject: Re: zombie connections