Re: pg_upgrade and rsync

From: David Steele <david(at)pgmasters(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_upgrade and rsync
Date: 2015-01-29 23:53:21
Message-ID: 54CAC7F1.9030603@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/29/15 12:42 PM, Josh Berkus wrote:
> On 01/29/2015 09:11 AM, Bruce Momjian wrote:
>> On Thu, Jan 29, 2015 at 12:09:58PM -0500, Andrew Dunstan wrote:
>>> Then step 2 should specify that it's for the master.
>> Right. Josh is just listing all the steps --- the pg_upgrade docs
>> already have that spelled out in detail.
> What I'm also saying is that, if we expect anyone to be able to follow
> all of these steps, it has to be very explicit; just saying "Follow the
> pg_upgrade docs but don't start the master yet" isn't clear enough,
> because the pg_upgrade docs have a few alternative paths.
>
> On the whole, I personally would never follow this procedure at a
> production site. It's way too fragile and easy to screw up.

I'm in agreement with Josh - I would not use this method. I may be
wrong, but it makes me extremely nervous.

I prefer to upgrade the primary and get it back up as soon as possible,
then take a backup and restore it to the replicas. If the replicas are
being used for read-only queries instead of just redundancy then I
redirect that traffic to the primary while the replicas are being
upgraded and restored. This method has the least downtime for the primary.

If you want less downtime overall then it's best to use the hot rsync /
cold rsync with checksums method, though this depends a lot on the size
of your database.

Ultimately, there is no single best method. It depends a lot on your
environment. I would prefer the official documents to contain very safe
methods.

--
- David Steele
david(at)pgmasters(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2015-01-29 23:57:44 Re: pg_upgrade and rsync
Previous Message Jim Nasby 2015-01-29 23:49:43 Re: Exposing the stats snapshot timestamp to SQL