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 1jbauG-0004zD-Ir for pgsql-general@arkaria.postgresql.org; Thu, 21 May 2020 02:26: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 1jbauF-0007HB-Fy for pgsql-general@arkaria.postgresql.org; Thu, 21 May 2020 02:25: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 1jbauE-0007Ev-Bo for pgsql-general@lists.postgresql.org; Thu, 21 May 2020 02:25:59 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbauA-0001yy-Jl for pgsql-general@postgresql.org; Thu, 21 May 2020 02:25:57 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 7FD2E1B2D; Wed, 20 May 2020 22:25:52 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 20 May 2020 22:25:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=7 B6QcjSybCI872n3YmgkTGoUW2XjgPc9mxAfE2qowHw=; b=uOB6rkWAeYjNgZjzK nmNDn631yvGMPoO6/Wln6tCkf9kSMFnnuumI3DTHHkkjS7JfDP0Rf07o1AO/slCE 1DgJTYnwhtS3isDG2fLLzAryy1C9eKnVGKAW7FQvxHU7k4+e0R0XOZWaatxILBCi vkenSFn6USwkO4RSTN1v5fy2GvvudJO+0aG8ywUyFOsQNbZpW1Lba1HngQQ+Xswt eUEtPaVlgfp4pPezrrIpNHlK9DFKcu96SRxJjQZQiWD7mNyLxCB/1MH0zi7cQImy oHqca1+NSOTUYrwKNo8PEEKDSUDclsDKaKVZbiypboJ5a631WBO6hlwxsvAojb0k Anybg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=7B6QcjSybCI872n3YmgkTGoUW2XjgPc9mxAfE2qow Hw=; b=3aCJfiXBeSDhBF6ju3Rz+jcsBf8YBeaPr4+QoDtiG35zA54Og8FNrNVXn CHjsnR7MD2LPbZweCy++xQl0hq+MBGYoKvKJlRrNwO45hdeK0uvUuU1wvR8O42T8 bm4QFqRhDsAMcmlFOyZ1OaVwbZTZ8AfwO3CRew/PfWaRoacnAt7zdYSNYCszF4d6 3OahXSHKJyvynAk1/55YA+sAoaa/CKGedVsxqO9wxwNymuCimFftT8qWnXNn/+YT vkUIfcUQdVmN5MIEBes2QHOSbUSMJVbXyVp6oaSqzGIA9DWSltsU+41pBMPyP9iG R6af8M0/s4QR6pa6LbiRFEgUbD7CA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddutddgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefheenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpedtgefflefhveeikeeguddufeetueegffdugedukeei tdelgeelgeehfffgkedvkeenucfkphepjeehrddujedvrdehrddvfedunecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 273FC306640A; Wed, 20 May 2020 22:25:51 -0400 (EDT) Subject: Re: How to recover from compressed wal archieve in windows To: Michael Paquier Cc: Andrus , pgsql-general References: <241F4C06123741D8BA0283C8690A5F12@dell2> <20200521012738.GI2355@paquier.xyz> From: Adrian Klaver Message-ID: <1b0b4e55-8206-903e-89aa-3dc2ef4f46fb@aklaver.com> Date: Wed, 20 May 2020 19:25:50 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200521012738.GI2355@paquier.xyz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/20/20 6:27 PM, Michael Paquier wrote: > On Wed, May 20, 2020 at 11:36:09AM -0700, Adrian Klaver wrote: >> The next problem is that I'm pretty sure a WAL file with *.gz extension will >> not be able to be processed directly by the server. So you are going to have >> to uncompress it at some point before it gets restored. > > The short answer to that question is no. The backend does not > uncompress the segment file. What happens is that the restore command > copies the file defined by %f to the location of %p where is gets > renamed to RECOVERYXLOG, and we expect the restore command to drop a > 16MB file in og_wal/. There is a check on the size, which would fail > if the WAL segment is still compressed. This logic is in > RestoreArchivedFile() in xlogarchive.c. I figured that would be the case. So how is this handled?: wal_compression (boolean) When this parameter is on, the PostgreSQL server compresses a full page image written to WAL when full_page_writes is on or during a base backup. A compressed page image will be decompressed during WAL replay. The default value is off. Only superusers can change this setting. > -- > Michael > -- Adrian Klaver adrian.klaver@aklaver.com