Fix yet another crash in page split during GiST index creation.
authorHeikki Linnakangas <[email protected]>
Mon, 16 Dec 2019 11:57:41 +0000 (13:57 +0200)
committerHeikki Linnakangas <[email protected]>
Mon, 16 Dec 2019 11:57:41 +0000 (13:57 +0200)
commit741b884353e4803abc15d4392ad287b0d5953fc4
treed5504ba96f84461aa8ee79ca77f6a767e7be55d2
parent502423180a8cc9214861bffcb8405a42f146f160
Fix yet another crash in page split during GiST index creation.

Commit a7ee7c8513 fixed a bug in GiST page split during index creation,
where we failed to re-find the position of a downlink after the page
containing it was split. However, that fix was incomplete; the other call
to gistinserttuples() in the same function needs to also clear
'downlinkoffnum'.

Fixes bug #16134 reported by Alexander Lakhin, for real this time. The
previous fix was enough to fix the crash with the reproducer script for
bug #16162, but the original script for #16134 was still crashing.

Backpatch to v12, like the previous incomplete fix.

Discussion: https://www.postgresql.org/message-id/d869f537-abe4-d2ea-0510-38cd053f5152%40gmail.com
src/backend/access/gist/gist.c