Re: 9.5 beta pg_upgrade documentation

From: Andy Colson <andy(at)squeakycode(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: 9.5 beta pg_upgrade documentation
Date: 2015-09-01 23:56:11
Message-ID: 55E63B1B.80603@squeakycode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 09/01/2015 04:09 PM, Bruce Momjian wrote:
> On Sun, Aug 23, 2015 at 09:45:50AM -0500, Andy Colson wrote:
>> I think we should add a step 6.5 (before step 7 Stop both servers) with something like:
>>
>> If you are upgrading both a primary and standby, then we need to make sure the standby is caught up.
>> If you are wal shipping then on primary run: select pg_switch_xlog();
>> shut down primary
>> before you shut down the standby make sure it gets caught up to the primary.
>>
>> I don't think its 100% required for them to be exact, is it? If they are a little different then rsync has more data to xfer from primary to standby ... but it would still work. Right?
>
> You are one of the first to use this new ability so it is good to get
> your feedback. I have developed the attached applied patch to address
> the problems you saw.
>
> First, the verification has to happen earlier, before pg_upgrade is run.
> I think what is happening is that a checkpoint on server shutdown is
> changing the value while pg_upgrade is running, and the rename of the
> controldata file is another issue, so doing it right after the primary
> is shut down is the right place.
>
> I also added a mention that rsync, not pg_upgrade, will be run on the
> standbys. You can see all the results of the patch here:
>
> http://momjian.us/pgsql_docs/pgupgrade.html
>
> Thanks.
>

Sweet, I'm glad I stopped where I did. I think I'm safe to pick up at step f. Which seemed to work ok. But now we get to step g (run rsync). I checked the rsync manual and don't see anything like this three directory argument thing you are trying to run. Unless you want to use --link-dest. In which case I think the cmd would be like:

rsync --archive --delete --hard-links --size-only --link-dest=old_pgdata new_pgdata remote_dir

I'm gonna try this now, will report back.

-Andy

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2015-09-02 00:00:43 Re: 9.5 beta pg_upgrade documentation
Previous Message Melvin Davidson 2015-09-01 23:19:52 Re: Detecting autoincrement columns