I have a client made a backup using pg_dump and its size is almost 700GB while the pg_database_size is just about 195GB. I already did run the VACUUM FULL but the result still the same.
How could this be possible? As far as I know dump file should be smaller because of compression.
I used PostgreSQL version 9.5. Firstly i was thinking it's a bug, then i used a binary of PostgreSQL 10 but the result is also the same.
We use regular command for backup
pg_dump -U username -d dbname > dbname.sql
What could be the problem?
text
(orjson
orjsonb
) values in the database? Those are stored compressed in the database, but obviously not in the SQL dump. The same goes forbytea
columns which will use twice as much space in the SQL dump due to the encoding needed for binary values – Burtis