Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock
Date
Msg-id 19938.1249654219@sss.pgh.pa.us
Whole thread Raw
In response to ALTER TABLE SET STATISTICS requires AccessExclusiveLock  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Is there a good reason for $subject, other than that the code is entangled 
> with other ALTER TABLE code?

I think it could be lower, but it would take nontrivial restructuring of
the ALTER TABLE support.  In particular, consider what happens when you
have a list of subcommands that don't all require the same lock level.
I think you'd need to scan the list and find the highest required lock
level before starting ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: Re: [Pg-migrator-general] Composite types break pg_migrated tables
Next
From: Kenneth Marshall
Date:
Subject: Re: Fixing geometic calculation