Re: Wrong usage of RelationNeedsWAL

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: noah(at)leadboat(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org, andres(at)anarazel(dot)de
Subject: Re: Wrong usage of RelationNeedsWAL
Date: 2021-01-28 08:35:44
Message-ID: 20210128.173544.268859221066839810.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Wed, 27 Jan 2021 23:10:53 -0800, Noah Misch <noah(at)leadboat(dot)com> wrote in
> On Thu, Jan 28, 2021 at 12:06:27PM +0900, Kyotaro Horiguchi wrote:
> > At Wed, 27 Jan 2021 02:48:48 -0800, Noah Misch <noah(at)leadboat(dot)com> wrote in
> > > On Thu, Jan 21, 2021 at 01:23:36AM -0800, Noah Misch wrote:
> > > > On Thu, Jan 21, 2021 at 06:02:11PM +0900, Kyotaro Horiguchi wrote:
> > > > > Perhaps I'm missing something, but the patch doesn't pass the v5-0001
> > > > > test with wal_level=minimal?
> > > >
> > > > Correct. The case we must avoid is letting an old snapshot read an
> > > > early-pruned page without error. v5-0001 expects "ERROR: snapshot too old".
> > > > The patch suspends early pruning, so that error is not applicable.
>
> > I studied the sto feature further and concluded that the checker side
> > is fine that it always follow the chages of page-LSN.
> >
> > So what we can do for the issue is setting seemingly correct page LSN
> > at pruning or refrain from early-pruning while we are skipping
> > WAL. The reason I took the former is I thought that the latter might
> > be a problem since early-pruning would be postponed by a long-running
> > wal-skipping transaction.
>
> Yes, that's an accurate summary.
>
> > So the patch looks fine to me. The commit message mekes sense.
> >
> > However, is it ok that the existing tests (modules/snapshot_too_old)
> > fails when wal_level=minimal?
>
> That would not be okay, but I'm not seeing that. How did your setup differ
> from the following?

I did that with the following temp-conf. However, the tests succeeds
when I ran them again with the configuration. Sorry for the noise.

autovacuum = off
old_snapshot_threshold = 0
wal_level=minimal
max_wal_senders=0
wal_skip_threshold=0

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2021-01-28 09:04:28 Re: On login trigger: take three
Previous Message Peter Eisentraut 2021-01-28 08:18:15 Re: "has_column_privilege()" issue with attnums and non-existent columns