TopoSort() fix

From: Rui Hai Jiang <ruihaij(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: TopoSort() fix
Date: 2019-07-02 14:47:32
Message-ID: CAEri+mLd3bpHLyW+a9pSe1y=aEkeuJpwBSwvo-+m4n7-ceRmXw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
TopoSort.patch application/octet-stream 354 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-07-02 14:50:02 Re: Hash join explain is broken
Previous Message Paul Ramsey 2019-07-02 14:46:13 Re: Optimize partial TOAST decompression