On Mon, Feb 17, 2020 at 10:46 AM Adrian Klaver <adrian.klaver@xxxxxxxxxxx> wrote:
How about?:
https://www.postgresql.org/docs/9.6/sql-altertable.html
"Adding a column with a DEFAULT clause or changing the type of an
existing column will require the entire table and its indexes to be
rewritten. As an exception when changing the type of an existing column,
if the USING clause does not change the column contents and the old type
is either binary coercible to the new type or an unconstrained domain
over the new type, a table rewrite is not needed; but any indexes on the
affected columns must still be rebuilt. Adding or removing a system oid
column also requires rewriting the entire table. Table and/or index
rebuilds may take a significant amount of time for a large table; and
will temporarily require as much as double the disk space."
>
> Thanks!
> Jeremy
--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx
You mean the part "any indexes on the affected columns must still be rebuilt"? Yes, I guess that is pretty clear. Thanks,
Jeremy