Thread: Reg: Size difference

Reg: Size difference

From
Vinay Oli
Date:

Hi Team

I have been using PostgreSQL for the past 6 years. PostgreSQL has significantly impacted my life, providing me with great opportunities for knowledge and self-development.

I'm currently facing a strange issue with PostgreSQL 15.0. I have a primary-standby setup that is in sync, with a replication slot in place. There are 18 databases, and one of the databases on the primary side is 104 GB, while the same database on the standby side is 216 GB. Both are in sync with zero delay.

Could this be a bug? If so, has it been resolved in newer releases? If it is not a bug, how can this issue be fixed? Is there a solution or any supporting documentation available?

WAL and log files are being rotated properly. The issue is with a database named services_mfs. On the primary cluster, the services_mfs database is 104GB, but on the standby cluster, it is 216GB, even though both cluster are in sync. The standby database is only used in case of a crash, which is managed by a Patroni cluster with etcd.



Thanks,

Vinay Kumar


Re: Reg: Size difference

From
Karsten Hilbert
Date:
Am Fri, Sep 13, 2024 at 05:39:22PM +0530 schrieb Vinay Oli:

> I'm currently facing a strange issue with PostgreSQL 15.0. I have a
> primary-standby setup that is in sync, with a replication slot in place.
> There are 18 databases, and one of the databases on the primary side is 104
> GB, while the same database on the standby side is 216 GB. Both are in sync
> with zero delay.

First thing that comes to my mind is different effect of
autovacuum between both clusters.

Best,
Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B