Re: Differential backup - Mailing list pgsql-hackers

From Michael Tharp
Subject Re: Differential backup
Date
Msg-id 4BD6F592.7080404@partiallystapled.com
Whole thread Raw
In response to Re: Differential backup  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: Differential backup  (Merlin Moncure <mmoncure@gmail.com>)
Re: Differential backup  (Hannu Krosing <hannu@2ndquadrant.com>)
List pgsql-hackers
On 04/27/2010 09:59 AM, Kevin Grittner wrote:
> Under what circumstances would PostgreSQL
> modify a file without changing the "last modified" timestamp or the
> file size?

Do all OSes have sub-second precision mtimes? Because otherwise I could 
see a scenario such at this:

* File is modified
* Backup inspects and copies the file in the same second
* File is modified again in the same second, so the mtime doesn't change
* Backup is run again some time later and sees that the mtime has not 
changed

Even with microsecond precision this kind of scenario makes me squidgy, 
especially if some OSes decide that skipping frequent mtime updates is 
OK. Florian's point about clock changes is also very relevant. Since 
Postgres has the capability to give a better answer about what is in the 
file, it would be best to use that.

-- m. tharp


pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: Differential backup
Next
From: Robert Haas
Date:
Subject: Re: recovery_connections cannot start