pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Suzuki Hironobu <hironobu@interdb.jp>
To: ascot.moss@gmail.com <ascot.moss@gmail.com>
Cc: pgsql-general general <pgsql-general@postgresql.org>
Subject: Re: Question About WAL filename and its time stamp
Date: Fri, 06 Sep 2013 11:17:16 +0900
Message-ID: <52293B2C.8060202@interdb.jp> (raw)
In-Reply-To: <AE703685-2FBB-46D1-9264-6793C715C96E@gmail.com>
References: <1C16813DAFF3E44B939586605D40E9F011505B10@ESESSMB107.ericsson.se>
	<522815DA.7070300@hogranch.com>
	<AE703685-2FBB-46D1-9264-6793C715C96E@gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

Hi,


(13/09/05 22:19), ascot.moss@gmail.com wrote:
> Hi,
>
>  From the pg_xlog folder, I found some files with interesting time stamps: older file names with newer timestamps, can you please advise why?
>
> Set 1: How come 0000000400000F490000008D is 10 minutes newer than 0000000400000F490000008E?
> -rw------- 1 111 115 16777216 Sep  4 15:28 0000000400000F490000008C
> -rw------- 1 111 115 16777216 Sep  4 15:27 0000000400000F490000008D <===
> -rw------- 1 111 115 16777216 Sep  4 15:17 0000000400000F490000008E <====
> -rw------- 1 111 115 16777216 Sep  4 15:26 0000000400000F490000008F
> -rw------- 1 111 115 16777216 Sep  4 15:27 0000000400000F4900000090

WAL files will be recycled.
For example:

sampledb=# select pg_xlogfile_name(pg_current_xlog_location());
      pg_xlogfile_name
--------------------------
  000000010000000000000004
(1 row)

-rw-------.  1 postgres postgres 16777216 Sep  6 10:55 
000000010000000000000001
-rw-------.  1 postgres postgres 16777216 Sep  6 10:56 
000000010000000000000002
-rw-------.  1 postgres postgres 16777216 Sep  6 10:57 
000000010000000000000003
-rw-------.  1 postgres postgres 16777216 Sep  6 10:58 
000000010000000000000004  <--- current WAL

After a few minutes,

sampledb=# select pg_xlogfile_name(pg_current_xlog_location());
      pg_xlogfile_name
--------------------------
  000000010000000000000006
(1 row)

-rw-------.  1 postgres postgres 16777216 Sep  6 11:01 
000000010000000000000004 <-- Time of the last write.
-rw-------.  1 postgres postgres 16777216 Sep  6 11:02 
000000010000000000000005
-rw-------.  1 postgres postgres 16777216 Sep  6 11:02 
000000010000000000000006 <-- current WAL
-rw-------.  1 postgres postgres 16777216 Sep  6 10:55 
000000010000000000000007 <-- old name is 000000010000000000000001
-rw-------.  1 postgres postgres 16777216 Sep  6 10:56 
000000010000000000000008 <-- old name is 000000010000000000000002
-rw-------.  1 postgres postgres 16777216 Sep  6 10:57 
000000010000000000000009 <-- old name is 000000010000000000000003


Timing of recycling depends on the situation. If the time stamp of 
current WAL file is the most recent compared with other WAL files, there 
is no contradiction.
(I wonder that the time stamp of 0000000400000F490000008C is the most 
recent.)



> Set 2: why files,  0000000400000F48000000FD,  0000000400000F48000000FE and 0000000400000F4900000000, are not reused?
> 1) -rw------- 1 postgres postgres 16777216 Sep  4 23:07 0000000400000F48000000FA
> 2) -rw------- 1 postgres postgres 16777216 Sep  4 23:08 0000000400000F48000000FB
> 3) -rw------- 1 postgres postgres 16777216 Sep  4 23:09 0000000400000F48000000FC  <===
> 4) -rw------- 1 postgres postgres 16777216 Sep  4 14:47 0000000400000F48000000FD  <====
> 5) -rw------- 1 postgres postgres 16777216 Sep  4 14:46 0000000400000F48000000FE
> 6) -rw------- 1 postgres postgres 16777216 Sep  4 14:46 0000000400000F4900000000

This is the specification of WAL. This specification changes from 9.3.


regards



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



view thread (3+ messages)  latest in thread

Message-ID: <52293B2C.8060202@interdb.jp>
Permalink:  ../52293B2C.8060202@interdb.jp/
Also on:    postgresql.org/message-id/52293B2C.8060202@interdb.jp

 · 

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: hironobu@interdb.jp, ascot.moss@gmail.com, pgsql-general@postgresql.org
  Subject: Re: Question About WAL filename and its time stamp
  In-Reply-To: <52293B2C.8060202@interdb.jp>

* 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