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 1jbeE9-0001f1-Gw for pgsql-general@arkaria.postgresql.org; Thu, 21 May 2020 05:58:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jbeE7-0003BN-K2 for pgsql-general@arkaria.postgresql.org; Thu, 21 May 2020 05:58:43 +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 1jbeE7-0003BG-Bw for pgsql-general@lists.postgresql.org; Thu, 21 May 2020 05:58:43 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbeE4-0005mn-Bi for pgsql-general@postgresql.org; Thu, 21 May 2020 05:58:42 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id A14815C00D1; Thu, 21 May 2020 01:58:38 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 21 May 2020 01:58:38 -0400 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=fm1; bh=PO4hgL25BuovJJGOkpAAu10+Wty DwFnDv6yaoszH1Ew=; b=H+L4p7EPstKTqgYccrm/+st7NEzp5q+E00qUzhxc/LZ Ie8roJp0t1ry5lZ2d9D+s6eQz/rAuNZI4eeFYO4JEBTZtz/m4OKVbIDHDlf4blhk vB/nscFMsr0pIob1IN75LKnROsN2rPFW+37tXGldovurUXmMBB3FjPTjfxIzVF3L tN18tK80IvHaQcVB5TcTQqrZXKbPJnnBiY7N61spPX7+H8Tv6rLg32MD2w4hZGri fKt2IHVoH+tWAQSS/GtH2wPk18OVUOKPUgLNp0inp8VlRyTWQh+00C0/FOCsQe24 GHtZS/2U+QbwG0y/5wtnVZmHerD2eNao+dC+Bn1Pb+A== 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=fm2; bh=PO4hgL 25BuovJJGOkpAAu10+WtyDwFnDv6yaoszH1Ew=; b=vb4EzK/y//uUKG27apXlox q2M47sDsyJVUlot19Cdk0Dy9d4hAmFzjCPR9T2nwt5uWm0VghCo/qgEN1p4rqxkY gIT3GXYJCmghp1sPEBEnzT6eayDGYySvN/YyOOTsFS2OPuWOX2tYIboUkilrfTW5 KvTxTdrxrB0Qgbh4OPPyKi5QymfPs5ntbFG2DTUVaOw9oZaZrPtECqETGpTmkxQE vqK3zoWwFEqZbcwD+NPrKtiAZ4Io2GPTZSQ8eReAWocgl6rcFNmpgMDy7Hji92Ri 7B+bOQr57te3XAtheA5fp8UH5mWowkKO4dy9MiIHRviixcf1HQiWJTSOJH6RrUGw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddutddgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrh hnpedvgeduuefhtdeuleettdevjeehheeiveeuieegleetgeeljeelieeuieehgeevhfen ucfkphepudduuddruddtvddrudektddrudekheenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id A892C3066476; Thu, 21 May 2020 01:58:36 -0400 (EDT) Date: Thu, 21 May 2020 14:58:33 +0900 From: Michael Paquier To: Kyotaro Horiguchi Cc: adrian.klaver@aklaver.com, kobruleht2@hot.ee, pgsql-general@postgresql.org Subject: Re: How to recover from compressed wal archieve in windows Message-ID: <20200521055833.GK2355@paquier.xyz> References: <20200521012738.GI2355@paquier.xyz> <1b0b4e55-8206-903e-89aa-3dc2ef4f46fb@aklaver.com> <20200521.133811.1335593976252095567.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EEx6GiKZGZ1wKUra" Content-Disposition: inline In-Reply-To: <20200521.133811.1335593976252095567.horikyota.ntt@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --EEx6GiKZGZ1wKUra Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 21, 2020 at 01:38:11PM +0900, Kyotaro Horiguchi wrote: > Difference from decompression by restore_command? >=20 > A WAL (segment) file is filled with multiple WAL records. The "full > page image", which is described to be compressed by the parameter, is > a part of WAL record. A WAL file is filled with maybe-compressed WAL > records and has the same size in the case where wal_compression is on. Well, to be more precise, one or more full page images may be included in a single record, and they may, or may actually not, have up to two level of "compression" applied to them: - A full page image may be logged without the hole in the middle of the page, reducing its actually size logged. - It would be reduced in size further more if wal_compression is enabled. So you actually have four possible cases for a full-page image: - Logged with its full 8kB data, with its hole included. - Logged without its hole. - Logged with its 8kB data and its hole, compressed with pglz. - Logged without its hole, and compressed with pglz. When a page is logged, we register in the record if the hole of the logged full-page image is included or not, and if the page is compressed with pglz or not. Then WAL replay looks at those flags, and determines what to do by itself when the page image is needed. -- Michael --EEx6GiKZGZ1wKUra Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl7GGIkACgkQnvQgOdby QH3IUg//SGQwY03tNvBqHK+MLuu6QeiVh5WIEHNSdDRQ/rBCWl/IuiiA634lI3Xm NiKPQLVLHJJwc6xdWYlj4aG1X+Qvypit574jEvrtAS7Wf/RZQHZ0OiTmVGC0R3Cu j5Ib+y27F033rF4A+IIhRrgS98FcKM00yS7BhxdpWs1DFm5CHLWuGrWe22aCc3BY LnpjXlDD8vD6tNuOKJpzYe4a7t4E1HMUJST0kWLOmx4vTR0vt9D8z1tTebsw8syM R5oTX4InDC3eCD2Jx8B4xOtVUR9NkXsupIFNhBZ0fLWeE3fUCzfpCQ/u8YkTSpNU Osq9Tv54RH2GX5dqvhuOfqLaGiSfsD1+sSiRr/6RnKGYaLxP6ENGJDLlldRX3rEs /4EO0CwD4GI02hiVUUm1vq0YeRXE1GBUNOtuEaA7vPvNla9SrR7FX1vg3b9WmQHB qSqN4hlYacu5UfRw/1QsLq9jqbHx7SYDh07zppdFeOnEv3hCTs/K5afyWZ0pGLo4 ZykMuPbO7yZ6/s8z9LxKr+Z70OV/jd5QSpV8aO6LTfViIbsQRXTbnT1zMIUlgan4 mTN4cJCBxcazqzTHW7xK0n2bQZjmw9Dmhxz2oBXb4kMFZDMSA5qD2yVmIsSIemNr bEXMPMdxKP1SYv3h0JiIItBGo4tA4q8SmDbvpkD8FmUR8H8gwWw= =6Ydj -----END PGP SIGNATURE----- --EEx6GiKZGZ1wKUra--