BRIN: Handle concurrent desummarization properly
authorAlvaro Herrera <[email protected]>
Wed, 12 Aug 2020 19:33:36 +0000 (15:33 -0400)
committerAlvaro Herrera <[email protected]>
Wed, 12 Aug 2020 19:33:36 +0000 (15:33 -0400)
commit7a3c261fbbb427ffa2ee9223728e811556284a6e
tree25e68247ba05530fc8dc78a1a44ad11a9b75f6d6
parent03f5894b35c044f9b261bd00822ae4f009004871
BRIN: Handle concurrent desummarization properly

If a page range is desummarized at just the right time concurrently with
an index walk, BRIN would raise an error indicating index corruption.
This is scary and unhelpful; silently returning that the page range is
not summarized is sufficient reaction.

This bug was introduced by commit 975ad4e602ff as additional protection
against a bug whose actual fix was elsewhere.  Backpatch equally.

Reported-By: Anastasia Lubennikova <[email protected]>
Diagnosed-By: Alexander Lakhin <[email protected]>
Discussion: https://postgr.es/m/2588667e-d07d-7e10-74e2-7e1e46194491@postgrespro.ru
Backpatch: 9.5 - master
src/backend/access/brin/brin_revmap.c