Re: [HACKERS] Locking for Rename To new_name works differently for different objects

2014-10-15 Thread Amit Kapila
On Wed, Oct 15, 2014 at 9:34 PM, Robert Haas wrote: > On Wed, Oct 15, 2014 at 10:04 AM, Tom Lane wrote: > > Amit Kapila writes: > >> I have observed that for renaming some of the objects > >> AccessExclusiveLock is taken on object whereas for > >> other kind of objects no lock is taken on object

Re: [HACKERS] Locking for Rename To new_name works differently for different objects

2014-10-15 Thread Robert Haas
On Wed, Oct 15, 2014 at 10:04 AM, Tom Lane wrote: > Amit Kapila writes: >> I have observed that for renaming some of the objects >> AccessExclusiveLock is taken on object whereas for >> other kind of objects no lock is taken on object before >> renaming the object. > > The usual theory for DDL up

Re: [HACKERS] Locking for Rename To new_name works differently for different objects

2014-10-15 Thread Tom Lane
Amit Kapila writes: > I have observed that for renaming some of the objects > AccessExclusiveLock is taken on object whereas for > other kind of objects no lock is taken on object before > renaming the object. The usual theory for DDL updates of all types (not just rename) is that an explicit loc