agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: 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
view thread (62+ messages) latest in thread
Message-ID: <14198.1555320456@localhost>
Permalink: ../14198.1555320456@localhost/
Also on: postgresql.org/message-id/14198.1555320456@localhost
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: ah@cybertec.at, alvherre@2ndquadrant.com
Subject: Re: Attempt to consolidate reading of XLOG page
In-Reply-To: <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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox