forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8ce29bb

Amit Kapila
Fix the buffer release order for parallel index scans.
During parallel index scans, if the current page to be read is deleted, weskip it and try to get the next page for a scan without releasing the bufferlock on the current page. To get the next page, sometimes it needs to waitfor another process to complete its scan and advance it to the next page.Now, it is quite possible that the master backend has errored out beforeadvancing the scan and issued a termination signal for all workers. Theworkers failed to notice the termination request during wait because theinterrupts are held due to buffer lock on the previous page. This lead toall workers being stuck.The fix is to release the buffer lock on current page before trying to getthe next page. We are already doing same in backward scans, but missedit for forward scans.Reported-by: Victor YegorovBug: 15290Diagnosed-by: Thomas Munro and Amit KapilaAuthor: Amit KapilaReviewed-by: Thomas MunroTested-By: Thomas Munro and Victor YegorovBackpatch-through: 10 where parallel index scans were introducedDiscussion:https://postgr.es/m/153228422922.1395.1746424054206154747@wrigleys.postgresql.org1 parent39d51fe commit8ce29bb
1 file changed
+4
-2
lines changedLines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1497 | 1497 |
| |
1498 | 1498 |
| |
1499 | 1499 |
| |
| 1500 | + | |
1500 | 1501 |
| |
1501 | 1502 |
| |
1502 | 1503 |
| |
1503 |
| - | |
1504 | 1504 |
| |
1505 | 1505 |
| |
1506 | 1506 |
| |
1507 | 1507 |
| |
1508 | 1508 |
| |
| 1509 | + | |
1509 | 1510 |
| |
1510 |
| - | |
| 1511 | + | |
| 1512 | + | |
1511 | 1513 |
| |
1512 | 1514 |
| |
1513 | 1515 |
| |
|
0 commit comments
Comments
(0)