Re: WAL segments (names) not in a sequence - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: WAL segments (names) not in a sequence
Date
Msg-id CAHGQGwHrzQfq_9PH7M18RxxG6EVfUTDmcStiZhdA+VL0EYDYdg@mail.gmail.com
Whole thread Raw
In response to WAL segments (names) not in a sequence  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: WAL segments (names) not in a sequence
List pgsql-hackers
On Thu, May 23, 2013 at 10:10 AM, Amit Langote <amitlangote09@gmail.com> wrote:
> A PostgreSQL user recently reported on pgsql-admin about an issue:
> when he changed wal_level from 'minimal' to 'hot_standby', the WAL
> segment sequence rewound, that is, it started using old names. A
> snippet of his "ls -lrt pg_xlog":
>
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000000F000000B3
> -rw------- 1 postgres postgres 16777216 May 21 12:13 00000001000000100000000A
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000001000000036
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000001000000008
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000000F000000F6
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000000F000000E4
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000000F000000F2
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000001000000003
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000000F000000D5
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000000F000000A9
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000000F000000D6
> -rw------- 1 postgres postgres 16777216 May 21 12:13 00000001000000100000004E
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000000F000000D8
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000000F000000B4
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000000F000000BA
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000000F000000C3
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000001000000071
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000001000000047
> -rw------- 1 postgres postgres 16777216 May 21 12:13 000000010000001000000026

I think these are the WAL files that were preallocated by WAL
recycling but have not
been used yet.

> # WAL after wal_level changed from 'minimal' to 'hot_standby'
>
> -rw------- 1 postgres postgres 16777216 May 21 12:27 000000010000000E0000007B
> -rw------- 1 postgres postgres 16777216 May 21 12:35 000000010000000E0000007C
> -rw------- 1 postgres postgres      276 May 21 12:35
> 000000010000000E0000007C.00000020.backup
> -rw------- 1 postgres postgres 16777216 May 21 14:53 000000010000000E0000007D
> -rw------- 1 postgres postgres 16777216 May 21 14:53 000000010000000E0000007E
> -rw------- 1 postgres postgres 16777216 May 21 14:53 000000010000000E0000007F
> -rw------- 1 postgres postgres 16777216 May 21 14:53 000000010000000E00000080

These are the WAL files that you now used. So I don't think that WAL
file sequence rewound
in this case.

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: MVCC catalog access
Next
From: Amit Langote
Date:
Subject: Re: WAL segments (names) not in a sequence