Question about BarrierAttach spinlock

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема Question about BarrierAttach spinlock
Дата
Msg-id CAE-h2TrQ6A51Dbyf+advNZP6wsbb+ERZWm6bNm=L9pN6aGVE4A@mail.gmail.com
обсуждение исходный текст
Ответы Re: Question about BarrierAttach spinlock  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
Hackers,

In src/backend/storage/ipc/barrier.c, BarrierAttach
goes to the bother of storing the phase before
releasing the spinlock, and then returns the phase.

In nodeHash.c, ExecHashTableCreate ignores the
phase returned by BarrierAttach, and then immediately
calls BarrierPhase to get the phase that it just ignored.
I don't know that there is anything wrong with this, but
if the phase can be retrieved after the spinlock is
released, why hold the spinlock extra long in
BarrierAttach?

Just asking....

mark



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Memory bug in dsnowball_lexize
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Is it safe to ignore the return value of SPI_finish and SPI_execute?