From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Thomas Munro <tmunro@postgresql.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Rationalize GetWalRcv{Write,Flush}RecPtr().
Date: Thu, 9 Apr 2020 17:49:47 -0400
Message-ID: <20200409214947.GA22655@alvherre.pgsql> (raw)
In-Reply-To: <E1jM9J9-00073x-Os@gemulon.postgresql.org>
On 2020-Apr-08, Thomas Munro wrote:
> Rationalize GetWalRcv{Write,Flush}RecPtr().
>
> GetWalRcvWriteRecPtr() previously reported the latest *flushed*
> location. Adopt the conventional terminology used elsewhere in the tree
> by renaming it to GetWalRcvFlushRecPtr(), and likewise for some related
> variables that used the term "received".
>
> Add a new definition of GetWalRcvWriteRecPtr(), which returns the latest
> *written* value. This will allow later patches to use the value for
> non-data-integrity purposes, without having to wait for the flush
> pointer to advance.
It seems worth pointing out that the new GetWalRcvWriteRecPtr function
has a different signature from the original one -- so any third-party
code using the original function will now get a compile failure that
should alert them that they need to change their code to call
GetWalRcvFlushRecPtr instead. Maybe we should add a line or two in the
comments GetWalRcvWriteRecPtr to make this explicit.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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-committers@postgresql.org
Cc: alvherre@2ndquadrant.com, tmunro@postgresql.org, pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Rationalize GetWalRcv{Write,Flush}RecPtr().
In-Reply-To: <20200409214947.GA22655@alvherre.pgsql>
References: <E1jM9J9-00073x-Os@gemulon.postgresql.org> <20200409214947.GA22655@alvherre.pgsql>
* 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