Subject: Re: Problem with mirrorring

From: "Dave Page" <[email-masked]>
Date: Sun, 3 Oct 2004 11:17:22 +0100

-----Original Message-----
From: John Hansen [mailto:[email-masked]]
Sent: Sun 10/3/2004 3:10 AM
To: Dave Page; Devrim GUNDUZ
Cc: PostgreSQL WWW Mailing List
Subject: RE: [pgsql-www] Problem with mirrorring

> Don't you mean quite efficient... ?

No, quite inefficient. We rebuild every file on the site regardless of whether something has changed, hence every time rsync runs it sees a modified file. What I had completely forgotten when I wrote that (and later noted when I remembered) is that rsync only transfers a diff of each files, so things aren't really that bad.

Of course, how it does that is a mystery to me - without fully comparing both versions, how can it create a diff? I guess that's what made it PhD material...

/D

---

From: Peter Eisentraut <[email-masked]>
Date: Sun, 3 Oct 2004 13:25:14 +0200

Dave Page wrote:
> Of course, how it does that is a mystery to me - without fully
> comparing both versions, how can it create a diff? I guess that's
> what made it PhD material...

It doesn't create a diff.  It computes checksums for pieces of the file 
and transfers those.

Apparently, though, it first checks the modification time before doing 
all that checksum stuff.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

---

From: "Marc G. Fournier" <[email-masked]>
Date: Sun, 3 Oct 2004 11:03:49 -0300 (ADT)

> Apparently, though, it first checks the modification time before doing

Right, and if you want, you can use the --size-only arg to rsync to 
disable the timestamp check and made it only a size check ... so, if the 
size doesn't change, the page wasn't actually modified ... and, I can't 
think of many situations where if hte file changed, the size wouldn't 
change by *at least* one character, but I imagine it could happen ...

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: [email-masked]           Yahoo!: yscrappy              ICQ: 7615664