aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2021-05-14 15:08:02 -0700
committerPeter Geoghegan <pg@bowt.ie>2021-05-14 15:08:02 -0700
commit8f72bbac3e4b1d1be9598e8edb9353fa5dc48138 (patch)
tree7b6dda0536c0f770df0100c6e0980c38bef2b74c /src/backend/tcop/postgres.c
parentc3c35a733c77b298d3cf7e7de2eeb4aea540a631 (diff)
downloadpostgresql-8f72bbac3e4b1d1be9598e8edb9353fa5dc48138.tar.gz
postgresql-8f72bbac3e4b1d1be9598e8edb9353fa5dc48138.zip
Harden nbtree deduplication posting split code.
Add a defensive "can't happen" error to code that handles nbtree posting list splits (promote an existing assertion). This avoids a segfault in the event of an insertion of a newitem that is somehow identical to an existing non-pivot tuple in the index. An nbtree index should never have two index tuples with identical TIDs. This scenario is not particular unlikely in the event of any kind of corruption that leaves the index in an inconsistent state relative to the heap relation that is indexed. There are two known reports of preventable hard crashes. Doing nothing seems unacceptable given the general expectation that nbtree will cope reasonably well with corrupt data. Discussion: https://postgr.es/m/CAH2-Wz=Jr_d-dOYEEmwz0-ifojVNWho01eAqewfQXgKfoe114w@mail.gmail.com Backpatch: 13-, where nbtree deduplication was introduced.
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions