Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock
Date: 2010-07-16 19:43:50
Message-ID: 201007162143.51316.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Friday 16 July 2010 21:15:44 Simon Riggs wrote:
> On Fri, 2010-07-16 at 21:10 +0200, Andres Freund wrote:
> > On Friday 16 July 2010 20:41:44 Andres Freund wrote:
> > > >> ! */
> > > >> ! case AT_AddColumn: /* may
> > > >> rewrite heap, in some cases and visible to SELECT */ !
> > > >>
> > > >> case AT_DropColumn: /* change
> > > >>
> > > >> visible to SELECT */ ! case
> > > >> AT_AddColumnToView: /* CREATE VIEW */ !
> > > >> case AT_AlterColumnType: /* must rewrite heap */ !
> > > >>
> > > >> case AT_DropConstraint: /* as DROP INDEX
> > > >> */
> > > >>
> > > >> ! case AT_AddOids:
> > > >> ! case AT_DropOids: /*
> > > >> calls AT_DropColumn */ ! case
> > > >> AT_EnableAlwaysRule: /* as DROP INDEX */ !
> > > >>
> > > >> case AT_EnableReplicaRule: /* as DROP INDEX
> > > >> */
> > > >>
> > > >> ! case AT_EnableRule: /* as
> > > >> DROP INDEX */
> >
> > Another remark:
> >
> > Imho it would be usefull to keep that list in same order as in the enum -
> > currently its hard to make sure no case is missing.
>
> Not really; the default case is to reject, so any full test suite will
> pick that up.
>
> The cases are ordered by resulting lock type, which seemed the best way
> to check we didn't accidentally assign an incorrect lock type.
Well, I meant ordering it correctly inside the locktypes, sorry for the
inprecision.

Andres

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-07-16 20:24:32 Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock
Previous Message Andres Freund 2010-07-16 19:38:47 Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock