mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +03:00
Fix locking problem in _hash_squeezebucket() / _hash_freeovflpage().
A bucket squeeze operation needs to lock each page of the bucket
before releasing the prior page, but the previous coding fumbled the
locking when freeing an overflow page during a bucket squeeze
operation. Commit 6d46f4783e
introduced this bug.
Amit Kapila, with help from Kuntal Ghosh and Dilip Kumar, after
an initial trouble report by Jeff Janes. Reviewed by me. I also
fixed a problem with a comment.
This commit is contained in:
@@ -314,7 +314,7 @@ extern OffsetNumber _hash_pgaddtup(Relation rel, Buffer buf,
|
||||
/* hashovfl.c */
|
||||
extern Buffer _hash_addovflpage(Relation rel, Buffer metabuf, Buffer buf, bool retain_pin);
|
||||
extern BlockNumber _hash_freeovflpage(Relation rel, Buffer ovflbuf, Buffer wbuf,
|
||||
bool wbuf_dirty, BufferAccessStrategy bstrategy);
|
||||
BufferAccessStrategy bstrategy);
|
||||
extern void _hash_initbitmap(Relation rel, HashMetaPage metap,
|
||||
BlockNumber blkno, ForkNumber forkNum);
|
||||
extern void _hash_squeezebucket(Relation rel,
|
||||
|
||||
Reference in New Issue
Block a user