]> granicus.if.org Git - postgresql/commit
Use full 64-bit XID for checking if a deleted GiST page is old enough.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 24 Jul 2019 17:24:07 +0000 (20:24 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 24 Jul 2019 17:24:07 +0000 (20:24 +0300)
commit6655a7299d835dea9e8e0ba69cc5284611b96f29
tree3ef87e2ae30a08c0ea9cb3413443624352cdc661
parent9eb5607e69933f0a88b6774d1ba728f27afdbd3d
Use full 64-bit XID for checking if a deleted GiST page is old enough.

Otherwise, after a deleted page gets even older, it becomes unrecyclable
again. B-tree has the same problem, and has had since time immemorial,
but let's at least fix this in GiST, where this is new.

Backpatch to v12, where GiST page deletion was introduced.

Reviewed-by: Andrey Borodin
Discussion: https://www.postgresql.org/message-id/835A15A5-F1B4-4446-A711-BF48357EB602%40yandex-team.ru
src/backend/access/gist/gistutil.c
src/backend/access/gist/gistvacuum.c
src/backend/access/gist/gistxlog.c
src/backend/access/rmgrdesc/gistdesc.c
src/backend/utils/time/snapmgr.c
src/include/access/gist.h
src/include/access/gist_private.h
src/include/access/gistxlog.h
src/include/utils/snapmgr.h