Re: ALTER TABLE ADD COLUMN fast default
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>,
Thomas Munro <thomas.munro@enterprisedb.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-02-20T23:47:59Z
Lists: pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes: > It seems the difference between these two cases is down to > slot_getsomeattrs being asked to deform up to attnum 1000 for the > create-alter.sql case, and only up to attnum 10 for the create.sql > case. Both plans are using physical tlists per EXPLAIN VERBOSE. I've > not managed to narrow down the reason for the difference yet. There's logic in the execExpr compiler that detects the last attnum we actually reference, if memory serves. regards, tom lane
Commits
-
Clean up treatment of missing default and CHECK-constraint records.
- 091e22b2e673 14.0 landed
-
Fast ALTER TABLE ADD COLUMN with a non-NULL default
- 16828d5c0273 11.0 landed
-
Fix application of identity values in some cases
- 533c5d8bddf0 11.0 cited