Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. ); - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );
Date
Msg-id 20150804171552.GQ2441@postgresql.org
Whole thread Raw
In response to Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );  (Andres Freund <andres@anarazel.de>)
Responses Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );  (Michael Paquier <michael.paquier@gmail.com>)
Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Andres Freund wrote:
> On 2015-08-03 14:15:27 +0900, Michael Paquier wrote:

> > As long as this only applies on master, this may be fine... We could
> > basically pass a LOCKMASK to the multiple layers of tablecmds.c
> > instead of LOCKMODE to track all the locks that need to be taken, and
> > all the relations open during operations.
> 
> This sounds far too complicated to me. Just LockRelationOid() the
> relation with the appropriate level everytime you pass through the
> function?

That opens up for lock escalation and deadlocks, doesn't it?  You are
probably thinking that it's okay to ignore those but I don't necessarily
agree with that.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: patch: prevent user from setting wal_buffers over 2GB bytes
Next
From: Robert Haas
Date:
Subject: Re: track_commit_timestamp and COMMIT PREPARED