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 1jyxmu-00063Z-Mo for pgsql-admin@arkaria.postgresql.org; Fri, 24 Jul 2020 13: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 1jyxmt-0008IC-F6 for pgsql-admin@arkaria.postgresql.org; Fri, 24 Jul 2020 13:30:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jyxmt-0008FB-63 for pgsql-admin@lists.postgresql.org; Fri, 24 Jul 2020 13:30:59 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jyxmo-0000LR-Mp for pgsql-admin@lists.postgresql.org; Fri, 24 Jul 2020 13:30:58 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 5466A5F79F; Fri, 24 Jul 2020 09:30:53 -0400 (EDT) Date: Fri, 24 Jul 2020 09:30:53 -0400 From: Stephen Frost To: pham lan Cc: pgsql-admin@lists.postgresql.org Subject: Re: questions about point in time recovery of the primary postgres Server Message-ID: <20200724133053.GV12375@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MWYTdRocNKEnFB5K" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --MWYTdRocNKEnFB5K Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Greetings, * pham lan (phamlankt@gmail.com) wrote: > I am pretty new to Postgres and I have been reading about streaming > replication and point in time recovery which is very interesting to me. > What is not clear to me is: let's say I have a cluster of 1 primary and 2 > slaves Postgres 9.5 which have archive_mode on. Streaming replication is > working fine. If for instance, i drop by mistake one table, and i need to > do a restore to a point before the time the table was dropped, will I need > to do the recovery only on the primary postgres server? How will the slaves > behave during the recovery process of the primary? The replicas will need to be rebuilt after the restore of the primary. There's a few different ways to do that, but the fastest that I'm aware of would be a pgbackrest delta restore of all the systems using an appropriate backup set (which pgbackrest will figure out for you when you tell it the time you want to restore to). Thanks, Stephen --MWYTdRocNKEnFB5K Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJfGuKMAAoJEO1sijiDR2RVFf8P/2QzD6onyzPtM7hslhtKcK1s hSzDLX1LuodLcjL3MzLSExZnr5u2/0wtNG/2athcTFdRY4b/0AX5b1HyINMAzN6Y ZFEJzw21p2sbLzEVU3EdF8ecb0Of7R6dwajlfXz39cV6v9GsxIo/sxmEVvQ8RpLy 1SLQImdqbTQVC3H+9m6XqfLep1kkJPc6dakCGP4surJgA8/s8vdZnhLryISjA7qp D9hqUu1QSAfYLlNKSTm3vsFn5ox6h3fzbcSpVN1x2WU1ZzlvkJ7xNiYHVb3b1yNL fKMtdOl8dK0mwtEUDcRXtJEudwQwSURgI7S2Ni42wv/JVvaaMCc8veHbEEppkvfT t2F4/c3xXsTbN1L261NyhMN5JRgqKwypQAWXwI6Bk7aw0246U11uSb+H+rjR9JEV 8LrGbxmu3R0eUu1o4q3qM5NikH2hiuON9Y2bCdzNRrI/rKnxrWZAdvlHDeycZOUO oKMQBlpHtFWrhbn/A4VXoWzCnOzy/hf14Q+Rz6jZ7JeF1r0N+5jxFiWKDsKDXnCH nO4JgJ4ktGQP5FEQn1ZjElCsyMZm6CwKg0+Ft6WEci/WMYJGbGNVbIax1qtmIi+w 0+EQIcHQCiZZn8WXwvys95JlCXIhzU2sqs+rwlO9/FV12MhPlQql4PNPpvsk/Ozn pNF2QHbFG1euCT5XU6Qt =mrWS -----END PGP SIGNATURE----- --MWYTdRocNKEnFB5K--