> 27 нояб. 2019 г., в 18:14, Adrian Klaver <adrian.klaver@xxxxxxxxxxx> написал(а): > Why not use pg_hba.conf to allow only connection from superuser for duration? We considered this, but we don't have direct access to the linux server, only sql connection. The application run in a kubernetes, etc. The most simple approach to block concurrent access to the database, may be, is run all pg_restore inside single transaction. But this is impossible with --create option, but --create option is the only way to restore database settings. And this is impossible for us, because we need pg_restore in 3 stages. It is inconvenient that the pg_restore has functionality for 3 stages, but don't has functionality to block database for time of this 3 stages.