Re: another query optimization question

Поиск
Список
Период
Сортировка
От David Teran
Тема Re: another query optimization question
Дата
Msg-id 39D3D2E6-53D8-11D8-9392-000A95A6F0DC@cluster9.com
обсуждение исходный текст
Ответ на Re: another query optimization question  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: another query optimization question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Hi Tim,

you are right:


> Interesting.  I have recollected where we saw this before:
> http://archives.postgresql.org/pgsql-hackers/2003-11/msg01528.php
> Apparently gettimeofday() has a glitch on some BSD releases.  OS X is
> a BSD derivative and it's not so surprising if it has it too.
>
> May I suggest that you try the test program given here:
> http://archives.postgresql.org/pgsql-hackers/2003-11/msg01546.php
> and file a bug report with Apple if it shows any out-of-order results?
>
> I am fairly certain that I tried that test program when I devised it
> on my own OS X machine, and couldn't get a failure.  Maybe it depends
> on your hardware (hm, could dual CPUs be the key factor)?


p:~ david$ ./a.out
bogus tv_usec: 1075544305 -615731632, prev 1075544304 349672
out of order tv_sec: 1075544304 349759, prev 1075544305 -615731632
out of order tv_usec: 1075544305 339904, prev 1075544305 339905
bogus tv_usec: 1075544307 -615731811, prev 1075544306 349493
out of order tv_sec: 1075544306 349498, prev 1075544307 -615731811
out of order tv_usec: 1075544307 339442, prev 1075544307 339443
out of order tv_usec: 1075544308 339351, prev 1075544308 339352

This is a part of the output. Whats -very- interesting:

Apple provides a little tool that can enable / disable the l2 cache ...
one CPU of a dual CPU system on the fly. When i start the testapp with
two CPU's enabled i get this output here, when i turn off one CPU while
the app is still running the messages disappear as long as one CPU is
turned off. Reactivating the CPU again produces new error messages. I
checked the app on a single G4, no errors and i checked the app on a
dual G4, -not- G5 and also no error messages.

Do you remember where one can find a patch? Maybe its something one can
fix because parts of the OS from Apple are 'open source'.

Do you know if this bug makes a system unusable with PostgresSQL?

Regards David


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

Предыдущее
От: Kari Lavikka
Дата:
Сообщение: Re: Unique index and estimated rows.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: another query optimization question