Re: Wrong usage of RelationNeedsWAL - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: Wrong usage of RelationNeedsWAL
Date
Msg-id 20210128.120627.428085297656501787.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: Wrong usage of RelationNeedsWAL  (Noah Misch <noah@leadboat.com>)
Responses Re: Wrong usage of RelationNeedsWAL  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
At Wed, 27 Jan 2021 02:48:48 -0800, Noah Misch <noah@leadboat.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 think the attached version is ready.  The changes since v6nm are cosmetic:
> 
> - Wrote log messages
> - Split into two patches, since the user-visible bugs are materially different
> - Fixed typos
> - Ran perltidy
> 
> Is it okay if I push these on Saturday, or would you like more time to
> investigate?

Thank you for the new version.

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.

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?

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Paul Martinez
Date:
Subject: [PATCH] pg_hba.conf error messages for logical replication connections
Next
From: Bharath Rupireddy
Date:
Subject: Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax