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 17832d76b38578724d6115ed6f8bd2e8@postgrespro.ru
Whole thread Raw
In response to Re: [HACKERS] make async slave to wait for lsn to be replayed  (a.pervushina@postgrespro.ru)
Responses Re: [HACKERS] make async slave to wait for lsn to be replayed
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: Amit Kapila
Date:
Subject: Re: [Patch] Optimize dropping of relation buffers using dlist
Next
From: Fujii Masao
Date:
Subject: Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module