db maintanance problem VACUUM FULL

From: Pavol Sekeres <pavol(dot)sekeres8(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: db maintanance problem VACUUM FULL
Date: 2025-06-12 13:14:22
Message-ID: CA+RPunpqzys-rqsH9Xia8KWJ2+mR=V_TXe4Ca+JDV7bvmym8TQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

We recently updated our production database to PostgreSQL 12.22 from the
9.6.24 version.
We didn't want to make a big jump.
It is around 2 TB in size with one stand-by replica of equal size.
The database is more than 5 years old.

We do run AUTOVACUUM processes on all tables periodically.
We have never run VACUUM FULL on any table.
This is because we can't afford to lock out tables for a long time.

Tables can be more than 100GB in size.
They are being updated daily.
Also due to GDPR old data is erased on a daily basis.
We think these tables might get eventually bloated.

Can this be a problem?

If yes, is there any other solution outside locking the database?
Should we try to solve this problem by creating a logical replica of the
database?
We would then promote the replica to primary.
After that, we would drop the old database.
Is this possible without a big downtime?
Is this even a good idea?

Our database uses a wal_level 'replica'.
As I understand it, this setting would first have to be switched to
'logical'.

Thank you for your answer,
Best regards,
Pavol Sekeres

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2025-06-12 13:24:11 Re: db maintanance problem VACUUM FULL
Previous Message Hayato Kuroda (Fujitsu) 2025-06-12 02:35:57 RE: Logical Replication Memory Allocation Error - "invalid memory alloc request size"