Assert that buffers are marked dirty before XLogRegisterBuffer().
Jeff Davis <jdavis@postgresql.org>
Assert that buffers are marked dirty before XLogRegisterBuffer(). Enforce the rule from transam/README in XLogRegisterBuffer(), and update callers to follow the rule. Hash indexes sometimes register clean pages as a part of the locking protocol, so provide a REGBUF_NO_CHANGE flag to support that use. Discussion: https://postgr.es/m/c84114f8-c7f1-5b57-f85a-3adc31e1a904@iki.fi Reviewed-by: Heikki Linnakangas
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/gin/ginbtree.c | modified | +6 −8 |
| src/backend/access/gin/gindatapage.c | modified | +6 −0 |
| src/backend/access/gin/ginentrypage.c | modified | +3 −0 |
| src/backend/access/gin/ginfast.c | modified | +3 −2 |
| src/backend/access/hash/hash.c | modified | +8 −3 |
| src/backend/access/hash/hashovfl.c | modified | +15 −6 |
| src/backend/access/transam/xloginsert.c | modified | +15 −1 |
| src/backend/storage/buffer/bufmgr.c | modified | +59 −0 |
| src/include/access/xloginsert.h | modified | +1 −0 |
| src/include/storage/bufmgr.h | modified | +2 −0 |
Discussion
- Is this a problem in GenericXLogFinish()? 64 messages · 2023-09-22 → 2024-04-11