Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gSCzO-0003AT-GI for pgsql-docs@arkaria.postgresql.org; Thu, 29 Nov 2018 03:27:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gSCzM-0005AU-00 for pgsql-docs@arkaria.postgresql.org; Thu, 29 Nov 2018 03:27:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gSCzL-0005AN-NM for pgsql-docs@lists.postgresql.org; Thu, 29 Nov 2018 03:27:39 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gSCzE-000586-Oy for pgsql-docs@lists.postgresql.org; Thu, 29 Nov 2018 03:27:38 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 7A1D75F7AC; Wed, 28 Nov 2018 22:27:31 -0500 (EST) Date: Wed, 28 Nov 2018 22:27:31 -0500 From: Stephen Frost To: Michael Paquier Cc: splarv@ya.ru, pgsql-docs@lists.postgresql.org Subject: Re: Return codes for archive and restore commands Message-ID: <20181129032731.GV3415@tamriel.snowman.net> References: <154340283171.1324.10549444217937216132@wrigleys.postgresql.org> <20181129022347.GH626@paquier.xyz> <20181129023957.GU3415@tamriel.snowman.net> <20181129032542.GL626@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Cu2X4S6QpqS+1MBM" Content-Disposition: inline In-Reply-To: <20181129032542.GL626@paquier.xyz> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Cu2X4S6QpqS+1MBM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Michael Paquier (michael@paquier.xyz) wrote: > On Wed, Nov 28, 2018 at 09:39:58PM -0500, Stephen Frost wrote: > > Having discussed this quite a bit lately with David Steele and Magnus, > > it's pretty clear that we need to completely rip out how this works > > today and rewrite it based around an extension model where a background > > worker can start up and essentially take the place of the archiver > > process, with flexibility to jump forward through the WAL stream, > > communicate clearly with other processes, handle failure to do so > > gracefully based on the specific cases, etc. >=20 > Hm. When an instance state is in PM_SHUTDOWN_2, the postmaster > explicitely waits for the WAL senders and the archiver to shut down. So > I think that you would need more control regarding the timing a bgworker > should be shut down first to be completely correct. Yes, it couldn't be exactly the same as a generic background worker, that's a good point. We definitely need to make sure that the postmaster waits for the archiver to shut down, as it does for the WAL senders. Thanks! Stephen --Cu2X4S6QpqS+1MBM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJb/1yjAAoJEO1sijiDR2RVutAP+QFDSnodhfy+h75w+VQBtPf1 FvQm9mf0t8GDG5ajH5XJjg/f41XFXjpKNWZnbrUAQmYCyqWvlKsrN12IYenvqqmm zaFjf0r3bCyDSb67r6Fcj2yviT+G6FdtlhUeX1STD1mTrwGd08I09plYotSDxJaA r0ocrrZaTtdWoWUYSEzmWQm9UL1QDw3fQjiKXFarx2Ylmbd0fI6W8j/J/VBdmiRv sk9E8WYfyneMHqbCGGR2ZW7WKveHFK87XCWzlD5lqSKxXBCvJGc3mruDZuQJz3kN bKRfVEk0gqcW3MRVoUHd/x0jfeLQROeDaTQyJ4tIAx5QtxhFb3q75FEMXakmXN6Y ZZ8hYQTRYDKLSvoxnCpB+FpShfV0vhVou7Sk3sknzuCRjZZk8qIr4u5q3XX29nMr 7qZ+4XJO4W90Rtw/yrb00qBTDNl7wIByexu0z49wvEGZlaM843nnQ/hb2RDR8TX8 80IJwtSduDdwAztVF8filEPbog0P5N1jV9wX89IbSN6BmCwS1dhfnxfolsXAfJit 9joMRspNuumfIA3nJP/G63lTfWmsT+dh0BbeDKidymdbsMgK0MBmAYGZzrL4HBOi YACNxImVI8gs8PT6FSTzcMLuZ9MYawzyX7XMHJBpacCTZGO4/FjnHH1DHIarZaX6 tRBaypXzm06OZzh6SAPl =Ydo2 -----END PGP SIGNATURE----- --Cu2X4S6QpqS+1MBM--