Re: GiST VACUUM - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: GiST VACUUM
Date
Msg-id 36666F0F-F00A-4B44-97F9-F65223CA19CA@yandex-team.ru
Whole thread Raw
In response to Re: GiST VACUUM  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: GiST VACUUM
List pgsql-hackers

> 21 марта 2019 г., в 2:30, Heikki Linnakangas <hlinnaka@iki.fi> написал(а):
> one remaining issue that needs to be fixed:
>
> During Hot Standby, the B-tree code writes a WAL reord, when a deleted
> page is recycled, to prevent the deletion from being replayed too early
> in the hot standby. See _bt_getbuf() and btree_xlog_reuse_page(). I
> think we need to do something similar in GiST.
>
> I'll try fixing that tomorrow, unless you beat me to it. Making the
> changes is pretty straightforward, but it's a bit cumbersome to test.

I've tried to deal with it and stuck... I think we should make B-tree WAL record for this shared, remove BlockNumber
andother unused stuff, leaving just xid and db oid. 
And reuse this record for B-tree, GiST and GIN (yeah, it is not checking for that conflict).

Though, I'm not sure it is important for GIN. Scariest thing that can happen: it will return same tid twice. But it is
doingbitmap scan, you cannot return same bit twice... 

Eventually, hash, spgist and others will have same thing too.

Best regards, Andrey Borodin.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #15572: Misleading message reported by "Drop function operation" on DB with functions having same name
Next
From: Heikki Linnakangas
Date:
Subject: Re: GiST VACUUM