Re: pg_upgrade and rsync

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Josh Berkus <josh(at)agliodbs(dot)com>
Subject: Re: pg_upgrade and rsync
Date: 2015-01-27 12:28:18
Message-ID: CA+TgmobyWyiKvTYKW=j8AwVSM+VFHV3E_kdzqhr6LnBe7Uz6oA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 23, 2015 at 1:48 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> On 2015-01-22 20:54:47 -0500, Stephen Frost wrote:
>> * Bruce Momjian (bruce(at)momjian(dot)us) wrote:
>> > On Fri, Jan 23, 2015 at 01:19:33AM +0100, Andres Freund wrote:
>> > > Or do you - as the text edited in your patch, but not the quote above -
>> > > mean to run pg_upgrade just on the primary and then rsync?
>> >
>> > No, I was going to run it on both, then rsync.
>>
>> I'm pretty sure this is all a lot easier than you believe it to be. If
>> you want to recreate what pg_upgrade does to a cluster then the simplest
>> thing to do is rsync before removing any of the hard links. rsync will
>> simply recreate the same hard link tree that pg_upgrade created when it
>> ran, and update files which were actually changed (the catalog tables).
>
> I don't understand why that'd be better than simply fixing (yes, that's
> imo the correct term) pg_upgrade to retain relfilenodes across the
> upgrade. Afaics there's no conflict risk and it'd make the clusters much
> more similar, which would be good; independent of rsyncing standbys.

+1.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-01-27 12:37:51 Re: pg_upgrade and rsync
Previous Message Robert Haas 2015-01-27 12:16:27 Re: basebackups during ALTER DATABASE ... SET TABLESPACE ... not safe?