From: Michael Paquier <michael@paquier.xyz>
To: Matt Dee <mattdee123@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Specifying WAL Location in Streaming Replication
Date: Mon, 9 Jul 2018 10:55:19 +0900
Message-ID: <20180709015519.GI1467@paquier.xyz> (raw)
In-Reply-To: <CACdswHOd2yh9r-z6n2e7ek_4iasDoi7Gn_6ZC5B8MKdMRrKUGg@mail.gmail.com>
References: <CACdswHOd2yh9r-z6n2e7ek_4iasDoi7Gn_6ZC5B8MKdMRrKUGg@mail.gmail.com>
On Sun, Jul 08, 2018 at 09:51:47AM -0400, Matt Dee wrote:
> In the documentation for START_REPLICATION, a required argument is the WAL
> location to begin streaming at, and I'm not sure what to use here. I have
> been using 0, and it seems to work fine. Additionally, it seems that when
> --startpos is not provided to pg_recvlogical, it defaults to just sending a
> wal location of 0.
>
> While this seems to work, I feel a bit uneasy about it since I can't find
> any documentation explaining why this works or what this argument does when
> using a replication slot. Any clarification would be appreciated.
0/0 can be used in the case where the client does not know which
position it should try to use, in which case the server will choose by
itself from the oldest LSN position where changes have been left
unconsumed. If you have an idea of documentation improvement, I think
that it would be welcome, say in the replication protocol page for the
command START_REPLICATION. This level of details is really internal,
but fresh ideas may bring more clarity in this area, and nowhere in the
docs are used references to either 0/0 or InvalidXLogRecPtr for WAL
positions.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: michael@paquier.xyz, mattdee123@gmail.com
Subject: Re: Specifying WAL Location in Streaming Replication
In-Reply-To: <20180709015519.GI1467@paquier.xyz>
References: <CACdswHOd2yh9r-z6n2e7ek_4iasDoi7Gn_6ZC5B8MKdMRrKUGg@mail.gmail.com> <20180709015519.GI1467@paquier.xyz>
* 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