lock mode for ControlFileLock which pg_start_backup uses

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: lock mode for ControlFileLock which pg_start_backup uses
Date: 2010-03-09 01:33:42
Message-ID: 3f0b79eb1003081733j33223935he59f015162a21a51@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
lockmode_v1.patch text/x-patch 834 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2010-03-09 02:52:57 Re: invalid UTF-8 via pl/perl
Previous Message Bruce Momjian 2010-03-09 01:10:38 Re: Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint