Re: Document atthasmissing default optimization avoids verification table scan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Document atthasmissing default optimization avoids verification table scan
Дата
Msg-id 1289019.1642804712@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Document atthasmissing default optimization avoids verification table scan  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Document atthasmissing default optimization avoids verification table scan  (James Coleman <jtc331@gmail.com>)
Список pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> You've removed the "constraint verification scan" portion of this.

Indeed, because that's got nothing to do with adding a new column
(per se; adding a constraint along with the column is a different
can of worms).

> Re-reading this, the recommendation:

> -     However, if the default value is volatile (e.g.,
> -     <function>clock_timestamp()</function>)
> -     each row will need to be updated with the value calculated at the time
> -     <command>ALTER TABLE</command> is executed. To avoid a potentially
> -     lengthy update operation, particularly if you intend to fill the
> column
> -     with mostly nondefault values anyway, it may be preferable to add the
> -     column with no default, insert the correct values using
> -     <command>UPDATE</command>, and then add any desired default as
> described
> -     below.

> has now been completely removed from the documentation.

Really?  That's horrid, because that's directly useful advice.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: fairywren is generating bogus BASE_BACKUP commands
Следующее
От: John Naylor
Дата:
Сообщение: Re: do only critical work during single-user vacuum?