WAL segmentes names in wrong order?

Started by Tom DalPozzoover 9 years ago5 messagesgeneral
Jump to latest
#1Tom DalPozzo
t.dalpozzo@gmail.com

Hi,
I found, in pg_xlog dir, several WAL segment files with old modification
timestamp but with their names greater than more recent files.
Ex.:
0000000100000000000000C6 modified today
0000000100000000000000DE modified yesterday

I thought it could not be possible.

I'm doing some tests with archiving and base backups.
Never performed a restore so far.
Sometimes I restared the server due to changes in conf files.
Never copied or manually handled files in pg_xlog dir.

What am I missing?
Regards
Pupillo

#2David Steele
david@pgmasters.net
In reply to: Tom DalPozzo (#1)
Re: WAL segmentes names in wrong order?

On 11/3/16 12:28 PM, Tom DalPozzo wrote:

Hi,
I found, in pg_xlog dir, several WAL segment files with old modification
timestamp but with their names greater than more recent files.
Ex.:
0000000100000000000000C6 modified today
0000000100000000000000DE modified yesterday

This is completely normal. WAL files are recycled so a file with a
later name can have an earlier timestamp. What this means is it is
available but has not been used to record transactions yet.

So, 0000000100000000000000C6 is the end of your current WAL stream.

--
-David
david@pgmasters.net

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

In reply to: Tom DalPozzo (#1)
Re: WAL segmentes names in wrong order?

On Thu, Nov 03, 2016 at 11:28:57AM +0100, Tom DalPozzo wrote:

What am I missing?

David already explained, but you might want to read also:
https://www.depesz.com/2011/07/14/write-ahead-log-understanding-postgresql-conf-checkpoint_segments-checkpoint_timeout-checkpoint_warning/

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
http://depesz.com/

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

#4Tom DalPozzo
t.dalpozzo@gmail.com
In reply to: hubert depesz lubaczewski (#3)
Re: WAL segmentes names in wrong order?

Hi,
so if I understand right, the ...DE file's previous name, was less than
...C6, then it was renamed in big advance for later use. I was missing this
advance.
Thanks!
Pupillo

2016-11-03 11:45 GMT+01:00 hubert depesz lubaczewski <depesz@depesz.com>:

Show quoted text

On Thu, Nov 03, 2016 at 11:28:57AM +0100, Tom DalPozzo wrote:

What am I missing?

David already explained, but you might want to read also:
https://www.depesz.com/2011/07/14/write-ahead-log-
understanding-postgresql-conf-checkpoint_segments-
checkpoint_timeout-checkpoint_warning/

depesz

--
The best thing about modern society is how easy it is to avoid contact
with it.

http://depesz.com/

#5David Steele
david@pgmasters.net
In reply to: Tom DalPozzo (#4)
Re: WAL segmentes names in wrong order?

On 11/3/16 1:16 PM, Tom DalPozzo wrote:

so if I understand right, the ...DE file's previous name, was less than
...C6, then it was renamed in big advance for later use. I was missing
this advance.

That is correct.

--
-David
david@pgmasters.net

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