pgsql: Fix traversing to the deleted GIN page via downlink

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix traversing to the deleted GIN page via downlink
Date: 2019-11-19 21:08:45
Message-ID: E1iXAjt-0001cC-HP@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix traversing to the deleted GIN page via downlink

Current GIN code appears to don't handle traversing to the deleted page via
downlink. This commit fixes that by stepping right from the delete page like
we do in nbtree.

This commit also fixes setting 'deleted' flag to the GIN pages. Now other page
flags are not erased once page is deleted. That helps to keep our assertions
true if we arrive deleted page via downlink.

Discussion: https://postgr.es/m/CAPpHfdvMvsw-NcE5bRS7R1BbvA4BxoDnVVjkXC5W0Czvy9LVrg%40mail.gmail.com
Author: Alexander Korotkov
Reviewed-by: Peter Geoghegan
Backpatch-through: 9.4

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d5ad7a09afd066dce423f282bb2b338f48614d32

Modified Files
--------------
src/backend/access/gin/ginbtree.c | 7 -------
src/backend/access/gin/gindatapage.c | 3 +++
src/backend/access/gin/ginvacuum.c | 2 +-
src/backend/access/gin/ginxlog.c | 2 +-
4 files changed, 5 insertions(+), 9 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2019-11-19 21:08:49 pgsql: Revise GIN README
Previous Message Tom Lane 2019-11-19 19:43:52 pgsql: Doc: clarify use of RECURSIVE in WITH.