From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix BRIN summarization concurrent with extension |
Date: | 2017-11-03 16:23:42 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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/[email protected]
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-11-03 16:35:03 | pgsql: Don't reset additional columns on subscriber to NULL on UPDATE |
Previous Message | Andres Freund | 2017-11-03 14:53:30 | Re: [HACKERS] pgsql: Fix freezing of a dead HOT-updated tuple |