Re: Incorrect comment in tablecmds.c

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Incorrect comment in tablecmds.c
Date: 2015-03-20 12:31:24
Message-ID: 20150320123124.GI6317@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 23, 2014 at 06:29:07PM +0900, Etsuro Fujita wrote:
> I don't think that the lock level mentioned in the following comment in
> MergeAttributes() in tablecmds.c is right, since that that function has
> opened the relation with ShareUpdateExclusiveLock, not with
> AccessShareLock. Patch attached.
>
> 1749 /*
> 1750 * Close the parent rel, but keep our AccessShareLock on it
> until xact
> 1751 * commit. That will prevent someone else from deleting or
> ALTERing
> 1752 * the parent before the child is committed.
> 1753 */
> 1754 heap_close(relation, NoLock);

Agreed, patch applied. Thanks.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2015-03-20 12:41:38 Re: "snapshot too large" error when initializing logical replication (9.4)
Previous Message Bruce Momjian 2015-03-20 12:13:16 Re: configure can't detect proper pthread flags