pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Fix BRIN summarization concurrent with extension
6+ messages / 2 participants
[nested] [flat]
* pgsql: Fix BRIN summarization concurrent with extension
@ 2017-11-03 16:23 Alvaro Herrera <alvherre@alvh.no-ip.org>
2017-11-03 18:02 ` Re: pgsql: Fix BRIN summarization concurrent with extension Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 6+ messages in thread
From: Alvaro Herrera @ 2017-11-03 16:23 UTC (permalink / raw)
To: 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
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ec42a1dcb30de235b252f6d4972f2f2bdb2e47f2
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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgsql: Fix BRIN summarization concurrent with extension
2017-11-03 16:23 pgsql: Fix BRIN summarization concurrent with extension Alvaro Herrera <alvherre@alvh.no-ip.org>
@ 2017-11-03 18:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-11-03 18:52 ` Re: pgsql: Fix BRIN summarization concurrent with extension Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 1 reply; 6+ messages in thread
From: Tom Lane @ 2017-11-03 18:02 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: pgsql-committers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Fix BRIN summarization concurrent with extension
Buildfarm is entirely unhappy ...
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgsql: Fix BRIN summarization concurrent with extension
2017-11-03 16:23 pgsql: Fix BRIN summarization concurrent with extension Alvaro Herrera <alvherre@alvh.no-ip.org>
2017-11-03 18:02 ` Re: pgsql: Fix BRIN summarization concurrent with extension Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-11-03 18:52 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 6+ messages in thread
From: Alvaro Herrera @ 2017-11-03 18:52 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers
Tom Lane wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > Fix BRIN summarization concurrent with extension
>
> Buildfarm is entirely unhappy ...
Will fix shortly.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix BRIN summarization concurrent with extension
@ 2017-11-03 16:23 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 6+ messages in thread
From: Alvaro Herrera @ 2017-11-03 16:23 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix BRIN summarization concurrent with extension
@ 2017-11-03 16:23 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 6+ messages in thread
From: Alvaro Herrera @ 2017-11-03 16:23 UTC (permalink / raw)
To: 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
------
REL9_6_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/bd8e2b3cf4cfe5f26ed314af662ef988b4cfad4b
Modified Files
--------------
src/backend/access/brin/brin.c | 57 ++++++++++++++++++++++++++++++++++++------
1 file changed, 49 insertions(+), 8 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix BRIN summarization concurrent with extension
@ 2017-11-03 16:23 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 6+ messages in thread
From: Alvaro Herrera @ 2017-11-03 16:23 UTC (permalink / raw)
To: 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
------
REL9_5_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/cf0612aa2c8fdc54bb98a13ef839f43cef5eadc5
Modified Files
--------------
src/backend/access/brin/brin.c | 57 ++++++++++++++++++++++++++++++++++++------
1 file changed, 49 insertions(+), 8 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2017-11-03 18:52 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03 16:23 pgsql: Fix BRIN summarization concurrent with extension Alvaro Herrera <alvherre@alvh.no-ip.org>
2017-11-03 18:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-11-03 18:52 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2017-11-03 16:23 pgsql: Fix BRIN summarization concurrent with extension Alvaro Herrera <alvherre@alvh.no-ip.org>
2017-11-03 16:23 pgsql: Fix BRIN summarization concurrent with extension Alvaro Herrera <alvherre@alvh.no-ip.org>
2017-11-03 16:23 pgsql: Fix BRIN summarization concurrent with extension Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox