[COMMITTERS] pgsql: Fix BRIN summarization concurrent with extension - Mailing list pgsql-committers

From Alvaro Herrera
Subject [COMMITTERS] pgsql: Fix BRIN summarization concurrent with extension
Date
Msg-id E1eAekw-00022s-Ip@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix BRIN summarization concurrent with extension

If a process is extending a table concurrently with some BRIN
summarization process, it is possible for the latter to miss pages added
by the former because the number of pages is computed ahead of time.

Fix by determining a fresh relation size after inserting the placeholder
tuple: any process that further extends the table concurrently will
update the placeholder tuple, while previous pages will be processed by
the heap scan.

Reported-by: Tomas Vondra
Reviewed-by: Tom Lane
Author: Álvaro Herrera
Discussion: https://postgr.es/m/083d996a-4a8a-0e13-800a-851dd09ad8cc@2ndquadrant.com
Backpatch-to: 9.5

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/37a856567c04cf48d38292afc487be5f2665c2a5

Modified Files
--------------
src/backend/access/brin/brin.c | 90 ++++++++++++++++++++++++++++--------------
1 file changed, 61 insertions(+), 29 deletions(-)


--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updatedtuple
Next
From: Peter Eisentraut
Date:
Subject: [COMMITTERS] pgsql: Don't reset additional columns on subscriber to NULL on UPDATE