Content-Length: 259942 | pFad | http://github.com/postgrespro/postgres/commit/334445179c82ba304480ecbd00ae4237587e4baf

13 Reuse all-zero pages in GIN. · postgrespro/postgres@3344451 · GitHub
Skip to content

Commit 3344451

Browse files
committed
Reuse all-zero pages in GIN.
In GIN, an all-zeros page would be leaked forever, and never reused. Just add them to the FSM in vacuum, and they will be reinitialized when grabbed from the FSM. On master and 9.5, attempting to access the page's opaque struct also caused an assertion failure, although that was otherwise harmless. Reported by Jeff Janes. Backpatch to all supported versions.
1 parent 023430a commit 3344451

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/access/gin/ginvacuum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ ginvacuumcleanup(PG_FUNCTION_ARGS)
710710
LockBuffer(buffer, GIN_SHARE);
711711
page = (Page) BufferGetPage(buffer);
712712

713-
if (GinPageIsDeleted(page))
713+
if (PageIsNew(page) || GinPageIsDeleted(page))
714714
{
715715
Assert(blkno != GIN_ROOT_BLKNO);
716716
RecordFreeIndexPage(index, blkno);

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: http://github.com/postgrespro/postgres/commit/334445179c82ba304480ecbd00ae4237587e4baf

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy