lock mode for ControlFileLock which pg_start_backup uses

Fujii Masao <masao.fujii@gmail.com>

From: Fujii Masao <masao.fujii@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-03-09T01:33:42Z
Lists: pgsql-hackers

Attachments

Hi,

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.

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

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center