Re: Fast AT ADD COLUMN with DEFAULTs - Mailing list pgsql-hackers

From Serge Rielau
Subject Re: Fast AT ADD COLUMN with DEFAULTs
Date
Msg-id f6463f1f-e3fd-421b-88d6-704d65f494f9@rielau.com
Whole thread Raw
In response to Re: Fast AT ADD COLUMN with DEFAULTs  (Vitaly Burovoy <vitaly.burovoy@gmail.com>)
List pgsql-hackers
<img class="cloudmagic-smart-beacon" height="0"
src="https://tr.cloudmagic.com/h/v6/emailtag/tag/1475706830/647b813270dffd4c4b2631f3c9eb3f46/9cf3801d03770ada01bb39dc8f52321d/c719df4bda2459f77b9ef0f2a251d073/9efab2399c7c560b34de477b9aa0a465/ufo.gif"
style="border:0;width:0; height:0; overflow:hidden;" width="0" /><div dir="auto"><div
id="cm_replymail_content_wrap"><divclass="">On Wed, Oct 5, 2016 at 3:23 PM, Vitaly Burovoy
<vitaly.burovoy@gmail.com>wrote:<br /><div id="cm_replymail_content_1475706734" style="overflow:
visible;"><blockquotestyle="margin:0;border-left: #D6D6D6 1px solid;padding-left: 10px;">On 10/5/16, Andres Freund
<andres@anarazel.de>wrote:<br />> On 2016-10-05 11:58:33 -0700, Serge Rielau wrote:<br />>> Dear
Hackers,<br/>>> I’m working on a patch that expands PG’s ability to add columns to a table<br />>> without
atable rewrite (i.e. at O(1) cost) from the<br />>> nullable-without-default to a more general case.<br />> If
Iunderstand this proposal correctly, altering a column default will<br />> still have trigger a rewrite unless
there'sprevious default?<br />No, "a second “exist default"" was mentioned, i.e. it is an additional<br />column in a
systemtable (pg_attribute) as default column values of<br />the "pre-alter" era. It solves changing of the default
expressionof<br />the same column later.</blockquote><div id="ID_1475706751433">Correct and good guess on
pg_attribute. </div><divid="ID_1475706751433">That’s where it’s living in my proposal. </div><div
id="ID_1475706751433"><br/></div><div id="ID_1475706751433">Cheers</div><div
id="ID_1475706751433">Serge</div></div></div></div></div>

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Fast AT ADD COLUMN with DEFAULTs
Next
From: Vitaly Burovoy
Date:
Subject: Re: Fast AT ADD COLUMN with DEFAULTs