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 1gSCxd-00036p-A2 for pgsql-docs@arkaria.postgresql.org; Thu, 29 Nov 2018 03:25:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gSCxc-0003W3-1i for pgsql-docs@arkaria.postgresql.org; Thu, 29 Nov 2018 03:25:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gSCxb-0003Ur-SF for pgsql-docs@lists.postgresql.org; Thu, 29 Nov 2018 03:25:51 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gSCxZ-0000Kw-Oa for pgsql-docs@lists.postgresql.org; Thu, 29 Nov 2018 03:25:51 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2CFC621FF3; Wed, 28 Nov 2018 22:25:48 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 28 Nov 2018 22:25:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=0G/miJxLm6B6vRR05xbgPDH+403 zckqjfbwkinzGfs4=; b=bXu1/Q0MRJ9vNk6rH41e4Rh5OQPm5Kxmpfore15VLHB iXOFVd8bLgkCzBgrg8lbfbP0a23HciU50beqUR8215IgHoUgpTkUz/b6gk4Upqj7 SSI8B8ec6XiNXXsw5qWXLDW0lBTpEV/8GjkPLvlA8eWDr95DYw8+zuctUj2rA4Qb OHkV7wYv3opuX8dvbW4Enyx9/BZasPvH2chglAXPcFvTwpb/iZNSODpoGg1ICsEo wV+hqNCTYqK90aLyROZbZ0TWRLwywOy+zCrqMYa2Hjh0mrc8eh3f9CQrxiOCzNrt Bv5DUMjl30FlvUfnYUbEZQIQJfbb0FruQSOCh5w3NEA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=0G/miJ xLm6B6vRR05xbgPDH+403zckqjfbwkinzGfs4=; b=xn+4zHjcPP9lMd0R9Vl7YL +uibf0xKj1Mpy/hcWqVAX8lUcii411/y80wiONJTFQTdLMikmyojnTSS2xR1pp6N s/Neu8gGXPZHtro9CedCreZU10/Qstn4JNpBgBBBDvgJmGsPHrWjF0st1fr7iY+a dK4k/t5uPzQcqNRjitO+K50ssM3KrluDqK0iR97tFN2AWE9MwCguk29PFmlBGTJ/ jWBPIw9qkfT1+aaIlG2RqMGqH24QFMYcZ6rL9ol5EgiY10cO0iLhvkXTjtDHBlq5 de+eNIhrDjWD7zlwbqOE5IksyoY+y45XfesipsI8c13e6tAzGmNcXLdqB2+muLZA == X-ME-Sender: X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 80D9FE4122; Wed, 28 Nov 2018 22:25:45 -0500 (EST) Date: Thu, 29 Nov 2018 12:25:42 +0900 From: Michael Paquier To: Stephen Frost Cc: splarv@ya.ru, pgsql-docs@lists.postgresql.org Subject: Re: Return codes for archive and restore commands Message-ID: <20181129032542.GL626@paquier.xyz> References: <154340283171.1324.10549444217937216132@wrigleys.postgresql.org> <20181129022347.GH626@paquier.xyz> <20181129023957.GU3415@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3FyYKcuUbgqNYeqV" Content-Disposition: inline In-Reply-To: <20181129023957.GU3415@tamriel.snowman.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --3FyYKcuUbgqNYeqV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. 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. -- Michael --3FyYKcuUbgqNYeqV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlv/XDYACgkQnvQgOdby QH17aRAApGe8ACwwhicmlPnxCMQ54YqovaCHs12CNo4IMRPrDwUi5BvmEdjkQjRa eQeSMTpjSIyR66ruFCqWmIqYZzCIbTal4cjAXSRtVB7X5HsRFBB2OIZMUZ/tIWPs 52Z91ZRyZDV6Kgvsyy+D8NoAQM+k2QvgvZ1v1P9VO4t3NPzHWq+JIKY+3glM7EMP 4MkswylDOdraXTY1I1chNKuMScf4Zd2ozqqiYu/oKFgJI1GwOtG3ykr9N40h9YRe bMy7dGYnmEOWwT0ZMkfLGmrevxx5JJv2ILOw6eqs+SjyhAMEy5/uWY9JMXA81gCo 1XFIlapwMGdl1KadOMErn4NEpDc5vS69JuhdlQ2m+zk5b+phTJr15ha6tk/3Q3IV U0iKWNLAe7OyDX+qVErALFMuNN7dhfUS6Oja0F50bJN04zFaOwL+KDZp/2Hrenag ZXX1Gm0KpZRfkWouILXB05j8Jr9UvKtTCY4wE3+eT8Sovu5ro6q0gqcVwt0ou+fn cUR6eO8Ws4yh2oti/DsS/E3Ur99M7yuFmWD2hVJ4qledknd5eMgqetmWJ8aubKLw utebJVvHyJKDMIgKk1cggGqZ2WsKn2BCCh+cy2u1Isn8d/f3rZXEkuH/0fC2qSeA FvWG+GKyWadJ9iwcG29ejlOV0aHaOs3Oz47ri726S6N2kZBK9BU= =GJT4 -----END PGP SIGNATURE----- --3FyYKcuUbgqNYeqV--