pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Jerry Sievers <gsievers19@comcast.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Pg-Upgrade standbys via rsync... and avoid sending UNlogged data?
Date: Fri, 22 Jul 2016 19:43:12 -0400
Message-ID: <20160722234312.GA15377@momjian.us> (raw)
In-Reply-To: <86d1m5b6bi.fsf@jerry.enova.com>
References: <86d1m5b6bi.fsf@jerry.enova.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

On Fri, Jul 22, 2016 at 06:29:05PM -0500, Jerry Sievers wrote:
> Has anyone found a clever way to $subject that doesn't involved
> calculating which are all of the  files unnecessary to send and then
> running rsync with an exclude list?
> 
> I'm pondering this right now. 
> 
> ISTM for each unlogged table/index/toast  in pg_class where
> relpersistence='u'...
> 
> rsync --exclude-from... (and exclude-from-file contains)
> 
> */base/$dbid/$relfilenode
> */base/$dbid/$relfilenode.*
> */base/$dbid/$relfilenode_*
> ...
> 
> The leading * will match the old/new data directoryes being sent to the
> standby.
> 
> MAster upgrade is done using hard-links and the rsync method generally
> as per the pg docs.
> 
> I have among others, a 5TB system  w/about 40G of unlogged data.
> 
> The rsync method of upgrade takes only several seconds during a snapshot
> based test however as the snap was off a live system, the crash recovery
> startup trunc'd all the unlogged data.
> 
> This will not be the case during the real upgrade and I just as soon
> avoid sending the unlogged data only to have it trunc'd away as soon as
> the standby is started after the upgrade. 

Good question --- I don't think there is an easy answer except to
truncate the unlogged tables before the upgrade.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+                     Ancient Roman grave inscription +


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (15+ messages)  latest in thread

Message-ID: <20160722234312.GA15377@momjian.us>
Permalink:  ../20160722234312.GA15377@momjian.us/
Also on:    postgresql.org/message-id/20160722234312.GA15377@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: bruce@momjian.us, gsievers19@comcast.net
  Subject: Re: Pg-Upgrade standbys via rsync... and avoid sending UNlogged data?
  In-Reply-To: <20160722234312.GA15377@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox