From: Michael Paquier <michael@paquier.xyz>
To: 彭昱傑 <k872892@gmail.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-performance@postgresql.org
Subject: Re: Too many .history file in pg_xlog takes lots of space
Date: Wed, 14 Mar 2018 16:04:43 +0900
Message-ID: <20180314070443.GE16179@paquier.xyz> (raw)
In-Reply-To: <CALCPtXZOBUickEJqMV-YtcGbxUfwntwUX0rAWypuO6Rpf-JoQQ@mail.gmail.com>
References: <CALCPtXZZWvYgfY-FVmUL8rxV6OrY2JUrFP56CRaYCXqOworbkA@mail.gmail.com>
<1521007012.2368.3.camel@cybertec.at>
<CALCPtXZOBUickEJqMV-YtcGbxUfwntwUX0rAWypuO6Rpf-JoQQ@mail.gmail.com>
On Wed, Mar 14, 2018 at 02:12:47PM +0800, 彭昱傑 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
Attachments:
[application/pgp-signature] signature.asc (832B, ../20180314070443.GE16179@paquier.xyz/2-signature.asc)
download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: michael@paquier.xyz, k872892@gmail.com, laurenz.albe@cybertec.at
Subject: Re: Too many .history file in pg_xlog takes lots of space
In-Reply-To: <20180314070443.GE16179@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox