Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VHlc5-0006x2-3y for pgsql-general@arkaria.postgresql.org; Fri, 06 Sep 2013 02:17:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VHlc4-0008MS-K0 for pgsql-general@arkaria.postgresql.org; Fri, 06 Sep 2013 02:17:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VHlc3-0008MI-2s for pgsql-general@postgresql.org; Fri, 06 Sep 2013 02:17:31 +0000 Received: from s344.xrea.com ([203.189.105.163]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VHlbw-0000vA-AK for pgsql-general@postgresql.org; Fri, 06 Sep 2013 02:17:29 +0000 Received: (qmail 25408 invoked by uid 89); 6 Sep 2013 11:17:17 +0900 Received: from east74-p215.eaccess.hi-ho.ne.jp (HELO Piedra.local) (hironobu@interdb.jp@211.14.40.216) by s344.xrea.com with SMTP; 6 Sep 2013 11:17:17 +0900 Message-ID: <52293B2C.8060202@interdb.jp> Date: Fri, 06 Sep 2013 11:17:16 +0900 From: Suzuki Hironobu User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: "ascot.moss@gmail.com" CC: pgsql-general general Subject: Re: Question About WAL filename and its time stamp References: <1C16813DAFF3E44B939586605D40E9F011505B10@ESESSMB107.ericsson.se> <522815DA.7070300@hogranch.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@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