Re: DDL Damage Assessment - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: DDL Damage Assessment
Date
Msg-id 20141003124135.GL28859@tamriel.snowman.net
Whole thread Raw
In response to Re: DDL Damage Assessment  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
* Jim Nasby (Jim.Nasby@BlueTreble.com) wrote:
> I'm thinking it would be better to have something you could set at a session level, so you don't have to stick
EXPLAINin front of all your DDL.
 

Right, I'm agreed there.

> As for the dry-run idea, I don't think that's really necessary. I've never seen anyone serious that doesn't have a
developmentenvironment, which is where you would simply deploy the real DDL using "verbose" mode and see what the
underlyingcommands actually do.
 

That's certainly an interesting point and perhaps what we'd do is,
instead, have a "collect info on locks needed" mode- but otherwise, let
everything run as-is.  You could then take the report at the end of the
transaction and use it to identify what would be needed in production
and maybe even have a script created which grabs all the locks using
'nowait' or fails the whole thing if it isn't possible..

Of course, we kind of have that already...  Just look at the locks
you've acquired at the end of the transaction..
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: DDL Damage Assessment
Next
From: Heikki Linnakangas
Date:
Subject: Re: WAL format and API changes (9.5)