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

From Jim Nasby
Subject Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );
Date
Msg-id 5519D126.9050104@BlueTreble.com
Whole thread Raw
In response to Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Responses Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
List pgsql-hackers
On 3/27/15 2:23 PM, Fabrízio de Royes Mello wrote:
> Hi all,
>
> I'm tweaking some autovacuum settings in a table with high write usage
> but with ALTER TABLE .. SET ( .. ) this task was impossible, so I did a
> catalog update  (pg_class) to change reloptions.
>
> Maybe it's a stupid doubt, but why we need to get an AccessExclusiveLock
> on relation to set reloptions if we just touch in pg_class tuples
> (RowExclusiveLock) ?

For a very long time catalog access was not MVCC safe. I think that's 
been changed, so at this point it may be OK to relax the lock, at least 
in the case of autovac settings. There may well be other settings in 
there where it would not be safe.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Implementing a join algorithm in Postgres
Next
From: David Fetter
Date:
Subject: Re: Bug fix for missing years in make_date()