From:
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To:
"Robert Haas" <robertmhaas(at)gmail(dot)com>, "Stephen Frost" <sfrost(at)snowman(dot)net>
Cc:
"Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "Magnus Hagander" <magnus(at)hagander(dot)net>, "Dave Page" <dpage(at)pgadmin(dot)org>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject:
Re: Streaming a base backup from master
Date:
2010-09-03 15:02:06
Message-ID:
4C80C79E0200002500035171@gw.wicourts.gov (view raw or flat )
Thread:
2010-09-03 11:19:20 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-09-03 11:25:35 from Thom Brown <thom(at)linux(dot)com>
2010-09-03 11:30:02 from Magnus Hagander <magnus(at)hagander(dot)net>
2010-09-03 11:32:51 from Thom Brown <thom(at)linux(dot)com>
2010-09-03 11:43:49 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-09-03 11:28:12 from Dave Page <dpage(at)pgadmin(dot)org>
2010-09-03 11:48:55 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-09-03 11:50:09 from Magnus Hagander <magnus(at)hagander(dot)net>
2010-09-03 13:24:19 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-09-03 13:26:41 from Magnus Hagander <magnus(at)hagander(dot)net>
2010-09-03 13:26:49 from Dave Page <dpage(at)pgadmin(dot)org>
2010-09-03 13:29:43 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-09-03 13:32:42 from Dave Page <dpage(at)pgadmin(dot)org>
2010-09-03 13:43:13 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-09-03 13:56:12 from Stephen Frost <sfrost(at)snowman(dot)net>
2010-09-03 15:02:06 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2010-09-03 15:20:08 from Stephen Frost <sfrost(at)snowman(dot)net>
2010-09-03 15:32:20 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2010-09-03 15:47:45 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-09-03 15:53:06 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-09-03 15:53:09 from David Blewett <david(at)dawninglight(dot)net>
2010-09-03 16:23:20 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-09-03 20:56:39 from David Blewett <david(at)dawninglight(dot)net>
2010-09-03 16:09:04 from Stephen Frost <sfrost(at)snowman(dot)net>
2010-09-03 16:22:06 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-09-03 16:11:34 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2010-09-03 15:41:32 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-09-03 19:30:42 from Martijn van Oosterhout <kleptog(at)svana(dot)org>
2010-09-04 13:42:40 from Greg Stark <gsstark(at)mit(dot)edu>
2010-09-04 13:46:49 from Thom Brown <thom(at)linux(dot)com>
2010-09-05 02:58:25 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-09-05 15:51:38 from Martijn van Oosterhout <kleptog(at)svana(dot)org>
2010-09-06 14:07:59 from Greg Stark <gsstark(at)mit(dot)edu>
2010-09-06 22:09:50 from Robert Haas <robertmhaas(at)gmail(dot)com>
2010-09-08 01:28:39 from Bruce Momjian <bruce(at)momjian(dot)us>
2010-09-03 11:28:51 from Magnus Hagander <magnus(at)hagander(dot)net>
2010-09-03 12:16:25 from Greg Stark <gsstark(at)mit(dot)edu>
2010-09-03 12:28:58 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2010-09-03 15:01:36 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2010-09-03 15:22:35 from Thom Brown <thom(at)linux(dot)com>
2010-09-03 15:38:35 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Lists:
pgsql-hackers
Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> there's a heck of alot of complexity there that we *don't* need.
> rsync is a great tool, don't get me wrong, but let's not try to go
> over our heads here.
Right -- among other things, it checks for portions of a new file
which match the old file at a different location. For example, if
you have a very large text file, and insert a line or two at the
start, it will wind up only sending the new lines. (Well, that and
all the checksums which help it determine that the rest of the file
matches at a shifted location.) I would think that PostgreSQL could
just check whether *corresponding* portions of a file matched, which
is much simpler.
> we already break relations into 1G chunks (when/if they reach that
> size), so you won't necessairly be copying the entire relation if
> you're just doing mtime based or per-file-checksum based
> detection.
While 1GB granularity would be OK, I doubt it's optimal; I think CRC
checks for smaller chunks might be worthwhile. My gut feel is that
somewhere in the 64kB to 1MB range would probably be optimal for us,
although the "sweet spot" will depend on how the database is used.
A configurable or self-adjusting size would be cool.
-Kevin
In response to
Responses
pgsql-hackers by date
Next :From: David FetterDate: 2010-09-03 15:11:23
Subject : Windows Tools
Previous :From : Tom LaneDate : 2010-09-03 15:01:36
Subject : Re: Streaming a base backup from master