On Wed, 2008-05-14 at 14:25 -0700, Andrew Hammond wrote: > I'd confirmation on how WAL files are named. I'm trying to write a > tool which can tell me when we are missing a WAL file from the > sequence. I initially thought that the file names were monotonically > incrementing hexadecimal numbers. This doesn't appear to be the case. > > 00000001000001B7000000FD > 00000001000001B7000000FE > (there seem to be a whole bunch of missing filenames in the sequence > here) > 00000001000001B800000000 > 00000001000001B800000001
... > Since I didn't specify a wal_segsize at compile time, it seems that my > XLogSegsPerFile should be > 0xffffffff / (16 * 1024 * 1024) = 255 > Which matches nicely with what I'm observing. Yes, thats the default. > So, and this is where I want the double-check, a tool which verifies > there are no missing WAL files (based on names alone) in a series of > WAL files needs to know the following. > > 1) Timeline history (although perhaps not, it could simply verify all > existing timelines) > 2) What, if any, wal_segsize was specified for the database which is > generating the WAL files Yes. I wouldn't worry too much about the timeline id. Getting them sequential within a single timeline is 99.998% of the problem. > Am I missing anything? The format of .backup files seem pretty simple > to me. So I intend to do the following. > 1) find the most recent .backup file > 2) verify that all the files required for that .backup exist > 3) see if there are any newer files, and > 4) if there are newer files, warn if any are missing from the sequence > > Would this be reasonable and is there any community interest in > open-sourcing the tool that I'm building? Sounds good. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers