postgresql/src/backend
Tomas Vondra cb44a8345e Fix parallel BRIN builds with synchronized scans
The brinbuildCallbackParallel callback used by parallel BRIN builds did
not consider that the parallel table scans may be synchronized, starting
from an arbitrary block and then wrap around.

If this happened and the scan actually did wrap around, tuples from the
beginning of the table were added to the last range produced by the same
worker. The index would be missing range at the beginning of the table,
while the last range would be too wide. This would not produce incorrect
query results, but it'd be less efficient.

Fixed by checking for both past and future ranges in the callback. The
worker may produce multiple summaries for the same page range, but the
leader will merge them as if the summaries came from different workers.

Discussion: https://postgr.es/m/c2ee7d69-ce17-43f2-d1a0-9811edbda6e6%40enterprisedb.com
2023-12-30 23:17:01 +01:00
..
access Fix parallel BRIN builds with synchronized scans 2023-12-30 23:17:01 +01:00
archive Redesign archive modules 2023-02-17 14:26:42 +09:00
backup Fix incorrect data type choices in some read and write calls. 2023-12-27 11:02:53 -05:00
bootstrap Remove distprep 2023-11-06 15:18:04 +01:00
catalog Make all Perl warnings fatal 2023-12-29 18:20:00 +01:00
commands Fix bugs in manipulation of large objects. 2023-12-15 13:55:05 -05:00
executor Fix BEFORE ROW trigger handling in cross-partition MERGE update. 2023-12-21 12:55:22 +00:00
foreign Improve "user mapping not found" error message 2023-11-30 05:34:28 +01:00
jit Make ResourceOwners more easily extensible. 2023-11-08 13:30:50 +02:00
lib Make binaryheap available to frontend code. 2023-09-18 12:18:33 -07:00
libpq Fix bugs in manipulation of large objects. 2023-12-15 13:55:05 -05:00
main Remove obsolete defense against strxfrm() bugs. 2023-04-20 13:20:14 +12:00
nodes Make all Perl warnings fatal 2023-12-29 18:20:00 +01:00
optimizer Make replace_relid() leave argument unmodified 2023-12-27 03:57:57 +02:00
parser Make all Perl warnings fatal 2023-12-29 18:20:00 +01:00
partitioning Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
po Translation updates 2023-08-07 12:39:30 +02:00
port Remove distprep 2023-11-06 15:18:04 +01:00
postmaster Don't send "cannot connect" errors on invalid startup packet 2023-12-30 22:18:54 +02:00
regex Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
replication Fix incorrect format placeholders 2023-12-27 17:39:10 +01:00
rewrite Add TupleDescGetDefault() 2023-09-27 18:52:40 +01:00
snowball Make all Perl warnings fatal 2023-12-29 18:20:00 +01:00
statistics Retire MemoryContextResetAndDeleteChildren() macro. 2023-11-15 13:42:30 -06:00
storage Make all Perl warnings fatal 2023-12-29 18:20:00 +01:00
tcop Add support for REINDEX in event triggers 2023-12-04 09:53:49 +09:00
tsearch Limit to_tsvector_byid's initial array allocation to something sane. 2023-09-25 11:50:28 -04:00
utils Minor cleanup of the BRIN parallel build code 2023-12-30 23:15:04 +01:00
.gitignore
common.mk
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
meson.build Remove MSVC scripts 2023-12-20 09:44:37 +09:00
nls.mk Remove distprep 2023-11-06 15:18:04 +01:00