pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Dmitry Ivanov <d.ivanov@postgrespro.ru>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Ivan Kartyshov <i.kartyshov@postgrespro.ru>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed
Date: Tue, 06 Mar 2018 14:24:53 +0300
Message-ID: <e481bbfe699b2abf090c1c9a3c997418@postgrespro.ru> (raw)
In-Reply-To: <CANP8+jL_mq4o3L99rP=ru1UrJug+_ytQupKWP-jn6+3EnqLgnw@mail.gmail.com>
References: <0240c26c-9f84-30ea-fca9-93ab2df5f305@postgrespro.ru>
<CAEepm=105OCnhe9cAdYp0Vy1b2VmQFX6n9qM+nx70GXUKgjF9A@mail.gmail.com>
<c585d9a0-5bda-778e-e628-dd30959d71d3@postgrespro.ru>
<CAPpHfdvUnqY8TTwZ4gMOcwY+3S+N=07gpuL61p41E6SdAetvCg@mail.gmail.com>
<abcff0b4e3ce1c2a4d14f54e7031dc15@postgrespro.ru>
<CA+CSw_uW2yVMMvQ8S2hAfbobXSDhCF0uBZ3zjYL650Z=-0PkFQ@mail.gmail.com>
<de402dc80e39c358dedf174c13bb5226@postgrespro.ru>
<CANP8+jL_mq4o3L99rP=ru1UrJug+_ytQupKWP-jn6+3EnqLgnw@mail.gmail.com>
> In PG11, I propose the following command, sticking mostly to Ants'
> syntax, and allowing to wait for multiple events before it returns. It
> doesn't hold snapshot and will not get cancelled by Hot Standby.
>
> WAIT FOR event [, event ...] options
>
> event is
> LSN value
> TIMESTAMP value
>
> options
> TIMEOUT delay
> UNTIL TIMESTAMP timestamp
> (we have both, so people don't need to do math, they can use whichever
> they have)
I have a (possibly) dumb question: if we have specified several events,
should WAIT finish if only one of them triggered? It's not immediately
obvious if we're waiting for ALL of them to trigger, or just one will
suffice (ANY). IMO the syntax could be extended to something like:
WAIT FOR [ANY | ALL] event [, event ...] options,
with ANY being the default variant.
--
Dmitry Ivanov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
view thread (216+ messages) latest in thread
Message-ID: <e481bbfe699b2abf090c1c9a3c997418@postgrespro.ru> Permalink: ../e481bbfe699b2abf090c1c9a3c997418@postgrespro.ru/ Also on: postgresql.org/message-id/e481bbfe699b2abf090c1c9a3c997418@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: d.ivanov@postgrespro.ru, simon@2ndquadrant.com, i.kartyshov@postgrespro.ru, thomas.munro@enterprisedb.com Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed In-Reply-To: <e481bbfe699b2abf090c1c9a3c997418@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