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

From Amit Langote
Subject Re: WAL segments (names) not in a sequence
Date
Msg-id CA+HiwqFVwX2Umq22fU2mywHkkzTQOqmtXQDDB-_v_iZS=cShMg@mail.gmail.com
Whole thread Raw
In response to Re: WAL segments (names) not in a sequence  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: WAL segments (names) not in a sequence  (Sergey Konoplev <gray.ru@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: WAL segments (names) not in a sequence
Next
From: Sergey Konoplev
Date:
Subject: Re: WAL segments (names) not in a sequence