Re: 'COPY ... FROM' inserts to btree, blocks on buffer writeout

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 'COPY ... FROM' inserts to btree, blocks on buffer writeout
Дата
Msg-id 8532.1104778518@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 'COPY ... FROM' inserts to btree, blocks on buffer writeout  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:
> I think that it would work for BufferAlloc to share-lock the victim
> buffer before calling FlushBuffer; we'd have to add a bool parameter to
> FlushBuffer telling it the lock was already acquired.

I've applied a patch for this.

> BTW, it looks to me like this deadlock potential has existed at least
> since 7.0.  I seem to recall one or two reports of unexplainable
> apparent deadlocks, which perhaps are now explained.

On closer investigation the deadlock does not seem to exist in 7.4 and
before, because BufferReplace didn't acquire the buffer sharelock.
(There is a comment in the 7.4 code claiming that we didn't need to,
but I'm unconvinced that it's correct...)
        regards, tom lane


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

Предыдущее
От: Roland Volkmann
Дата:
Сообщение: Re: PostgreSQL 8.0.0 Release Candidate 3
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: TSearch still in contrib?