Re: pg_restore with connection limit 0

Олег Самойлов <[email protected]>
Newsgroups gmane.comp.db.postgresql.general
Message-ID <[email protected]>
> 27 нояб. 2019 г., в 18:14, Adrian Klaver <[email protected]> написал(а):

> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.