I must say I don't understand this completely.
But when I try to convert a binary pbf file for my country Germany which is of size 3gb using osm2pgsql (slim mode), it is converted to postgresql tables for 3 hours and fails with the message 'not enough disk space'. I have 50gb of free space in my linux machine.
I can understand the temporary files are added to RAM normally and because I am using slim mode it is saved to database.
Please enlighten me, how a 3gb osm file while converting to postgresql(gis) tables takes 50gb space and throws that error ?
How do I solve this ?
Yes it could cross 50gb. As India pbf is around 375mb and PostgreSQL data folder size is 11gb that include world boundary also from OSM.