Re: Long running update

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Long running update
Дата
Msg-id 8742.1129482449@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Long running update  ("Andrew Janian" <ajanian@scottrade.com>)
Список pgsql-general
"Andrew Janian" <ajanian@scottrade.com> writes:
> I needed to expand the size of one of the varchar columns in a table of
> my 135GB database.

How big is the particular table you are doing this on?  What foreign key
relationships is it involved in?  (I wonder if the time is going into FK
checking more than the actual update...)  What PG version exactly?

Personally, at this point I'd cancel the update while there's still time
to do a VACUUM before you have to be operational again.  You could do
the required operation (increasing a varchar's limit) in O(1) time by
twiddling the system catalogs.  You're going to need a VACUUM anyway
because of all the dead tuple versions left behind by the UPDATE.

            regards, tom lane

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: PostgreSQL Gotchas
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: unsigned types