From: | a(dot)pervushina(at)postgrespro(dot)ru |
---|---|
To: | Anna Akenteva <a(dot)akenteva(at)postgrespro(dot)ru> |
Cc: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, a(dot)korotkov(at)postgrespro(dot)ru, i(dot)kartyshov(at)postgrespro(dot)ru, amit(dot)kapila16(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org, tgl(at)sss(dot)pgh(dot)pa(dot)us |
Subject: | Re: [HACKERS] make async slave to wait for lsn to be replayed |
Date: | 2020-11-18 12:05:00 |
Message-ID: | 17832d76b38578724d6115ed6f8bd2e8@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
pg_waitlsn_v10.patch | text/x-diff | 16.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2020-11-18 12:22:50 | Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module |
Previous Message | Amit Kapila | 2020-11-18 12:04:31 | Re: [Patch] Optimize dropping of relation buffers using dlist |