Hi, hackers!
There is bunch of code in current GiST implementation checking for GistTupleIsInvalid(). PostgreSQL since 9.1 do not
createinvalid tuples. Should we support this tuples forever?
Invalid tuples were created in case of crash during GiST page split. They were used as a recovery measure. During index
scaninvalid tuples are treated as unconditional match. Any update in subtree of such tuple will error with
errhint("PleaseREINDEX it."). Any VACUUM will log same complaint (but succeed).
I think that there are two options:
1. Bold one: just assume that there are no more invalid tuples.
2. For v12 raise the severity to ERROR on any encounter, then goto option 1 for vNext
What is the purpose of dropping invalid tuples?
1. Make code cleaner
2. Free some spare bytes in t_tid for advancing GiST (for example, see my other patch on GiST intrapage indexing [0] )
Best regards, Andrey Borodin.
[0] https://www.postgresql.org/message-id/7780A07B-4D04-41E2-B228-166B41D07EEE@yandex-team.ru