On the host:
- CentOS Linux 7 (Core);
- psql (PostgreSQL) 11.16.
- prod_db, size 4004 MB.
I created a database dump:
pg_dump -U postgres -h 192.168.124.115 prod_db > prod_db.dump.
After that, I delete the database and create an empty database.
After that, I import the database:
pgsql -U postgres prod_db < prod_db.dump.
At that point, I can get different results. Sometimes the database is imported successfully (40-50 minutes). Sometimes the database is not imported, "gets stuck" (I waited a maximum of 2 days, then interrupted the process).
No errors in logs. No errors in console.
I tried importing with pg_restore: the result is the same.
I tried importing like this
sudo -u postgres psql -U postgres prod_db < prod_db.dump: the result is the same.
I tried to run the import from another host: the result is the same.
If someone can help, I will be very grateful!
P.S.: can provide any additional information.
$ sudo -u postgres psql -c "SELECT datname,wait_event_type,wait_event FROM pg_stat_activity where datname = 'prod_db';" datname | wait_event_type | wait_event -------------+-----------------+------------ prod_db | | (1 row)