Re: Strange Windows problem, lock_timeout test request

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Strange Windows problem, lock_timeout test request
Дата
Msg-id 4639.1363615746@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Strange Windows problem, lock_timeout test request  (Boszormenyi Zoltan <zb@cybertec.at>)
Ответы Re: Strange Windows problem, lock_timeout test request  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Boszormenyi Zoltan <zb@cybertec.at> writes:
> How about the attached patch over current GIT? In other words,
> why I am wrong with this idea?

Because it's wrong.  Removing "volatile" means that the compiler is
permitted to optimize away stores (and fetches!) on the basis of their
being unnecessary according to straight-line analysis of the code.
Write barriers don't fix that, they only say that stores that the
compiler chooses to issue at all have to be ordered a certain way.

(There are also pretty serious questions as to whether pg_write_barrier
can be trusted yet, but it doesn't really matter here.  Removing
volatile would break the code.)
        regards, tom lane



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Enabling Checksums
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: in-catalog Extension Scripts and Control parameters (templates?)