Re: pg_xlog - files are guaranteed to be sequentialy named? - Mailing list pgsql-general

From Frank Wittig
Subject Re: pg_xlog - files are guaranteed to be sequentialy named?
Date
Msg-id 467038D8.7070504@weisshuhn.de
Whole thread Raw
In response to pg_xlog - files are guaranteed to be sequentialy named?  (Johannes Konert <jkonert@t3go.de>)
Responses Re: pg_xlog - files are guaranteed to be sequentialy named?  (Frank Wittig <fw@weisshuhn.de>)
List pgsql-general
Hello Johannes,

Johannes Konert schrieb:
> Thus the newest WAL xlog-file is on top and I can delete all not needed
> files at the bottom of the list.

You're using pg_controldata to figure out which file's serial is older
than the latest redo checkpoint.
In case of restart of the slave server PgSQL needs all files that were
archived beginning with the one right after the latest redo checkpoint
or it will fail to sync to its master.


> What happens if the 24hexdigits reach upper bound?

Did you calculate you question? I assume no.

24 Hex digits means 24^16 unique file names. Assuming your server saves
a WAL file each second (you should review your config it it does) it
takes (24^16)/(60*60*24*365)=3.84214066×10^14 years to reach the upper
bound. (Plase forgive me ignoring leap years ;))
I assume that there will be a system change before that date so counting
will start over again. ;)

Greetings,
Frank Wittig


Attachment

pgsql-general by date:

Previous
From: Greg Smith
Date:
Subject: Re: changing the /tmp/ lock file?
Next
From: Ben
Date:
Subject: Re: changing the /tmp/ lock file?