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

From a.pervushina@postgrespro.ru
Subject Re: [HACKERS] make async slave to wait for lsn to be replayed
Date
Msg-id f6522632dc01fb4a3d3659a4c4917242@postgrespro.ru
Whole thread Raw
Responses Re: [HACKERS] make async slave to wait for lsn to be replayed  (Alexander Korotkov <aekorotkov@gmail.com>)
List pgsql-hackers
Hello,

I've changed the BEGIN WAIT FOR LSN statement to core functions 
pg_waitlsn, pg_waitlsn_infinite and pg_waitlsn_no_wait.
Currently the functions work inside repeatable read transactions, but 
waitlsn creates a snapshot if called first in a transaction block, which 
can possibly lead the transaction to working incorrectly, so the 
function gives a warning.

Usage examples
==========
select pg_waitlsn(‘LSN’, timeout);
select pg_waitlsn_infinite(‘LSN’);
select pg_waitlsn_no_wait(‘LSN’);
Attachment

pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: Cache relation sizes?
Next
From: Heikki Linnakangas
Date:
Subject: Re: Split copy.c