Re: cvs head initdb hangs on unixware

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ohp(at)pyrenet(dot)fr
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>, pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: cvs head initdb hangs on unixware
Date: 2008-12-09 17:03:00
Message-ID: 16881.1228842180@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ohp(at)pyrenet(dot)fr writes:
> On Tue, 9 Dec 2008, Tom Lane wrote:
>> Hmm, so the problem is in that second loop. The trick is to pick some
>> reasonably non-ugly code change that makes the problem go away.

> I tried that and moving leftok,rightok declaration outside the loop, and
> refactor the assignement code of leftok, rightok . nothing worked!

I was afraid of that. We'd need to look at the assembly code to be sure
(can you provide it?), but what I bet is happening is that the compiler
is looking at the leftnodeno/rightnodeno computations and thinking it can
optimize those by a strength-reduction method, failing to notice that
the loop isn't a simple scan on nodeno.

Now in that regard the logic isn't very much different from a binary
search, which we have lots of and those have always worked. So I'm
back to the theory that the goto inside the inner loop is probably
contributing to the confusion somehow.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Chernow 2008-12-09 17:06:53 Re: parallel restore vs. windows
Previous Message Kenneth Marshall 2008-12-09 16:52:56 Re: cvs head initdb hangs on unixware