Re: DDL Damage Assessment
От
José Luis Tallón
Тема
Re: DDL Damage Assessment
Дата
Msg-id
542F0E2D.80106@adv-solutions.net
Ответ на
Re: DDL Damage Assessment (Dimitri Fontaine)
Список
Дерево обсуждения
DDL Damage Assessment Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Re: DDL Damage Assessment Stephen Frost <sfrost@snowman.net>
Re: DDL Damage Assessment Alvaro Herrera <alvherre@2ndquadrant.com>
Re: DDL Damage Assessment Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Re: DDL Damage Assessment Joe Conway <mail@joeconway.com>
Re: DDL Damage Assessment Jan Wieck <jan@wi3ck.info>
Re: DDL Damage Assessment Joe Conway <mail@joeconway.com>
Re: DDL Damage Assessment "Joshua D. Drake" <jd@commandprompt.com>
Re: DDL Damage Assessment Stephen Frost <sfrost@snowman.net>
Re: DDL Damage Assessment Claudio Freire <klaussfreire@gmail.com>
Re: DDL Damage Assessment Stephen Frost <sfrost@snowman.net>
Re: DDL Damage Assessment Andres Freund <andres@2ndquadrant.com>
Re: DDL Damage Assessment Stephen Frost <sfrost@snowman.net>
Re: DDL Damage Assessment Robert Haas <robertmhaas@gmail.com>
Re: DDL Damage Assessment Claudio Freire <klaussfreire@gmail.com>
Re: DDL Damage Assessment Stephen Frost <sfrost@snowman.net>
Re: DDL Damage Assessment Claudio Freire <klaussfreire@gmail.com>
Re: DDL Damage Assessment Stephen Frost <sfrost@snowman.net>
Re: DDL Damage Assessment Peter Geoghegan <pg@heroku.com>
Re: DDL Damage Assessment Stephen Frost <sfrost@snowman.net>
Re: DDL Damage Assessment Alvaro Herrera <alvherre@2ndquadrant.com>
Re: DDL Damage Assessment Claudio Freire <klaussfreire@gmail.com>
Re: DDL Damage Assessment Peter Geoghegan <pg@heroku.com>
Re: DDL Damage Assessment Claudio Freire <klaussfreire@gmail.com>
Re: DDL Damage Assessment Peter Geoghegan <pg@heroku.com>
Re: DDL Damage Assessment Peter Geoghegan <pg@heroku.com>
Re: DDL Damage Assessment José Luis Tallón <jltallon@adv-solutions.net>
Re: DDL Damage Assessment Fabrízio de Royes Mello <fabriziomello@gmail.com>
Re: DDL Damage Assessment Harold Giménez <harold@heroku.com>
Re: DDL Damage Assessment Stephen Frost <sfrost@snowman.net>
Re: DDL Damage Assessment Claudio Freire <klaussfreire@gmail.com>
Re: DDL Damage Assessment Steven Lembark <lembark@wrkhors.com>
Re: DDL Damage Assessment Andres Freund <andres@2ndquadrant.com>
On 10/03/2014 11:02 AM, Dimitri Fontaine wrote: > Jim Nasby writes: >>> EXPLAIN >>> ALTER TABLE .... >> I'm thinking it would be better to have something you could set at a session >> level, so you don't have to stick EXPLAIN in front of all your DDL. We were considering the potential needs of "accidental DBAs" here at first, if memory serves me well. I definitively see the value of EXPLAIN [DDL STATEMENT]... even if implemented as a regular "this is what should happen", without even attempting to run a thing (not even "dry run transactions"), but including the full catalog search / attribute resolution etc. Providing insight on the locking that would happen sounds like a real life-saver for many real life situations (i.e. would this ALTER completely lock my application due to the constant logging-to-table?) This is, obviously IMHO. > Yeah I'm coming into that camp too, and I think the Event Trigger idea > gets us halfway there. Here's a detailed sketched of how it would work: > > 1. preparatory steps: install the Event Trigger > > create extension norewrite; > > 2. test run: > > psql -1 -f ddl.sql > ERROR: Table Rewrite has been cancelled. > > 3. Well actually we need to run that thing in production > > BEGIN; > ALTER EVENT TRIGGER norewrite DISABLE; > \i ddl.sql > ALTER EVENT TRIGGER norewrite ENABLE; > COMMIT; > > Then it's also possible to have another Event Trigger that would > automatically issue a LOCK
В списке pgsql-hackers по дате отправления