]> 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:25:22 +0000 (20:25 +0300)
commitfb5344c969af77bb78bc2a643fb75b9f8fea72dd
treebd4e4af8e04137ff40c32024ea55b53031852b62
parente2e992c93145cfc0e3563fb84efd25b390a84bb9
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