Re: Support for REINDEX CONCURRENTLY - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Support for REINDEX CONCURRENTLY
Date
Msg-id CAHGQGwFti8x__Wa5Vf7dagDe29t0+FOzFK3=a2epuQ9O4BzOMw@mail.gmail.com
Whole thread Raw
In response to Re: Support for REINDEX CONCURRENTLY  (Andres Freund <andres@anarazel.de>)
Responses Re: Support for REINDEX CONCURRENTLY  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Thu, Mar 28, 2013 at 10:34 AM, Andres Freund <andres@anarazel.de> wrote:
> On 2013-03-28 10:18:45 +0900, Michael Paquier wrote:
>> On Thu, Mar 28, 2013 at 3:12 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> Since we call relation_open() with lockmode, ISTM that we should also call
>> > relation_close() with the same lockmode instead of NoLock. No?
>> >
>> Agreed on that.
>
> That doesn't really hold true generally, its often sensible to hold the
> lock till the end of the transaction, which is what not specifying a
> lock at close implies.

You're right. Even if we release the lock there, the lock is taken again soon
and hold till the end of the transaction. There is no need to release the lock
there.

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [COMMITTERS] pgsql: Allow external recovery_config_directory
Next
From: Heikki Linnakangas
Date:
Subject: Re: [COMMITTERS] pgsql: Allow external recovery_config_directory