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

From Michael Paquier
Subject Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );
Date
Msg-id CAB7nPqQ-wVjUvrgKnL3Om=G-i4hsiUwsP+264duC3fGKW0rTcw@mail.gmail.com
Whole thread Raw
In response to Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
List pgsql-hackers
On Tue, Aug 4, 2015 at 9:12 AM, Fabrízio de Royes Mello
<fabriziomello@gmail.com> wrote:
> Are you sure we need to do all this changes just to check the highest
> locklevel based on the reloptions?

Well, by looking at the code that's what it looks as. That's a large
change not that straight-forward.

> Or I misunderstood the whole thing?

No I think we are on the same page.

> Maybe we just check the DoLockModeConflict in the new method
> GetReloptionsLockLevel and if true then fallback to AccessExclusiveLock (as
> Michael suggested in a previous email).

Honestly that's what I would suggest for this patch, and also fix the
existing problem of tablecmds.c that does the same assumption. It
seems saner to me for now than adding a whole new level of routines
and wrappers, and your patch has IMO great value when each ALTER
COMMAND is kicked individually.
--
Michael



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Transactions involving multiple postgres foreign servers
Next
From: Robert Haas
Date:
Subject: Re: buffer locking fix for lazy_scan_heap