Thread: pgsql: BRIN: Handle concurrent desummarization properly

pgsql: BRIN: Handle concurrent desummarization properly

From
Alvaro Herrera
Date:
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 <a.lubennikova@postgrespro.ru>
Diagnosed-By: Alexander Lakhin <exclusion@gmail.com>
Discussion: https://postgr.es/m/2588667e-d07d-7e10-74e2-7e1e46194491@postgrespro.ru
Backpatch: 9.5 - master

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/721ef4d28aae0afff6b714af9c545825f86a76da

Modified Files
--------------
src/backend/access/brin/brin_revmap.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)