mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-06 12:19:20 +02:00
Fix page modification outside of critical section in GIN
By oversight 52ac6cd2d0
makes ginDeletePage() sets pd_prune_xid of page to be
deleted before entering the critical section. It appears that only versions 11
and later were affected by this oversight.
Backpatch-through: 11
This commit is contained in:
parent
ca05fa5375
commit
a64e7e05a4
@ -153,9 +153,6 @@ ginDeletePage(GinVacuumState *gvs, BlockNumber deleteBlkno, BlockNumber leftBlkn
|
||||
page = BufferGetPage(dBuffer);
|
||||
rightlink = GinPageGetOpaque(page)->rightlink;
|
||||
|
||||
/* For deleted page remember last xid which could knew its address */
|
||||
GinPageSetDeleteXid(page, ReadNewTransactionId());
|
||||
|
||||
/*
|
||||
* Any insert which would have gone on the leaf block will now go to its
|
||||
* right sibling.
|
||||
@ -168,6 +165,9 @@ ginDeletePage(GinVacuumState *gvs, BlockNumber deleteBlkno, BlockNumber leftBlkn
|
||||
page = BufferGetPage(lBuffer);
|
||||
GinPageGetOpaque(page)->rightlink = rightlink;
|
||||
|
||||
/* For deleted page remember last xid which could knew its address */
|
||||
GinPageSetDeleteXid(page, ReadNewTransactionId());
|
||||
|
||||
/* Delete downlink from parent */
|
||||
parentPage = BufferGetPage(pBuffer);
|
||||
#ifdef USE_ASSERT_CHECKING
|
||||
|
Loading…
Reference in New Issue
Block a user