Re: Is this a problem in GenericXLogFinish()?
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, Jeff Davis <pgsql@j-davis.com>, Alexander Lakhin <exclusion@gmail.com>, Heikki Linnakangas <hlinnaka@iki.fi>,
pgsql-hackers@postgresql.org
Date: 2023-10-31T12:37:50Z
Lists: pgsql-hackers
On Mon, Oct 30, 2023 at 11:15 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > My understanding is the same. It is possible that my wording is not > clear. Let me try to clarify again, Michael asked: "do we need the > cleanup lock on the write buffer even if there are no tuples, and even > if primary bucket and the write bucket are the same?" My reading of > his question was do we need a cleanup lock even if the primary bucket > and write bucket are the same which means the write bucket will be the > first page in the chain and we need a cleanup lock on it. I think the > second condition (no tuples) seems irrelevant here as whether that is > true or false we need a cleanup lock. Ah, OK, I see now. I missed the fact that, per what Michael wrote, you were assuming the primary buffer and the write buffer were the same. In that case I agree, but the whole formulation seems backwards. I think the clearer way to say this is: we need a cleanup lock on the primary bucket page no matter what; and we need to write tuples into the write buffer if there are any tuples to write but not if there aren't. If the two buffers are the same then the requirements are added together. -- Robert Haas EDB: http://www.enterprisedb.com
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