Re: TopoSort() fix

2019-07-03 Thread Rui Hai Jiang
Tom Lane wrote: > > Rui Hai Jiang writes: > > > I think I found an issue in the TopoSort() function. > > > > This indeed seems like a live bug introduced by a1c1af2a. > > Robert? > > This is pretty thoroughly swapped out of my head, but it l

Re: TopoSort() fix

2019-07-02 Thread Rui Hai Jiang
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? Regards, Ruihai On Tue, Jul 2, 2019 at 11:23 PM Tom Lane wrote: > Rui Hai Ji

TopoSort() fix

2019-07-02 Thread Rui Hai Jiang
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

Re: How to produce a Soft Block case of Deadlock Detection?

2019-06-19 Thread Rui Hai Jiang
I finally found this. https://www.postgresql.org/message-id/29104.1182785028%40sss.pgh.pa.us This is very useful to understand the Soft Block. On Wed, Jun 19, 2019 at 7:18 PM Rui Hai Jiang wrote: > Hello, hackers. > > Any body know how to produce a Soft Block case of Deadlock Detec

How to produce a Soft Block case of Deadlock Detection?

2019-06-19 Thread Rui Hai Jiang
Hello, hackers. Any body know how to produce a Soft Block case of Deadlock Detection? I have produced the Hard Block case, but can't produce the Soft Block case. I read the design: src/backend/storage/lmgr/README. It reads, "If a process A is behind a process B in some lock's wait queue, and

Is it possible and worthy to optimize scanRTEForColumn()?

2017-12-07 Thread Rui Hai Jiang
Hello, When I run a select query, e.g. select id from t, all columns in table "t" are checked to see if a column named "id" exists or not, and a Var is created for "id" if the column does exist. Function scanRTEForColumn() does this job. But I see in scanRTEForColumn(), the loop does not

RE: How is the PostgreSQL debuginfo file generated

2017-11-27 Thread Rui Hai Jiang
From: Tom Lane <t...@sss.pgh.pa.us> Sent: Friday, November 24, 2017 12:50:37 AM To: Rui Hai Jiang Cc: pgsql-hack...@postgresql.org Subject: Re: How is the PostgreSQL debuginfo file generated Rui Hai Jiang <ruihaiji...@msn.com> writes: > I’m wonderi