Re: WAL segments (names) not in a sequence

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, German Becker <german(dot)becker(at)gmail(dot)com>
Subject: Re: WAL segments (names) not in a sequence
Date: 2013-05-23 08:25:58
Message-ID: CA+HiwqFVwX2Umq22fU2mywHkkzTQOqmtXQDDB-_v_iZS=cShMg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> Can pre-allocation go that further? for example, assuming
>> 000000010000000E00000080 is currently being used, then is it possible
>> that a segment named/numbered 00000001000000100000007E (which does
>> exist in his pg_xlog as he reported in pgsql-admin thread) is
>> pre-allocated already?
>
> Yes, if it's so old that it's no longer required for the crash recovery.
>
> WAL recycling is performed by checkpoint. Checkpoint always checks
> whether there are
> WAL files no longer required for crash recovery, IOW, WAL files which
> were generated
> before the prior checkpoint happened, and then if they are found,
> checkpoint tries to recycle
> them.
>

Okay, now I understand. Also, looking at his "ls -l pg_xlog", I could
find that modified timestamps of all those pre-allocated segments are
about similar (around 12:10), whereas the latest modified time (15:37)
is of segment 000000010000000E000000A7.

Wonder if whatever configuration he is using is sub-optimal that these
many WAL segments can be re-cycled upon a checkpoint? Or is this okay?

--
Amit Langote

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergey Konoplev 2013-05-23 08:29:17 Re: WAL segments (names) not in a sequence
Previous Message Fujii Masao 2013-05-23 08:15:24 Re: WAL segments (names) not in a sequence