However if we move the file to another server in the same network and run with a psql -h then it runs for more than 10min.
pgsql-performance by date:
Соглашаюсь с условиями обработки персональных данных