Re: make async slave to wait for lsn to be replayed

Ivan Kartyshov <i.kartyshov@postgrespro.ru>

From: Ivan Kartyshov <i.kartyshov@postgrespro.ru>
To: pgsql-hackers@postgresql.org
Date: 2017-10-23T09:29:03Z
Lists: pgsql-hackers

Attachments

Alexander Korotkov писал 2017-09-26 12:07:
> I propose following syntax options.
> 
> WAITLSN lsn;
> WAITLSN lsn TIMEOUT delay;
> WAITLSN lsn INFINITE;
> WAITLSN lsn NOWAIT;
> 
> For me that looks rather better.  What do you think?

I agree with you, now syntax looks better.
New patch attached to tha mail.

Ants Aasma писал 2017-09-26 13:00:
> Exposing this interface as WAITLSN will encode that visibility order
> matches LSN order. This removes any chance of fixing for example
> visibility order of async/vs/sync transactions. Just renaming it so
> the token is an opaque commit visibility token that just happens to be
> a LSN would still allow for progress in transaction management. For
> example, making PostgreSQL distributed will likely want timestamp
> and/or vector clock based visibility rules.

I'm sorry I did not understand exactly what you meant.
Please explain this in more detail.

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

Commits

  1. Implement waiting for given lsn at transaction start