Re: Is this a problem in GenericXLogFinish()?
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>, Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2023-10-10T19:57:35Z
Lists: pgsql-hackers
Attachments
- v3-0002-Assert-that-buffers-are-marked-dirty-before-XLogR.patch (text/x-patch) patch v3-0002
I committed and backported 0001 (the GenericXLogFinish() fix but not the Assert). Strangely I didn't see the -committers email come through yet. If anyone notices anything wrong, please let me know before the final v11 release. On Thu, 2023-09-28 at 12:05 -0700, Jeff Davis wrote: > Also, I ran into some problems with GIN that might require a bit more > refactoring in ginPlaceToPage(). Perhaps we could consider > REGBUF_NO_CHANGE a general bypass of the Assert(BufferIsDirty()), and > use it temporarily until we have a chance to analyze/refactor each of > the callers that need it. For the Assert, I have attached a new patch for v17. I changed the name of the flag to REGBUF_CLEAN_OK, because for some of the callsites it was not clear to me whether the page is always unchanged or sometimes unchanged. In other words, REGBUF_CLEAN_OK is a way to bypass the Assert for callsites where we either know that we actually want to register an unchanged page, or for callsites where we don't know if the page is changed or not. If we commit this, ideally someone would look into the places where REGBUF_CLEAN_OK is used and make sure that it's not a bug, and perhaps refactor so that it would benefit from the Assert. But refactoring those places is outside of the scope of this patch. It sounds like we have no intention to change the hash index code, so are we OK if this flag just lasts forever? Do you still think it offers a useful check? Regards, Jeff Davis
Commits
-
Fix inconsistency with replay of hash squeeze record for clean buffers
- f56a9def71bb 17.0 landed
-
Set LSN for wbuf in _hash_freeovflpage() iff wbuf is modified.
- aa5edbe379d6 17.0 landed
-
Fix an uninitialized access in hash_xlog_squeeze_page().
- f66fcc5cd616 17.0 landed
-
Use REGBUF_NO_CHANGE at one more place in the hash index.
- 861f86beea1c 17.0 landed
-
Assert that buffers are marked dirty before XLogRegisterBuffer().
- 00d7fb5e2e39 17.0 landed
-
Fix bug in GenericXLogFinish().
- 04f0baa85865 11.22 landed
- 6dbd01b9fdad 12.17 landed
- 469d367bee2f 13.13 landed
- 6615bb95af2d 14.10 landed
- b9bb02620d4b 15.5 landed
- b8963e8a2854 16.1 landed
- ef74c7197c04 17.0 landed
-
Improve hash index bucket split behavior.
- 6d46f4783efe 10.0 cited