Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file
Richard Huxton wrote: > Reading Tom's posting here: > http://archives.postgresql.org/pgsql-general/2006-04/msg00499.php > > I just realised we don't seem to mention this in the docs anywhere. I > propose adding a short paragraph to 23.3.1 > http://www.postgresql.org/docs/8.1/static/backup-online.html#BACKUP-ONLINE-CAVEATS > > After "Except in the case of retrying a failure, it will be called only > once for any given file name." > > To identify the current, partially-filled WAL segment, sort first by > mtime and second by file name. That is, take the latest mtime among the > properly-named files, breaking ties by taking the higher filename. I am confused by this. Why do both mtime and file name need to be checked? -- Bruce Momjian http://candle.pha.pa.us EnterpriseDBhttp://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file
Bruce Momjian writes: > Richard Huxton wrote: >> To identify the current, partially-filled WAL segment, sort first by >> mtime and second by file name. That is, take the latest mtime among the >> properly-named files, breaking ties by taking the higher filename. > I am confused by this. Why do both mtime and file name need to be > checked? Because recycled WAL segments are renamed to have higher file names than the currently-in-use segment. So you can't depend on file name first. However, shortly after a segment switch two WAL segments could have the same mtime (to within whatever the mtime granularity is, typ. 1 second). The proposed rule should be OK as long as checkpoints (and ensuing renames) can't occur oftener than the mtime granularity. If you're checkpointing more than once a second, well, you need help ... regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
