public inbox for [email protected]
help / color / mirror / Atom feedDB size value different than "/data" dir size
5+ messages / 3 participants
[nested] [flat]
* DB size value different than "/data" dir size
@ 2025-08-08 23:17 Ghiurea, Isabella <[email protected]>
2025-08-08 23:30 ` Re: DB size value different than "/data" dir size Ron Johnson <[email protected]>
2025-08-10 19:27 ` Re: DB size value different than "/data" dir size Laurenz Albe <[email protected]>
0 siblings, 2 replies; 5+ messages in thread
From: Ghiurea, Isabella @ 2025-08-08 23:17 UTC (permalink / raw)
To: pgsql-admin
Hi List,
I am running PGSQL version 12.3 cfg master-slave with streaming replication and I am facing a issue in the present active Pg db.
The database size reported from the following : pg_size_pretty() or pg_database_size() or sum all of db objects is grater than the sum size of all directories/files reported under /var/lib/pgsql/data1/tbl_space_name/PG_12,,,xxx/ . ( db data tablespace)
[ Mention in standby PG db the size matches the /data sum file size and also matches with the size reported in Pg active for pg_size_pretty() or pg_database_size ]
What can be the issue?
thank you !
Isabella
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: DB size value different than "/data" dir size
2025-08-08 23:17 DB size value different than "/data" dir size Ghiurea, Isabella <[email protected]>
@ 2025-08-08 23:30 ` Ron Johnson <[email protected]>
1 sibling, 0 replies; 5+ messages in thread
From: Ron Johnson @ 2025-08-08 23:30 UTC (permalink / raw)
To: pgsql-admin
On Fri, Aug 8, 2025 at 7:17 PM Ghiurea, Isabella <
[email protected]> wrote:
> Hi List,
>
> I am running PGSQL version 12.3
>
Ignoring the fact that PG 12 is nine months EOL, 12.3 is missing a _lot_ of
bug fixes. You should be on 12.22.
> cfg master-slave with streaming replication and I am facing a issue
> in the present active Pg db.
>
> The database size reported from the following : pg_size_pretty() or
> pg_database_size() or sum all of db objects is grater than the sum size
> of all directories/files reported under
> /var/lib/pgsql/data1/tbl_space_name/PG_12,,,xxx/ . ( db data tablespace)
>
>
> [ Mention in standby PG db the size matches the /data sum file size and
> also matches with the size reported in Pg active for pg_size_pretty() or
> pg_database_size ]
>
>
> What can be the issue?
>
What's in $PGDATA?
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: DB size value different than "/data" dir size
2025-08-08 23:17 DB size value different than "/data" dir size Ghiurea, Isabella <[email protected]>
@ 2025-08-10 19:27 ` Laurenz Albe <[email protected]>
2025-08-11 14:13 ` Re: Re: DB size value different than "/data" dir size Ghiurea, Isabella <[email protected]>
1 sibling, 1 reply; 5+ messages in thread
From: Laurenz Albe @ 2025-08-10 19:27 UTC (permalink / raw)
To: Ghiurea, Isabella <[email protected]>; pgsql-admin
On Fri, 2025-08-08 at 23:17 +0000, Ghiurea, Isabella wrote:
> I am running PGSQL version 12.3 cfg master-slave with streaming replication
> and I am facing a issue in the present active Pg db.
> The database size reported from the following : pg_size_pretty() or pg_database_size()
> or sum all of db objects is grater than the sum size of all directories/files
> reported under /var/lib/pgsql/data1/tbl_space_name/PG_12,,,xxx/ . ( db data tablespace)
Perhaps some part of the data is in a different tablespace, maybe pg_default.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Re: DB size value different than "/data" dir size
2025-08-08 23:17 DB size value different than "/data" dir size Ghiurea, Isabella <[email protected]>
2025-08-10 19:27 ` Re: DB size value different than "/data" dir size Laurenz Albe <[email protected]>
@ 2025-08-11 14:13 ` Ghiurea, Isabella <[email protected]>
2025-08-13 05:09 ` Re: Re: DB size value different than "/data" dir size Laurenz Albe <[email protected]>
0 siblings, 1 reply; 5+ messages in thread
From: Ghiurea, Isabella @ 2025-08-11 14:13 UTC (permalink / raw)
To: Laurenz Albe <[email protected]>; pgsql-admin
I believe this is related to VACUUM FULL behavior in a streaming replication cfg , for the standby server the space is not been reclaimed , But the sieze of db reported with pg_pretty_db_size is identical on both db size but is not the actual sum of /var/lib/pgsql/data1 files +dir size on the active PG were vacuum full reclaim the space. Is this a normal behavior in PG with reporting incorrect db size if vacuum full has not reclaim the OS disk space on both server?
________________________________
From: Laurenz Albe <[email protected]>
Sent: Sunday, August 10, 2025 12:27:31 PM
To: Ghiurea, Isabella; [email protected]
Subject: EXT: Re: DB size value different than "/data" dir size
***Attention*** This email originated from outside of the NRC. ***Attention*** Ce courriel provient de l'extérieur du CNRC.
On Fri, 2025-08-08 at 23:17 +0000, Ghiurea, Isabella wrote:
> I am running PGSQL version 12.3 cfg master-slave with streaming replication
> and I am facing a issue in the present active Pg db.
> The database size reported from the following : pg_size_pretty() or pg_database_size()
> or sum all of db objects is grater than the sum size of all directories/files
> reported under /var/lib/pgsql/data1/tbl_space_name/PG_12,,,xxx/ . ( db data tablespace)
Perhaps some part of the data is in a different tablespace, maybe pg_default.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Re: DB size value different than "/data" dir size
2025-08-08 23:17 DB size value different than "/data" dir size Ghiurea, Isabella <[email protected]>
2025-08-10 19:27 ` Re: DB size value different than "/data" dir size Laurenz Albe <[email protected]>
2025-08-11 14:13 ` Re: Re: DB size value different than "/data" dir size Ghiurea, Isabella <[email protected]>
@ 2025-08-13 05:09 ` Laurenz Albe <[email protected]>
0 siblings, 0 replies; 5+ messages in thread
From: Laurenz Albe @ 2025-08-13 05:09 UTC (permalink / raw)
To: Ghiurea, Isabella <[email protected]>; pgsql-admin
On Mon, 2025-08-11 at 14:13 +0000, Ghiurea, Isabella wrote:
> I believe this is related to VACUUM FULL behavior in a streaming replication cfg ,
> for the standby server the space is not been reclaimed , But the sieze of db reported
> with pg_pretty_db_size is identical on both db size but is not the actual sum of
> /var/lib/pgsql/data1 files +dir size on the active PG were vacuum full reclaim the space.
>
> Is this a normal behavior in PG with reporting incorrect db size if vacuum full has
> not reclaim the OS disk space on both server?
VACUUM (FULL) will also reclaim the size on the standby.
There can be some delay in the case of a replication conflict.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2025-08-13 05:09 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-08-08 23:17 DB size value different than "/data" dir size Ghiurea, Isabella <[email protected]>
2025-08-08 23:30 ` Re: DB size value different than "/data" dir size Ron Johnson <[email protected]>
2025-08-10 19:27 ` Laurenz Albe <[email protected]>
2025-08-11 14:13 ` Ghiurea, Isabella <[email protected]>
2025-08-13 05:09 ` Laurenz Albe <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox