Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ew0T3-0003pz-JH for pgsql-performance@arkaria.postgresql.org; Wed, 14 Mar 2018 07:04:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ew0T2-0006W8-6J for pgsql-performance@arkaria.postgresql.org; Wed, 14 Mar 2018 07:04:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ew0T1-0006Vy-N2 for pgsql-performance@lists.postgresql.org; Wed, 14 Mar 2018 07:04:55 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ew0Sv-0007Gt-1v for pgsql-performance@postgresql.org; Wed, 14 Mar 2018 07:04:54 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 48BFA160E; Wed, 14 Mar 2018 03:04:48 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Wed, 14 Mar 2018 03:04:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=hG02N7b4eIN0lOtyR9J8MdyaJqiCqT/df6OU/J5XIEs=; b=sKl5VgGq eZO+v1OpJtGbx2e8DNtGmxRRuINXicxZkVQ7YsuvCCONce4A1yi7dRaEnYy2GLUc OwtClAJUT/SnNlOLqGRpPB9mYnpYFVufJ/FVHZosT4t74ewRHDnDAzGWoQoi2xSb emG7MqfXQj7gegrVs5lWkXySRa0Ka47/L3VuAlBE+GLEjCXYG+JVAP7SliyxjeVj 2P2UyuT2Y8TUMks8ryWtfbD9nhc1ts326g99Th8wevWQ1UBkHlRb0eB1MPLJvsqT 9rna5Qt+Rijgg9p+C7+f4ybcKyc3e2l2CY8chKZ+y6Kg40xsZ5kdKQp4L4Si4VSN xIrVdXxoGY2mFw== 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-sender :x-me-sender:x-sasl-enc; s=fm2; bh=hG02N7b4eIN0lOtyR9J8MdyaJqiCq T/df6OU/J5XIEs=; b=lTxYQEgBooXXgBVVhvEPQDbenYzlQYyP9PYuFI0G4roF3 t8yaYUmzzB5PTQlD+Kjt8oum3r/eRuTLVdcmbbEL/9iXKAgejSbxMX+brmkMYaqh o/RbrNjYcX8m9jJFg4XpNru4z8Y6rajFYPskYcO/ieC5k+TIMYm+o/9HHsvVHoVZ hZI9cdJIpzKXFx1VyEvO9gIX/XsstzfSG3Fsz0LhtLtSV8Xal1X1WdbE4A03QFOT vgZcQvRx72W/AD0KZpatQkVni/izbMbk/3JzD7m8452wir2S7pSOik3tbesz5Wbb aYUfr9Fzx6Ji87LU495IAFEt3yK9wLN9kVtOxEJiA== X-ME-Sender: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 6EA8C24211; Wed, 14 Mar 2018 03:04:46 -0400 (EDT) Date: Wed, 14 Mar 2018 16:04:43 +0900 From: Michael Paquier To: =?utf-8?B?5b2t5pix5YKR?= Cc: Laurenz Albe , pgsql-performance@postgresql.org Subject: Re: Too many .history file in pg_xlog takes lots of space Message-ID: <20180314070443.GE16179@paquier.xyz> References: <1521007012.2368.3.camel@cybertec.at> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HuscSE0D68UGttcd" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --HuscSE0D68UGttcd Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 14, 2018 at 02:12:47PM +0800, =E5=BD=AD=E6=98=B1=E5=82=91 wrote: > It's useful information for me. Once archived, there is no need to keep them in the data folder as if needed at recovery the startup process would look for timeline history files where necessary if it needs to do a timeline jump. > I will examine my restart script, and study point-in-time-recovery. > Also remove unused history file. At the same time, the backend makes little effort to remove past timeline history files, and those are just a couple of bytes, which accumulate, so after a couple of hundreds of failovers you could bloat the data folder. Why not making their removal more aggressive at each restart point created? You don't need any history files older than the current timeline recovery is processing, so we could make the removal policy more aggressive. -- Michael --HuscSE0D68UGttcd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlqoyYsACgkQnvQgOdby QH3l2A/+LSkhXaV8DatwJzIbX4a1Q+FWaO9lF8A9y10616soNS5ykqTPORKgxvFO VwXNG95M58f8WWG3tV7SMmm+vUyBoA0oAvBx/YVMUh00N6C4yx+28O24qstqhvnQ /DPkkk/agu1RP8K1HhXjpfGMf+aqGvGY9hiadcEUE/CR/YxUbgiYfHgC+fhgEd3m AaXh/JBtGNdqWEIah+6D/j6hy2U1hAiPc7TMvgWl+6FPokZag576Op1C6Z1PWtH1 fPdtl7W8wFTO3ex9+ppGHVccIfhvaDSBrFl+L3LCudwTjtOkIe/0mBGzgK1cVds2 PD3hRT1veUHQfxEQ13cY1aJqq5CQo2UN2bLXX0wqcS8Rvr0Ex1NBK4WtrbgoWx1z YDI2NwismwEH70eDe6SBlwrN0n5KCXlUMhrDv6xQPAw7Yha9mQ8AYbSBgzGM1QKv +wvj/ExNkB4535GllzR2cktbmxri3wkkpHAnuqwmhDFSMzwIEIgAL9c2/r6bHX3C kRkBmq08QeplRotsinmZx/MtWW+5G29tzFji4aL0bEuFI1REd1eA4nb1Y5b6O3S/ WyE7YO2p1dITFMAvMAGlv+y5TOEyyNgRCKm4lPkxwFc7w2A4ZQb/JP8baeeuxqvg iXUbOUk9SBGQzJQpBC/cgD2FNNdaoS/2eoTAskFSKSbxYnKg9JQ= =K5rU -----END PGP SIGNATURE----- --HuscSE0D68UGttcd--