Incorrect comment in tablecmds.c

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Incorrect comment in tablecmds.c
Date: 2014-10-23 09:29:07
Message-ID: 5448CA63.80602@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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);

Thanks,

Best regards,
Etsuro Fujita

Attachment Content-Type Size
comment-fix.patch text/x-diff 756 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2014-10-23 09:34:04 Re: idea: allow AS label inside ROW constructor
Previous Message Heikki Linnakangas 2014-10-23 08:09:16 Re: BUG: *FF WALs under 9.2 (WAS: .ready files appearing on slaves)