pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feedFrom: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Antonin Houska <ah@cybertec.at>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Attempt to consolidate reading of XLOG page
Date: Mon, 6 May 2019 14:21:34 -0400
Message-ID: <20190506182134.GA592@alvherre.pgsql> (raw)
In-Reply-To: <CA+TgmobTi1mVe_H9sig=Y3R91wZ-5FT5dL-gB8roifr3xboecg@mail.gmail.com>
On 2019-May-06, Robert Haas wrote:
> On Thu, May 2, 2019 at 12:18 PM Antonin Houska <ah@cybertec.at> wrote:
> > The next version of the patch is attached.
>
> I don't think any of this looks acceptable:
I agree. I inteded to suggest upthread to pass an additional argument
to XLogRead, which is a function that takes a message string and
SQLSTATE; in backend, the function does errstart / errstate / errmsg /
errfinish, and in frontend programs it does pg_log_fatal (and ignores
sqlstate). The message must be sprintf'ed and translated by XLogRead.
(xlogreader.c could itself provide a default error reporting callback,
at least for frontend, to avoid repeating the code). That way, if a
different frontend program wants to do something different, it's fairly
easy to pass a different function pointer.
BTW, having frontend's XLogFileNameCommon use a totally unrelated
variable for its printing is naughty.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
view thread (62+ messages) latest in thread
Message-ID: <20190506182134.GA592@alvherre.pgsql>
Permalink: ../20190506182134.GA592@alvherre.pgsql/
Also on: postgresql.org/message-id/20190506182134.GA592@alvherre.pgsql
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: alvherre@2ndquadrant.com, robertmhaas@gmail.com, ah@cybertec.at
Subject: Re: Attempt to consolidate reading of XLOG page
In-Reply-To: <20190506182134.GA592@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