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 03:06:27
Message-ID: 20210128.120627.428085297656501787.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-01-28 04:22:11 Re: Support ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION ... syntax
Previous Message Paul Martinez 2021-01-28 02:58:40 [PATCH] pg_hba.conf error messages for logical replication connections