TopoSort() fix
Rui Hai Jiang <ruihaij@gmail.com>
From: Rui Hai Jiang <ruihaij@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-07-02T14:47:32Z
Lists: pgsql-hackers
Attachments
- TopoSort.patch (application/octet-stream) patch
Hi Hackers,
I think I found an issue in the TopoSort() function.
As the comments say,
/* .....
* ...... If there are any other processes
* in the same lock group on the queue, set their number of
* beforeConstraints to -1 to indicate that they should be
emitted
* with their groupmates rather than considered separately.
*/
If the line "break;" exists, there is no chance to set beforeConstraints to
-1 for other processes in the same lock group.
So, I think we need delete the line "break;" . See the patch.
I just took a look, and I found all the following versions have this line .
postgresql-12beta2, postgresql-12beta1, postgresql-11.4,
postgresql-11.3,postgresql-11.0,
postgresql-10.9,postgresql-10.5, postgresql-10.0
Thanks,
Ruihai
Commits
-
Add an isolation test to exercise parallel-worker deadlock resolution.
- da9456d22a76 13.0 landed
-
Mark advisory-lock functions as parallel restricted, not parallel unsafe.
- 4886da832750 13.0 landed
-
Fix busted logic for parallel lock grouping in TopoSort().
- d933816c04c6 12.0 landed
- c3b613e1b0e5 9.6.15 landed
- af41ab50fdc5 10.10 landed
- 3420851a2c2d 13.0 landed
- 0dcb1c6c4874 11.5 landed