Re: Truncating/vacuuming relations on full tablespaces

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Truncating/vacuuming relations on full tablespaces
Дата
Msg-id 27236.1452885398@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Truncating/vacuuming relations on full tablespaces  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Truncating/vacuuming relations on full tablespaces  (Jeff Janes <jeff.janes@gmail.com>)
Re: Truncating/vacuuming relations on full tablespaces  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Now, I do think it's a somewhat fair complaint that if you have a
> tablespace which is totally, 100% full, recovery is difficult.  You
> can probably DROP the table, but TRUNCATE might fail, and so might
> VACUUM.  You could argue that DROP is usually a good substitute for
> TRUNCATE, although there could be dependencies, but DROP is certainly
> not a good substitute for VACUUM.  We could address the VACUUM case by
> having an optional argument to VACUUM which tells it to skip VM and
> FSM maintenance, presumably to be used only in case of emergency.  I'm
> not sure if it's worth having for what is presumably  a pretty rare
> case, but it seems like it could be done.

Presumably the hope would be that VACUUM would truncate off some of the
heap, else there's not much good that's going to happen.  That leaves
me wondering exactly what the invariant is for the maps, and if it's
okay to not touch them during a heap truncation.

I believe that there would be ramifications for some of the index AMs
too.  For example, if left to its own devices GIN would consider VACUUM
to include flushing its pending-list pages, which more than likely will
increase not reduce the total index size.  I'm not sure that it has
any ability to omit that step; can it remove dead entries directly off
the pending pages, or only from the main index?

On the whole this sounds like a lot of work, and a lot of hard-to-test
seldom-exercised code, for a very very narrow corner case.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Truncating/vacuuming relations on full tablespaces
Следующее
От: Devrim Gündüz
Дата:
Сообщение: Re: Death by regexp_replace