Re: Copying data files to new hardware?

From: Vick Khera <vivek(at)khera(dot)org>
To: Postgresql Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Copying data files to new hardware?
Date: 2010-10-14 13:17:22
Message-ID: AANLkTinOn1fmddmaVepEYTyXPf=BABz0e=jBpGrnfe8V@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Wed, Oct 13, 2010 at 12:59 PM, Evan D. Hoffman
<evandhoffman(at)gmail(dot)com> wrote:
> The Slony method is one I hadn't considered.  Since our database is so
> large, even a direct file copy would require some downtime (since we'd
>

If you do go the slony route, you may want to do the replication
incrementally. That is, instead of configuring all of your tables all
in one slony "set", group your tables (possibly even having one table
per set if they are really big) and adding one set at a time. The
initial copy slony does requires it all to be done in one transaction,
so if it takes days to copy and populate the database you will have an
open transaction for that long on your master. This will impact your
vacuums at the least.

It will let you skip versions. Two years ago we went from 8.1 to 8.3
using slony, and this week I'm moving from 8.3 to 9.0. We run slony
continuously anyway, just to keep a live streaming copy of our data,
so using it is natural for us.

There is a mailing list dedicated to slony if you're looking for more
assistance.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Lukasz Brodziak 2010-10-14 14:09:14 Winsock error 10061 confusion
Previous Message Sebastien 2010-10-14 10:59:04 Connect to a server with SSL encrypted connection?

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2010-10-14 13:25:24 Re: Passing refcursors between pl/pgsql functions
Previous Message Peter Hopfgartner 2010-10-14 12:39:58 Re: Getting FATAL: terminating connection due to administrator command