Hi, hackers!

There is bunch of code in current GiST implementation checking for 
GistTupleIsInvalid(). PostgreSQL since 9.1 do not create invalid 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 scan invalid tuples are treated as 
unconditional match. Any update in subtree of such tuple will error with 
errhint("Please REINDEX 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-166b41d07...@yandex-team.ru

Reply via email to