From: | Johannes Konert <jkonert(at)t3go(dot)de> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_xlog - files are guaranteed to be sequentialy named? |
Date: | 2007-06-13 17:05:11 |
Message-ID: | 467023C7.3060007@t3go.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Johannes Konert wrote:
> But during the day I came out with an solution: I store the WAL-files
> with the time-stamp of archiving in their file-name. Thus I can order
> and delete them safely.
> Your hint was the one, that helped me to find that solution - so
> thanks for that, Greg.....and the others.
That solution has still a problem: It workes fine in case that the
WAL-naming restarts with 000000000000000000000001, because the attached
timestamp in name would still make it possible to identify the file as
being a newer one as FFFFFFFFFFFFFFFFFFFFFFFF, but there is still the
problem with shifts in time itself.
If someone corrects the servers computer-time/date to a date before
current time (e.g. set the clock two hours back), then the newer WAL
files will have an older timestamp and will be deleted by accident.
Thus now I increase the number of characters of the filename to infinite
and the last 24 characters are the WAL file name. Thus the archived
filenames ~always~ increase in naming and all backup files before the
last base backup can be safely identified not relying on computer
timestamps or with the risk of a restart in naming by postgresql.
I hope this solutions only border is the 255 character restriction of
file-name length....but if that one will be reached in future times I am
sure longer names are possible :)
Regards Johannes
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2007-06-13 17:54:11 | Re: pg_xlog - files are guaranteed to be sequentialy named? |
Previous Message | Johannes Konert | 2007-06-13 16:42:40 | Re: pg_xlog - files are guaranteed to be sequentialy named? |