Content-Length: 277232 | pFad | https://github.com/postgrespro/postgres/commit/b107140804817cc30a4069b1bb5545aa3ea0ce6c

89 Fix page modification outside of critical section in GIN · postgrespro/postgres@b107140 · GitHub
Skip to content

Commit b107140

Browse files
committed
Fix page modification outside of critical section in GIN
By oversight 52ac6cd 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
1 parent 32ca32d commit b107140

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/access/gin/ginvacuum.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@ ginDeletePage(GinVacuumState *gvs, BlockNumber deleteBlkno, BlockNumber leftBlkn
153153
page = BufferGetPage(dBuffer);
154154
rightlink = GinPageGetOpaque(page)->rightlink;
155155

156-
/* For deleted page remember last xid which could knew its address */
157-
GinPageSetDeleteXid(page, ReadNewTransactionId());
158-
159156
/*
160157
* Any insert which would have gone on the leaf block will now go to its
161158
* right sibling.
@@ -168,6 +165,9 @@ ginDeletePage(GinVacuumState *gvs, BlockNumber deleteBlkno, BlockNumber leftBlkn
168165
page = BufferGetPage(lBuffer);
169166
GinPageGetOpaque(page)->rightlink = rightlink;
170167

168+
/* For deleted page remember last xid which could knew its address */
169+
GinPageSetDeleteXid(page, ReadNewTransactionId());
170+
171171
/* Delete downlink from parent */
172172
parentPage = BufferGetPage(pBuffer);
173173
#ifdef USE_ASSERT_CHECKING

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/postgrespro/postgres/commit/b107140804817cc30a4069b1bb5545aa3ea0ce6c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy