Re: TopoSort() fix

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Rui Hai Jiang <ruihaij@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-07-03T07:11:31Z
Lists: pgsql-hackers
On Wed, Jul 03, 2019 at 10:41:59AM +0800, Rui Hai Jiang wrote:
> Could the attached patch fix this issue? Or does any one else plan to fix
> it?
> 
> If people are busy and have not  time, I can go ahead to fix it.  To fix
> this issue, do we need a patch for each official branch?

Only a committer could merge any fix you produce.  What you have sent
looks fine to me, so let's wait for Robert, who has visiblu broken
this part to comment.  Back-patched versions are usually taken care of
by the committer merging the fix, and by experience it is better to
agree about the shape of a patch on HEAD before working on other
branches.  Depending on the review done, the patch's shape may change
slightly...
--
Michael

Commits

  1. Add an isolation test to exercise parallel-worker deadlock resolution.

  2. Mark advisory-lock functions as parallel restricted, not parallel unsafe.

  3. Fix busted logic for parallel lock grouping in TopoSort().