pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: 彭昱傑 <k872892@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Too many .history file in pg_xlog takes lots of space
Date: Wed, 14 Mar 2018 06:56:52 +0100
Message-ID: <1521007012.2368.3.camel@cybertec.at> (raw)
In-Reply-To: <CALCPtXZZWvYgfY-FVmUL8rxV6OrY2JUrFP56CRaYCXqOworbkA@mail.gmail.com>
References: <CALCPtXZZWvYgfY-FVmUL8rxV6OrY2JUrFP56CRaYCXqOworbkA@mail.gmail.com>

彭昱傑 wrote:
> My postgre version is 9.4.9, and I face a space issue.
> 
> Every time I restart postgre server, it generates a new history file:
> 0000156A.history =>  0000156B.history
> 
> Now it takes a lot of space about 800MB (5787 history file):
> [...]
> Is  file 00001570.history important?

A new history file is created when a new timeline is opened,
which happens after point-in-time-recovery or promotion of
a physical standby server.

There must be something weird in the way you start PostgreSQL.
Examine the start script, maybe you can fix the problem.

These files are only necessary for point-in-time-recovery,
so you don't have to retain them any longer than you retain
your WAL archives.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




view thread (7+ messages)  latest in thread

Message-ID: <1521007012.2368.3.camel@cybertec.at>
Permalink:  ../1521007012.2368.3.camel@cybertec.at/
Also on:    postgresql.org/message-id/1521007012.2368.3.camel@cybertec.at

 · 

reply

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: laurenz.albe@cybertec.at, k872892@gmail.com
  Subject: Re: Too many .history file in pg_xlog takes lots of space
  In-Reply-To: <1521007012.2368.3.camel@cybertec.at>

* 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