does pg_dumpall run vacuum? Can someone confirm if pg_dumpall does a vacuum? I cannot explain the size differences between a local and dumped database but thinking duplicate/rewritten entries are ignored


350mb inside psql with \l
350mb with du -sch at postgres' folder
158mb with pgdumpall to file


running pgsql 9.5
The size reported by psql -l includes the size of all indexes. 

The dump only contains the definition of the indexes, but no data for them, that's why the dump file is (substantially) smaller then the reported size on disk. 

In addition to the size of the indexes, the dump only contains the raw data, while the size on disk might include table bloat (free space inside the table's data files)