Re: ALTER TABLE ... NOREWRITE option
От
Andres Freund
Тема
Re: ALTER TABLE ... NOREWRITE option
Дата
Msg-id
20121201203220.GB15334@awork2.anarazel.de
Ответ на
Re: ALTER TABLE ... NOREWRITE option (Josh Berkus)
Список
Дерево обсуждения
ALTER TABLE ... NOREWRITE option Simon Riggs <simon@2ndQuadrant.com>
Re: ALTER TABLE ... NOREWRITE option Tom Lane <tgl@sss.pgh.pa.us>
Re: ALTER TABLE ... NOREWRITE option Simon Riggs <simon@2ndQuadrant.com>
Re: ALTER TABLE ... NOREWRITE option Andres Freund <andres@2ndquadrant.com>
Re: ALTER TABLE ... NOREWRITE option Noah Misch <noah@leadboat.com>
Re: ALTER TABLE ... NOREWRITE option Hannu Krosing <hannu@krosing.net>
Re: ALTER TABLE ... NOREWRITE option Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Re: ALTER TABLE ... NOREWRITE option Noah Misch <noah@leadboat.com>
Re: ALTER TABLE ... NOREWRITE option Josh Berkus <josh@agliodbs.com>
Re: ALTER TABLE ... NOREWRITE option Tom Lane <tgl@sss.pgh.pa.us>
Re: ALTER TABLE ... NOREWRITE option Josh Berkus <josh@agliodbs.com>
Re: ALTER TABLE ... NOREWRITE option Tom Lane <tgl@sss.pgh.pa.us>
Re: ALTER TABLE ... NOREWRITE option Josh Berkus <josh@agliodbs.com>
Re: ALTER TABLE ... NOREWRITE option "Petr Jelinek" <pjmodos@pjmodos.net>
Re: ALTER TABLE ... NOREWRITE option Simon Riggs <simon@2ndQuadrant.com>
Re: ALTER TABLE ... NOREWRITE option John R Pierce <pierce@hogranch.com>
Re: ALTER TABLE ... NOREWRITE option Tom Lane <tgl@sss.pgh.pa.us>
Re: ALTER TABLE ... NOREWRITE option Simon Riggs <simon@2ndQuadrant.com>
Re: ALTER TABLE ... NOREWRITE option Tom Lane <tgl@sss.pgh.pa.us>
Re: ALTER TABLE ... NOREWRITE option Simon Riggs <simon@2ndQuadrant.com>
Re: ALTER TABLE ... NOREWRITE option Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Re: ALTER TABLE ... NOREWRITE option Josh Berkus <josh@agliodbs.com>
Re: ALTER TABLE ... NOREWRITE option Robert Haas <robertmhaas@gmail.com>
Re: ALTER TABLE ... NOREWRITE option Josh Berkus <josh@agliodbs.com>
Re: ALTER TABLE ... NOREWRITE option Simon Riggs <simon@2ndQuadrant.com>
Re: ALTER TABLE ... NOREWRITE option Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Re: ALTER TABLE ... NOREWRITE option Simon Riggs <simon@2ndQuadrant.com>
Re: ALTER TABLE ... NOREWRITE option Andres Freund <andres@2ndquadrant.com>
Re: ALTER TABLE ... NOREWRITE option Robert Haas <robertmhaas@gmail.com>
Re: ALTER TABLE ... NOREWRITE option Simon Riggs <simon@2ndQuadrant.com>
Re: ALTER TABLE ... NOREWRITE option Robert Haas <robertmhaas@gmail.com>
Re: ALTER TABLE ... NOREWRITE option Simon Riggs <simon@2ndQuadrant.com>
Re: ALTER TABLE ... NOREWRITE option Andres Freund <andres@2ndquadrant.com>
Re: ALTER TABLE ... NOREWRITE option Simon Riggs <simon@2ndQuadrant.com>
Re: ALTER TABLE ... NOREWRITE option Andres Freund <andres@2ndquadrant.com>
Re: ALTER TABLE ... NOREWRITE option "Petr Jelinek" <pjmodos@pjmodos.net>
Re: ALTER TABLE ... NOREWRITE option Andres Freund <andres@2ndquadrant.com>
Re: ALTER TABLE ... NOREWRITE option "Petr Jelinek" <pjmodos@pjmodos.net>
Re: ALTER TABLE ... NOREWRITE option Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Re: ALTER TABLE ... NOREWRITE option Robert Haas <robertmhaas@gmail.com>
Re: ALTER TABLE ... NOREWRITE option Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Re: ALTER TABLE ... NOREWRITE option Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Re: ALTER TABLE ... NOREWRITE option Simon Riggs <simon@2ndQuadrant.com>
Re: ALTER TABLE ... NOREWRITE option Simon Riggs <simon@2ndQuadrant.com>
Re: ALTER TABLE ... NOREWRITE option Josh Berkus <josh@agliodbs.com>
Re: ALTER TABLE ... NOREWRITE option Andres Freund <andres@2ndquadrant.com>
Re: ALTER TABLE ... NOREWRITE option Josh Berkus <josh@agliodbs.com>
Re: ALTER TABLE ... NOREWRITE option Andres Freund <andres@2ndquadrant.com>
Re: ALTER TABLE ... NOREWRITE option "Petr Jelinek" <pjmodos@pjmodos.net>
On 2012-12-01 12:24:57 -0800, Josh Berkus wrote:
>
> >> I'm not thrilled about inventing YA keyword for this. If you have a
> >> problem with that sort of scenario, why aren't you testing your DDL
> >> on a test server before you do it on production?
>
> *I* do test my DDL. However, there are literally hundreds of thousands
> of Rails, Django and Hibernate developers who "test" their DDL by
> running it using a 5-row dataset on their laptops before pushing it to
> production. As far as these folks are concerned, "rewrite if there's a
> default" is a completely unintuitive booby-trap.
>
> I agree that adding "NOREWRITE" is a bad solution, though. Personally,
> I'd rather have a system function which tests whether a series of DDL
> statements involves a rewrite anywhere. e.g.:
>
> SELECT pg_test_for_rewrite('ALTER TABLE josh ADD COLUMN haircolor')
>
> Hmmmm. Actually, that wouldn't work with migrations tools, especially
> Rails. Better, what about a GUC?
>
> SET message_on_rewrite=WARNING;
If you have a framework and you want to test for this you can just
compare relfilenodes before/after.
Greetings,
Andres Freund
-- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления