database size after a DELETE and VACUUM - Mailing list pgsql-admin

From Mike.Samson@apcc.com
Subject database size after a DELETE and VACUUM
Date
Msg-id OF10E93ADC.96387340-ON85257031.004879C3-85257031.004A3C0E@apcc.com
Whole thread Raw
Responses Re: database size after a DELETE and VACUUM
List pgsql-admin
Hello All,

I need a reliable way to determine the overall size of our database.
Recently, I started using the database_size() function from the dbsize
contrib.

Everything seems to work great until I need to delete records.
After I DELETE records, the pg_autovacuum daemon kicks in an runs a VACUUM.

Once the VACUUM finishes, I run database_size() again and the size does not
decrease.

I would expect the database size to decrease after the VACUUM.
I also don't want to run a VACUUM FULL because this kills the performance
of the system.

Do I have any other alternatives to determine the database size reliably
after a DELETE
and a VACUUM?

Note that I have also experimented with reltuples which does not give me
accurate results
either unless I run two VACUUMS in a row.

Please help.

Thank you,
Mike Samson
Senior Software Engineer
APC





pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Help needed to set the Optimal Value for shared_buffers.
Next
From: Michael Fuhr
Date:
Subject: Re: database size after a DELETE and VACUUM