From: Jeff Davis <pgsql@j-davis.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Re: Probable bug with CreateFakeRelcacheEntry (now with reproducible test case)
Date: Thu, 13 Sep 2012 10:45:34 -0700
Message-ID: <1347558334.24686.27.camel@jdavis> (raw)
In-Reply-To: <CA+Tgmob7+KOgNoRVuW6XWQPb_p3Aa0zY+AHYHyzO3X8cuq4saQ@mail.gmail.com>
References: <1347327239.4161.20.camel@sussancws0025>
<1347491969.4161.63.camel@sussancws0025>
<CA+Tgmob7+KOgNoRVuW6XWQPb_p3Aa0zY+AHYHyzO3X8cuq4saQ@mail.gmail.com>
On Thu, 2012-09-13 at 12:39 -0400, Robert Haas wrote:
> On Wed, Sep 12, 2012 at 7:19 PM, Jeff Davis <pgsql@j-davis.com> wrote:
> > This bug seems particularly troublesome because the right fix would be
> > to include the relpersistence in the WAL records that need it. But that
> > can't be backported (right?).
>
> No, because if a WAL record was written at all, then by definition the
> table is RELPERSISTENCE_PERMANENT. So there's probably a localized
> fix.
Oh, of course (I was worried there for some reason). I suppose we just
need to set the relpersistence to permanent in CreateFakeRelcacheEntry,
kind of like ReadBufferWithoutRelcache.
And we should probably assert that both functions are only called during
recovery (though perhaps redundant for CreateFakeRelcacheEntry, which is
in xlogutils.c).
Trivial patch attached.
Regards,
Jeff Davis
Attachments:
fakerelcache.patch.gz (application/x-gzip, 626B) download
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-bugs@postgresql.org
Cc: pgsql@j-davis.com, robertmhaas@gmail.com
Subject: Re: Probable bug with CreateFakeRelcacheEntry (now with reproducible test case)
In-Reply-To: <1347558334.24686.27.camel@jdavis>
References: <1347327239.4161.20.camel@sussancws0025> <1347491969.4161.63.camel@sussancws0025> <CA+Tgmob7+KOgNoRVuW6XWQPb_p3Aa0zY+AHYHyzO3X8cuq4saQ@mail.gmail.com> <1347558334.24686.27.camel@jdavis>
* 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