Re: Effects of dropping a large table

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Effects of dropping a large table
Дата
Msg-id CAApHDvojNTFb=A1zE7oiz02JaHkp2f8q=C8SOd+QwvwJYV2cLQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Effects of dropping a large table  (Rob Sargent <robjsargent@gmail.com>)
Ответы Re: Effects of dropping a large table
Список pgsql-general
On Wed, 19 Jul 2023 at 07:41, Rob Sargent <robjsargent@gmail.com> wrote:
> You might consider deleting portions of the table in separate (consecutive) batches (maybe 5% per delete).  And then
truncatetable is not logged so that might be an alternative.
 

Can you explain why this would be a useful thing to do?

It sounds to me like it would just create a load of needless WAL from
the deletes and the vacuum that cleans up the dead rows each of which
is more likely to cause lag problems on the replica servers, which the
OP is trying to avoid.

David



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: suggestion about time based partitioning and hibernate
Следующее
От: Rob Sargent
Дата:
Сообщение: Re: Effects of dropping a large table