pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gokhan Demir <demirgokhan@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: PostgreSQL WAL file issue
Date: Thu, 09 Nov 2017 09:59:39 -0500
Message-ID: <8333.1510239579@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOBOzNrbPh13XhEcxtRmYyQ4hKXH2AHNP_cfCXgVOgD0MRKF3Q@mail.gmail.com>
References: <CAOBOzNrbPh13XhEcxtRmYyQ4hKXH2AHNP_cfCXgVOgD0MRKF3Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Gokhan Demir <demirgokhan@gmail.com> writes:
> The issue I believe on PostgreSQL server is that server is creating WAL
> files whose names already exists on previous dates. The question I want to
> ask is: How is this possible and what can be do to fix it?

I don't know anything about barman, but the state of your server's pg_xlog
directory looks perfectly normal to me.  The active WAL file is evidently
000000010000000C0000007C, and the files before it have been successfully
archived, as indicated by the matching archive_status/*.done files.
There are also 17 "future" WAL files, 7D through 8D, waiting to be used.
(17 seems a bit high given that your consumption rate is only a couple
per day; I'd consider backing down the relevant configuration setting.
But it's not totally unreasonable.)

What's bugging you, I gather, is that the "future" WAL files have
timestamps older than any of the past or current ones.  That's normal
in a server that's been up for awhile, because "future" files are made
by renaming old ones that are no longer needed.  The alternative is to
drop them and fill new ones, which would just create extra disk traffic,
so we don't.

Archiving solutions should always pay attention to the existence of
archive_status files, not to the apparent file modification dates.
I'm sure barman gets that right, so I don't know what's causing
your actual problem.

			regards, tom lane


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (3+ messages)  latest in thread

Message-ID: <8333.1510239579@sss.pgh.pa.us>
Permalink:  ../8333.1510239579@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8333.1510239579@sss.pgh.pa.us

 · 

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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, demirgokhan@gmail.com
  Subject: Re: PostgreSQL WAL file issue
  In-Reply-To: <8333.1510239579@sss.pgh.pa.us>

* 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