From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: sfrost@snowman.net
Cc: zeleny.ales@gmail.com
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Wall shiping replica failed to recover database with error: invalid contrecord length 1956 at FED/38FFE208
Date: Thu, 14 Nov 2019 12:28:13 -0500
Message-ID: <30577.1573752493@sss.pgh.pa.us> (raw)
In-Reply-To: <20191114.142803.1155800695686449695.horikyota.ntt@gmail.com>
References: <20191002220914.GS6962@tamriel.snowman.net>
<26926.1570058600@sss.pgh.pa.us>
<20191002232402.GT6962@tamriel.snowman.net>
<20191114.142803.1155800695686449695.horikyota.ntt@gmail.com>
Kyotaro Horiguchi <horikyota.ntt@gmail.com> writes:
> At Wed, 2 Oct 2019 19:24:02 -0400, Stephen Frost <sfrost@snowman.net> wrote in
>> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>>> Yeah, those messages are all pretty ancient, from when WAL was new and not
>>> to be trusted much. Perhaps the thing to do is move the existing info
>>> into DETAIL and make the primary message be something like "reached
>>> apparent end of WAL stream".
>> Yes, +1 on that.
> What do you think about this?
It seems overcomplicated. Why do you need to reach into
emode_for_corrupt_record's private state? I think we could just
change the message text without that, and leave the emode
machinations as-is.
I don't understand the restriction to "if (RecPtr == InvalidXLogRecPtr)"
either? Maybe that's fine but the comment fails to explain it.
Another point is that, as the comment for emode_for_corrupt_record
notes, we don't really want to consider that we've hit end-of-WAL
when reading any source except XLOG_FROM_PG_WAL. So I think the
change of message ought to include a test of the source, but this
doesn't.
Also, the business with an "operation" string violates the message
translatability guideline about "don't assemble a message out of
phrases". If we want to have that extra detail, it's better just
to make three separate ereport() calls with separately translatable
messages.
Also, it seems wrong that the page TLI check, just below, is where
it is and isn't part of the main set of page header sanity checks.
That's sort of unrelated to this patch, except not really, because
shouldn't a failure of that test also be treated as an "end of WAL"
condition?
regards, tom lane
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: tgl@sss.pgh.pa.us, horikyota.ntt@gmail.com, sfrost@snowman.net, zeleny.ales@gmail.com
Subject: Re: Wall shiping replica failed to recover database with error: invalid contrecord length 1956 at FED/38FFE208
In-Reply-To: <30577.1573752493@sss.pgh.pa.us>
References: <20191002220914.GS6962@tamriel.snowman.net> <26926.1570058600@sss.pgh.pa.us> <20191002232402.GT6962@tamriel.snowman.net> <20191114.142803.1155800695686449695.horikyota.ntt@gmail.com> <30577.1573752493@sss.pgh.pa.us>
* 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