Re: Using pg_upgrade on log-shipping standby servers

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Using pg_upgrade on log-shipping standby servers
Date: 2012-07-10 16:29:24
Message-ID: CABUevEzt3MtrJad2wLrb8NTQTDfuat14DhT3r_xH5yPV1L8DdQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 10, 2012 at 6:26 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> On Tue, Jul 10, 2012 at 06:21:35PM +0200, Magnus Hagander wrote:
>> On Tue, Jul 10, 2012 at 6:17 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>> > On Tue, Jul 10, 2012 at 12:04:50PM -0400, Tom Lane wrote:
>> >> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>> >> > + While a Log-Shipping Standby Server (<xref linkend="warm-standby">) can
>> >> > + be upgraded, the server must be in changed to a primary server to allow
>> >> > + writes, and after the upgrade it cannot be reused as a standby server.
>> >> > + (Running <command>rsync</> after the upgrade allows reuse.)
>> >>
>> >> "in changed"? This sentence makes no sense at all to me.
>> >
>> > Oops. New wording attached with "in" removed:
>> >
>> > the server must be changed to a primary server
>>
>> Don't we normally talk about "must be promoted to a primary server",
>> not changed?
>
> OK, sure, updated patch attached.
>
>> And wouldn't it be good if it also mentions that another good option
>> is to just pg_upgrade the master and rebuild the standby? (Unless
>> that's already mentioned somewhere else).
>
> I assume they already realize they re-create the standbys.
>
>> What's the actual usecase for promoting the slave, upgrading it and
>> then *not* using it, which is what I think this paragraph suggests?
>
> Testing maybe? I feel we have just avoided saying what you can and
> can't do with the standbys and pg_upgrade, so I think we have to state
> something. If we just want to say "recreate", let's say that.

Well, the bottom line is we can'd do *anything* with a standby with pg_upgrade.

Once you've promoted it, it is no longer a standby, and now you can
use pg_upgrade.

>> And I think the sentence about running rsync is extremely vague - run
>> rsync where and how? What are you actually trying to suggest people
>> do?
>
> Updated docs attached.

I suggest just removing the rsync part completely. You're basically
saying "you ca nset up a new standby after you're done", which is kind
of obvious anyway. And if you're going to use rsync fromthe master to
make a new standby, there's no point in running pg_upgrade on the new
standby in the first place.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2012-07-10 16:29:33 Re: [PATCH] psql \n shortcut for set search_path =
Previous Message Colin 't Hart 2012-07-10 16:26:22 Re: [PATCH] psql \n shortcut for set search_path =