Search Postgresql Archives

adding a nullable col could rewrite the whole table?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

in the docs I read:

"Adding a column with a non-null default [...] will require the entire table to be rewritten"

I guess that that can't be read as "you can always assume that adding a nullable column to a table won't rewrite the whole table".

I'm asking because since the page layout includes a null bitmap that
"If it is present it begins just after the fixed header and occupies enough bytes to have one bit per data column", I guess that when all the bits in the bitmap are used when I add a column (even a nullable one) the table gets rewritten (to add a new byte to the nullable bitmap); is this true?





-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux