Re: Re: We have got a serious problem with pg_clog/WAL synchronization

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: We have got a serious problem with pg_clog/WAL synchronization
Дата
Msg-id 182.1092330826@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Why hash indexes suck  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Re: We have got a serious problem with pg_clog/WAL synchronization  (Kenneth Marshall <ktm@it.is.rice.edu>)
Список pgsql-hackers
Kenneth Marshall <ktm@is.rice.edu> writes:
> On Thu, Aug 12, 2004 at 09:58:56AM -0400, Tom Lane wrote:
>> How would a read-only action work to block out the checkpoint?

> The latch+version number is use by the checkpoint process. The
> other processes can do a read of the latch to determine if it has
> been set. This does not cause a cache invalidation hit. If the
> latch is set, the competing processes read until it has been
> cleared and the version updated. This makes the general case of
> no checkpoint not incur a write and the consequent cache-line
> invalidation and reload by all processors on an SMP system.

Except that reading the latch and finding it clear offers no guarantee
that a checkpoint isn't about to start.  The problem is that we are
performing two separate actions (write a COMMIT xlog record and update
transaction status in clog) and we have to prevent a checkpoint from
starting in between those actions.  I don't see that there's any way to
do that with a read-only latch.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: We have got a serious problem with pg_clog/WAL synchronization
Следующее
От: "Robert E. Bruccoleri"
Дата:
Сообщение: Re: Regression failure with PostgreSQL 8beta1 and Intel