I am trying to restore backup of postgresql database on my personal computer. My OS is Ubuntu 18 and I use postgresql of 14 version. Volume of .sql file is 52G, but after waiting for 6 hours the volume of target database increased only to 120 MB. Then I changed some parameters of my default postgres.conf:
work_mem = 32MB
shared_buffers = 4GB
maintenance_work_mem = 2GB
full_page_writes = off
autovacuum = off
wal_buffers = -1
But the speed remained mostly the same. The resource utilization during INSERTs is following:
- CPU < 7% (ps -aux)
- Memory < 0.5 % (ps -aux)
- Disk write speed < 1000 K/S (iotop, dd reached more than 80 MB/s)
Thank you in advance. Command used here is sudo -u postgres psql lom < psql_long_small_dump