Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOfki-0000rZ-GZ for pgsql-general@arkaria.postgresql.org; Sat, 03 Oct 2020 11:31:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kOfkh-0003Cl-EO for pgsql-general@arkaria.postgresql.org; Sat, 03 Oct 2020 11:30:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOfkh-0003Cd-6p for pgsql-general@lists.postgresql.org; Sat, 03 Oct 2020 11:30:59 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOfkZ-0006Yq-Jq for pgsql-general@lists.postgresql.org; Sat, 03 Oct 2020 11:30:58 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id B1AD13A5E; Sat, 3 Oct 2020 13:30:50 +0200 (CEST) Date: Sat, 3 Oct 2020 13:30:50 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Restoring a database problem Message-ID: <20201003113050.GC18543@hjp.at> References: <20201001001100.GC26860@momjian.us> <82097994-6772-dfd7-84e0-8f150af25e26@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="p2kqVDKq5asng8Dg" Content-Disposition: inline In-Reply-To: <82097994-6772-dfd7-84e0-8f150af25e26@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --p2kqVDKq5asng8Dg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-09-30 20:11:12 -0500, Ron wrote: > On 9/30/20 7:11 PM, Bruce Momjian wrote: > > On Thu, Oct 1, 2020 at 01:00:21PM +1300, Glen Eustace wrote: > > > I have had to do this so rarely and it has almost always been in a bi= t of a > > > panic so may well be missing something really obvious. > > >=20 > > > What I want to know is how to quiese a database to that I can restore= it. > > >=20 > > > I need to close all existing connections and the prevent people/proce= sses from > > > connecting again until the restore has completed. [...] > > I would modify pg_hba.conf to block access temporarily. >=20 > As would I; it's the first thing I thought of... Interesting. The first thing I thought of was "iptables"[1]. Probably shows that I'm a Linux guy first and a database guy second. hp [1] Yes, I know that this doesn't affect connections through Unix sockets. --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --p2kqVDKq5asng8Dg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAl94YOYACgkQ8g5IURL+ KF0/pQ//Sl8dIrD4kzmN3qwjo7653zesZ7qHpzeG9rIiSPKjyD3jxfTd9mLUxW7D pDMWz5AcBt9iY0A9eBiMvtQ8FskeIHNl9DkXJO3tCXDZ3OFHdY0cEdEyOD68aE5J 8SlyNs8vL6ruhYmPCnmAnBHxk57vPR1ekFOb42tH8ae6pV+w4XovBR7Ljh1D+aU9 e1FyilU2+YfgCuLeOkVEsFlQLpTvOjRQqU/eyuo0OrtdUX081j4OyF7O+zi1xS/D 85Qd6DCC0ySelbgki/rRRLHkMNBGyrXt2Mv+0+AoP+Qn+COG2dQdiCXw1EHpFgUb ebSAgZYke6jT09jvlOazok8RIxcU0NspEAdql9MisYzouOjXwyUr1ospkpOuYVSw c0GxmXFTufkOI3xRs8v5LOFIJ3W+CMyPkID4RAfMrZ6T37AF8/jnv3au3lwYluzW ko7/1UWZcGQaKl/qNQuglSWdP7kbpm1E6l4vSEXjBAyErXOiqC0i0DNFJCdlaC89 ffj/Imyd1g4+uLw/CE989PKaY0VzrOJjhBPTU+fjgbw+gWdDT5WtBYzXCE/wKC2p 9P4KCuMR1qV13rFKUUp7ohFsqIFYR+F86A1wpjdSPym2eV6hSgGmZw93TxfZ/ifr dsdVqZxbjEUzIM1ImHWDxI61idbq5SXDLiNLbIj1ybw0S0oTovk= =mHQr -----END PGP SIGNATURE----- --p2kqVDKq5asng8Dg--