forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcb44a83
committed
Fix parallel BRIN builds with synchronized scans
The brinbuildCallbackParallel callback used by parallel BRIN builds didnot consider that the parallel table scans may be synchronized, startingfrom an arbitrary block and then wrap around.If this happened and the scan actually did wrap around, tuples from thebeginning of the table were added to the last range produced by the sameworker. The index would be missing range at the beginning of the table,while the last range would be too wide. This would not produce incorrectquery results, but it'd be less efficient.Fixed by checking for both past and future ranges in the callback. Theworker may produce multiple summaries for the same page range, but theleader will merge them as if the summaries came from different workers.Discussion:https://postgr.es/m/c2ee7d69-ce17-43f2-d1a0-9811edbda6e6%40enterprisedb.com1 parent6c63bcb commitcb44a83
1 file changed
+12
-4
lines changedLines changed: 12 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1040 | 1040 |
| |
1041 | 1041 |
| |
1042 | 1042 |
| |
1043 |
| - | |
| 1043 | + | |
1044 | 1044 |
| |
1045 | 1045 |
| |
1046 | 1046 |
| |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
1047 | 1052 |
| |
1048 |
| - | |
| 1053 | + | |
| 1054 | + | |
1049 | 1055 |
| |
1050 | 1056 |
| |
1051 | 1057 |
| |
1052 |
| - | |
| 1058 | + | |
1053 | 1059 |
| |
1054 | 1060 |
| |
1055 | 1061 |
| |
| |||
1201 | 1207 |
| |
1202 | 1208 |
| |
1203 | 1209 |
| |
1204 |
| - | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
1205 | 1213 |
| |
1206 | 1214 |
| |
1207 | 1215 |
| |
|
0 commit comments
Comments
(0)