pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Question About WAL filename and its time stamp
3+ messages / 3 participants
[nested] [flat]

* Question About WAL filename and its time stamp
@ 2013-09-05 13:19  ascot.moss@gmail.com <ascot.moss@gmail.com>
  0 siblings, 2 replies; 3+ messages in thread

From: ascot.moss@gmail.com @ 2013-09-05 13:19 UTC (permalink / raw)
  To: pgsql-general general <pgsql-general@postgresql.org>; +Cc: ascot.moss@gmail.com

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

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

regards=

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Question About WAL filename and its time stamp
@ 2013-09-06 02:17  Suzuki Hironobu <hironobu@interdb.jp>
  parent: ascot.moss@gmail.com <ascot.moss@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Suzuki Hironobu @ 2013-09-06 02:17 UTC (permalink / raw)
  To: ascot.moss@gmail.com <ascot.moss@gmail.com>; +Cc: pgsql-general general <pgsql-general@postgresql.org>

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Question About WAL filename and its time stamp
@ 2013-09-06 05:22  Haribabu kommi <haribabu.kommi@huawei.com>
  parent: ascot.moss@gmail.com <ascot.moss@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Haribabu kommi @ 2013-09-06 05:22 UTC (permalink / raw)
  To: ascot.moss@gmail.com <ascot.moss@gmail.com>; +Cc: pgsql-general general <pgsql-general@postgresql.org>

On 05 September 2013 18:50 ascot.moss wrote:

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

>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

In postgres every checkpoint end, it recycle or remove the old xlog files. During the recycle process it creates next set of xlog files
Which will be used later by database operations. The files FC, FD, FE and 00 are recycled files. Now the FC file is in use because of this
Reason the time stamp is different.

Regards,
Hari babu.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2013-09-06 05:22 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-09-05 13:19 Question About WAL filename and its time stamp ascot.moss@gmail.com <ascot.moss@gmail.com>
2013-09-06 02:17 ` Suzuki Hironobu <hironobu@interdb.jp>
2013-09-06 05:22 ` Haribabu kommi <haribabu.kommi@huawei.com>

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