From: Antonin Houska <ah@cybertec.at>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Attempt to consolidate reading of XLOG page
Date: Mon, 15 Apr 2019 11:27:36 +0200
Message-ID: <14198.1555320456@localhost> (raw)
In-Reply-To: <20190412164656.GA21726@alvherre.pgsql>
References: <20190412164656.GA21726@alvherre.pgsql>
Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> I agree that xlog reading is pretty messy.
>
> I think ifdef'ing the way XLogRead reports errors is not great. Maybe
> we can pass a function pointer that is to be called in case of errors?
I'll try a bit harder to evaluate the existing approaches to report the same
error on both backend and frontend side.
> Not sure about the walsize; maybe it can be a member in XLogReadPos, and
> given to XLogReadInitPos()? (Maybe rename XLogReadPos as
> XLogReadContext or something like that, indicating it's not just the
> read position.)
As pointed out by others, XLogReadPos is not necessary. So if XLogRead()
receives XLogReaderState instead, it can get the segment size from there.
Thanks.
--
Antonin Houska
Web: https://www.cybertec-postgresql.com
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-hackers@postgresql.org
Cc: ah@cybertec.at, alvherre@2ndquadrant.com
Subject: Re: Attempt to consolidate reading of XLOG page
In-Reply-To: <14198.1555320456@localhost>
References: <20190412164656.GA21726@alvherre.pgsql> <14198.1555320456@localhost>
* 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