Re: cvs head initdb hangs on unixware

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: cvs head initdb hangs on unixware
Дата
Msg-id 16881.1228842180@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: cvs head initdb hangs on unixware  (ohp@pyrenet.fr)
Список pgsql-hackers
ohp@pyrenet.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kenneth Marshall
Дата:
Сообщение: Re: cvs head initdb hangs on unixware
Следующее
От: Andrew Chernow
Дата:
Сообщение: Re: parallel restore vs. windows