Re: Effects of dropping a large table

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Rob Sargent <robjsargent(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Effects of dropping a large table
Date: 2023-07-19 23:15:58
Message-ID: CAApHDvojNTFb=A1zE7oiz02JaHkp2f8q=C8SOd+QwvwJYV2cLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 19 Jul 2023 at 07:41, Rob Sargent <robjsargent(at)gmail(dot)com> wrote:
> You might consider deleting portions of the table in separate (consecutive) batches (maybe 5% per delete). And then truncate table 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2023-07-19 23:33:31 Re: Effects of dropping a large table
Previous Message Alvaro Herrera 2023-07-19 16:45:39 Re: suggestion about time based partitioning and hibernate