Re: pg_upgrade link mode - Mailing list pgsql-general

From Igor Neyman
Subject Re: pg_upgrade link mode
Date
Msg-id A76B25F2823E954C9E45E32FA49D70EC1B7CF9A8@mail.corp.perceptron.com
Whole thread Raw
In response to Re: pg_upgrade link mode  (Lonni J Friedman <netllama@gmail.com>)
List pgsql-general
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
> owner@postgresql.org] On Behalf Of Lonni J Friedman
> Sent: Thursday, May 16, 2013 2:23 PM
> To: Igor Neyman
> Cc: AI Rumman; Fabio Rueda Carrascosa; pgsql-general
> Subject: Re: [GENERAL] pg_upgrade link mode
> 
> On Thu, May 16, 2013 at 11:03 AM, Igor Neyman <ineyman@perceptron.com>
> wrote:
> >
> > From: pgsql-general-owner@postgresql.org
> > [mailto:pgsql-general-owner@postgresql.org] On Behalf Of AI Rumman
> > Sent: Thursday, May 16, 2013 1:56 PM
> > To: Fabio Rueda Carrascosa
> > Cc: pgsql-general
> > Subject: Re: [GENERAL] pg_upgrade link mode
> >
> > I always think its a bit risky to use link instead of copying.
> However, I'd suggest to try the  --check at first of pg_upgrade.
> >
> > --------------------------------------------------------------
> >
> > Why?
> > Do you have specific experience, when link mode caused any problems?
> > Could you share?
> 
> I assume what he's referring to is if the upgrade gets partially
> completed and fails for any reason, then you have a broken mess, with
> no simple rollback path.  Since your database is only about 1GB in
> size, it shouldn't take very long to run a base backup before doing the
> upgrade.  You can send that backup over the network to a remote system,
> so that you have a fallback solution if the upgrade fails.
> 
> 
> --

Well, you should have current (and tested in regards to restore procedure) database backup regardless whether you
upgradeyour Postgres or just run it in normal "everyday mode".
 
And, if you plan to upgrade, you double check that your backup is absolutely valid and "restorable".

Now, pg_upgrade in link mode checks a lot of things before getting to the point of irreversible changes, and if
anything'swrong you can start older cluster, fix any problems pg_upgrade found and re-run pg_upgrade.
 
And if anything still breaks during pg_upgrade, you should have your database backup (that I talked about before) as a
"lastresort".
 
Also, no one should do such things as upgrading Postgres (or any software for that matter) on production system, before
"ironingout all kinks" on the test system.
 

I tested my upgrade process (which includes pg_upgrade in link mode) on test system, and now I run it on production
systems(note "plural") without fear of breaking anything, besides the fact that every production system of course has
"restorable"backup.
 

Regards,
Igor Neyman

pgsql-general by date:

Previous
From: Sajeev Mayandi
Date:
Subject: Re: upsert functionality
Next
From: Tom Lane
Date:
Subject: Re: pg_upgrade link mode