Re: Too many .history file in pg_xlog takes lots of space

2018-03-14 Thread Michael Paquier
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 exa

Re: Too many .history file in pg_xlog takes lots of space

2018-03-14 Thread Alvaro Herrera
彭昱傑 wrote: > My postgre version is 9.4.9, and I face a space issue. Latest in 9.4 is 9.4.17, so you're missing about two years of bug fixes. > Every time I restart postgre server, it generates a new history file: That's strange -- it shouldn't happen ... sounds like you're causing a crash each

Re: Too many .history file in pg_xlog takes lots of space

2018-03-14 Thread Tom Lane
Alvaro Herrera writes: > 彭昱傑 wrote: >> Every time I restart postgre server, it generates a new history file: > That's strange -- it shouldn't happen ... sounds like you're causing a > crash each time you restart. Are you using immediate mode in shutdown > maybe? If so, don't; use fast mode inst