Re: lock mode for ControlFileLock which pg_start_backup uses

Поиск
Список
Период
Сортировка
От Takahiro Itagaki
Тема Re: lock mode for ControlFileLock which pg_start_backup uses
Дата
Msg-id 20100309164721.99CA.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответ на lock mode for ControlFileLock which pg_start_backup uses  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: lock mode for ControlFileLock which pg_start_backup uses  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
Fujii Masao <masao.fujii@gmail.com> wrote:

> Currently pg_start_backup() accesses the shared ControlFile
> by using ControlFileLock with LW_EXCLUSIVE lock mode. But
> since that access is read-only operation, LW_SHARED should
> be chosen instead of LW_EXCLUSIVE.

Almost all operations of ControlFileLock is in LW_EXCLUSIVE, but
there is one usage of LWLockConditionalAcquire(ControlFileLock, LW_SHARED)
in XLogNeedsFlush().

> The attached patch changes the lock mode which pg_start_backup()
> uses. Is it worth applying this patch?

I think the patch is reasonable to represent what we are doing,
even if there is no performance benefits from it.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center




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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: invalid UTF-8 via pl/perl
Следующее
От: Takahiro Itagaki
Дата:
Сообщение: Re: Visual Studio 2005, C-language function - avoiding hacks?