Re: Postgres replication: dump/restore, PITR, Slony,...?

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Cc: pgsql-performance(at)postgresql(dot)org Content-Type: multipart/alternative; boundary=001636c5b2f03dc599046c12586b X-Virus-Scanned: Maia Mailguard 1(dot)0(dot)1 X-Mailing-List: pgsql-performance List-Archive: <http://archives(dot)postgresql(dot)org/pgsql-performance> List-Help: <mailto:majordomo(at)postgresql(dot)org?body=help> List-ID: <pgsql-performance(dot)postgresql(dot)org> List-Owner: <mailto:pgsql-performance-owner(at)postgresql(dot)org> List-Post: <mailto:pgsql-performance(at)postgresql(dot)org> List-Subscribe: <mailto:majordomo(at)postgresql(dot)org?body=sub%20pgsql-performance> List-Unsubscribe: <mailto:majordomo(at)postgresql(dot)org?body=unsub%20pgsql-performance>
Subject: Re: Postgres replication: dump/restore, PITR, Slony,...?
Date: 2009-06-12 19:11:42
Message-ID: 81ad7080454fa9b71eb7d7a159b1c636@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

> Currently we use dump (to SQL file, i.e. pg_dump with no args) + file copy
> to replicate the DB daily between the staging and web servers, and then
> restore (via psql) the servers one at the time. In our application we expect
> that average daily change is only to 3% of the records. My question is what
> would be the best way to do this replication?

Bucardo should handle this easy enough. Just install Bucardo, tell it about the
databases, tell it which tables to replicate, and start it up. If the tables
have unique indexes (e.g. PKs) you can use the 'pushdelta' type of sync, which
will copy rows as they change from the staging server to the web servers.
If the tables don't have unique indexes, you'll have to use the 'fullcopy'
sync type, which, as you might imagine, copies the entire table each time.

You can further control both of these to fire automatically when the data
on the staging server changes, or to only fire when you tell it to, e.g.
every X minutes, or based on some other criteria. You can also configure
how many of the web servers get pushed to at one time, from 1 up to
all of them.

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
End Point Corporation
PGP Key: 0x14964AC8 200906121509
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAkoyqFkACgkQvJuQZxSWSsjB8ACffcQRD+Vb7SV0RZnoo70hkpwB
nycAn0QDiogs3EuCrc9+h4rMoToTFopz
=Sltu
-----END PGP SIGNATURE-----

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Alan McKay 2009-06-12 19:52:19 what server stats to track / monitor ?
Previous Message Adam Gundy 2009-06-12 15:20:15 Re: GiST index performance