Re: tar, but not gnu tar - Mailing list pgsql-admin

From Tom Lane
Subject Re: tar, but not gnu tar
Date
Msg-id 17438.1187846304@sss.pgh.pa.us
Whole thread Raw
In response to Re: tar, but not gnu tar  (Bruce Momjian <bruce@momjian.us>)
List pgsql-admin
Bruce Momjian <bruce@momjian.us> writes:
> Tena Sakai wrote:
>> I had a bit of time to experiment with tar and star today
>> and I am no longer sure what the real issue is.  Perhaps
>> some of you can clarify.  Here's the test I ran:

> I don't think 'touch' is enough for tar to see the file as changed (you
> are only updating metadata).  (tar did complain but the file contents
> didn't so it is hard to say if that is a good test.)  You should change
> the file contents during the backup.

In fact, I'll bet that you have to change the file *length* during the
backup to trigger gnu tar's complaint.  If it were rigorously checking
for file content change, it'd have to read the whole of every file
twice, which hardly seems like overhead that anyone would accept.  But a
check for length change would just mean one extra stat() call per file,
which is a whole lot more plausible.

            regards, tom lane

pgsql-admin by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: tar, but not gnu tar
Next
From: "Tena Sakai"
Date:
Subject: Re: tar, but not gnu tar