Re: Wrong usage of RelationNeedsWAL
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: noah@leadboat.com
Cc: pgsql-hackers@postgresql.org, andres@anarazel.de
Date: 2021-01-28T03:06:27Z
Lists: 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
Commits
-
Revive "snapshot too old" with wal_level=minimal and SET TABLESPACE.
- d798ea750d22 13.2 landed
- 7da83415e5bc 14.0 landed
-
Fix error with CREATE PUBLICATION, wal_level=minimal, and new tables.
- e8e3e67490f5 13.2 landed
- 360bd2321b1a 14.0 landed
-
Skip WAL for new relfilenodes, under wal_level=minimal.
- c6b92041d385 13.0 cited