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 1mx0Wo-0002uP-ET for pgsql-general@arkaria.postgresql.org; Tue, 14 Dec 2021 05:39:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mx0Wn-0007Uo-9h for pgsql-general@arkaria.postgresql.org; Tue, 14 Dec 2021 05:39:05 +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 1mx0Wm-0007UX-VT for pgsql-general@lists.postgresql.org; Tue, 14 Dec 2021 05:39:04 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mx0Wk-00072Q-Jg for pgsql-general@lists.postgresql.org; Tue, 14 Dec 2021 05:39:04 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6E7245C034E; Tue, 14 Dec 2021 00:39:00 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 14 Dec 2021 00:39:00 -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=sWos2DW7nzxAu+VlkYPNRlD5Jul FLlRHhjB37WUXJhs=; b=khKxT3baEq5dzIqeXeQlD9/bwspIm8iEuuJ+e3dUdvs fimjThiPfJOM0OxDd1jVfJInDNWQfv8X2/2UCkCU4nDFsK4N3KeYeOW+w8UNQS9J Y7o52ymzovB03XIePZ0xC7NlHIxvU5nKpchR6mS0xE9JRd/G/7c7KbeNAipkYfzs Fj9eqmzkwN71r+0jiPhwcHPK4SkpvCeNlmRMywDYz5/RpDbsAuf+sowRWTwxNSjr EVSN6L82zvzbwHfs35GhBq6z8ykKKViHlDpxhOdtKIIsjufK92Yr+f85Aqg3tsRK uypbv4WjPTEP/rWUaqcInrmr5muC0pCCX/IoUyGgUyw== 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=sWos2D W7nzxAu+VlkYPNRlD5JulFLlRHhjB37WUXJhs=; b=Aojy9PvgE+nZdsx0EeBKF3 n6IoifXjXDrlYGQ/4BXBMTsHTQw0OPBJwcku5hGhyn6mZ5/YoWkfPNwx8Cs/k8T1 79y2DN00At8Cxb3pRvwKhi3BF56Ov9hCPTHBNWpep7hvfbxAOQ8BwfDCMw4xfPxY DQEiJgasdkHzCPhrGbJeVeHqO0mB4QI71z2kxOqkMcuJwhNZtaG0w6tVxv5AOTXj 9y2n102HvSMi/uK4lJTj7Oz0dQStwprluuDZ8utCagbdd7lDy+jE+634AwRasyc5 6tRa2p1msVv4ghID72natV3zQAtQwFBvcOCAucCmiyhCSmr2BGuwgX24VoVF7RVw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrkeelgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveejheeh ieevueeigeelteegleejleeiueeiheegvefhnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Dec 2021 00:38:58 -0500 (EST) Date: Tue, 14 Dec 2021 14:38:55 +0900 From: Michael Paquier To: Marc Millas Cc: "pgsql-general@lists.postgresql.org" Subject: Re: log shipping with pg_receivewal Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="U/Z9ZGFQZA4Go5ib" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --U/Z9ZGFQZA4Go5ib Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 14, 2021 at 05:25:04AM +0100, Marc Millas wrote: > My question: as the synchronous option is supposed to make pg_receivewal > write transaction immediately in the wal files, is there a way to ask the > standby to apply them on the fly ie. without waiting a wal file change ? Nope, there is no such option. First, pg_receivewal strongly relies on the rename of WAL segment to its correct name once completed. If there is any failure, we would start back at the beginning of the last partial segment found. Saying that, you could do things by using a restore_command that checks after a .partial file directly in the path used by pg_receivewal to store the archives, and Postgres would repeatedly ask for a segment once it is out. But really, this is going to be really expensive as a restore_command would copy a full file, so that's a lot of bandwidth wasted away for nothing. Streaming replication would be likely your best, and cheapest, option here. -- Michael --U/Z9ZGFQZA4Go5ib Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmG4Le8ACgkQnvQgOdby QH3EWQ//RVdyYFC2r5Ri4qoBcYQ7rHFmPFXL3s3WpkSmvMakGmQA0pCrGtw93JzC s4kwo/4J1ySjLTAezEx/pbimAlC6L2Ktx4TcqZ5mtBCLPxfomdMSsrHIOE1Hi4tQ j/ozLl6F5g/I0ALruUd68EQeEeOrKx+5KtpCfQ8lXqdYoxeJklYNDZmgzgz55hY4 aAw8Bk3niQ6pBHFGUA5AGJ2rLLIhqOOWHLLCTL+VB5krczifwL5Ti/HDmKTwMLO+ wB01x9qHAEjmGsYwEqaPdF+qBNTgDXDLKPISANHxKU/RkWJ/MdqgtUr/zpDAayHG XfVpo8cFEkHXAmmE9ZtFTC/4dh88mh91uomQrGvptKuUpl7iSEjy1zc9QH/Ik1mr QzcUNoAJLviPB1lgnv3NXxSXWhdBSDbdPzGu8pSD9aXj3iNHM5zspKlKTyx/nSdW 6DEet/el0zLt+kEggpe3/SLgs8EvJXEplO7f8INpq2+NLHrX48GjXrgDLWvs+1ZE xUFE1XGZ3uM4EYkr3hl/kazjFVI9Usn7ZGRQt38yThfwG9KLMhL6w0iBzVzgE/Z0 zQ++qtBDe6K1S/3Y15XvfExEmirJ6t+fLCBFqgD2Lk6JSHQ2G8RIY7jOgCOikaw6 538QQ+/F3O7AddAJ/SobGlk1tebGh0JbSWFdN7wqG+xpVA3SHp8= =VP68 -----END PGP SIGNATURE----- --U/Z9ZGFQZA4Go5ib--