pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexey Kondratov <a.kondratov@postgrespro.ru>
To: Anna Akenteva <a.akenteva@postgrespro.ru>
To: Ivan Kartyshov <i.kartyshov@postgrespro.ru>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: Adam Brusselback <adambrusselback@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed
Date: Fri, 03 Apr 2020 17:29:45 +0300
Message-ID: <69a363498b76cd079ae19c4ee93bced0@postgrespro.ru> (raw)
In-Reply-To: <674ad239b725a11d89c21574e44e376b@postgrespro.ru>
References: <80f267591b373db5588d580fdfb432f0@postgrespro.ru>
	<20200306.145445.1788163547829857988.horikyota.ntt@gmail.com>
	<3cc883048264c2e9af022033925ff8db@postgrespro.ru>
	<f4100c14985b1b7983aefd00cb6b491c@postgrespro.ru>
	<a679788da2581506329c4b314ecaf2c7@postgrespro.ru>
	<674ad239b725a11d89c21574e44e376b@postgrespro.ru>

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





view thread (216+ messages)  latest in thread

Message-ID: <69a363498b76cd079ae19c4ee93bced0@postgrespro.ru>
Permalink:  ../69a363498b76cd079ae19c4ee93bced0@postgrespro.ru/
Also on:    postgresql.org/message-id/69a363498b76cd079ae19c4ee93bced0@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: a.kondratov@postgrespro.ru, a.akenteva@postgrespro.ru, i.kartyshov@postgrespro.ru, horikyota.ntt@gmail.com, adambrusselback@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed
  In-Reply-To: <69a363498b76cd079ae19c4ee93bced0@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox