Further harden nbtree posting split code.
authorPeter Geoghegan
Wed, 27 Oct 2021 19:10:43 +0000 (12:10 -0700)
committerPeter Geoghegan
Wed, 27 Oct 2021 19:10:43 +0000 (12:10 -0700)
commitf8cce4a3d88ccce830086bc80b563bd152f4955f
treeb1cfe6302e0832dfd1d5c8a41376932dadd65ff2
parentdd111887fbaead778d1077dfbc92b520a5188b51
Further harden nbtree posting split code.

Add more defensive checks around posting list split code.  These should
detect corruption involving duplicate table TIDs earlier and more
reliably than any existing check.

Follow up to commit 8f72bbac.

Discussion: https://postgr.es/m/CAH2-WzkrSY_kjyd1_M5xJK1uM0govJXMxPn8JUSvwcUOiHuWVw@mail.gmail.com
Backpatch: 13-, where nbtree deduplication was introduced.
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtsearch.c