Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQjsg-0000nv-7p for pgsql-admin@arkaria.postgresql.org; Fri, 22 Jul 2016 23:29:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bQjsf-0000ez-Or for pgsql-admin@arkaria.postgresql.org; Fri, 22 Jul 2016 23:29:21 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bQjsf-0000es-1k for pgsql-admin@postgresql.org; Fri, 22 Jul 2016 23:29:21 +0000 Received: from resqmta-po-04v.sys.comcast.net ([2001:558:fe16:19:96:114:154:163]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bQjsb-0003RH-LZ for pgsql-admin@postgresql.org; Fri, 22 Jul 2016 23:29:19 +0000 Received: from resomta-po-16v.sys.comcast.net ([96.114.154.240]) by resqmta-po-04v.sys.comcast.net with SMTP id QjsRbrL5XGkXBQjsYbpsI6; Fri, 22 Jul 2016 23:29:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1469230154; bh=6xmVEN4xzBhsfb9qXewI4yEMfm292s2e+CRxGvc1sdY=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=vUuCtTEqXy0b5ExZ5qe2kP5RQrTyxLo/5KXQie2XJpRbbTjJ7MFOpv5c94zRvNDdF 6P0r2fBiirYNCc1Y7ULVJBEgetr0KiHHf7e1ivJoa0eEvN6zKPPaZCyl0C7gaUH0qB FO2yuMkw7peytaKi+cVy0cNOj+ucBWJs8zNDDgAtyUMBacVCQ7fm4X5mQ3cJQrN0ZB nsuZF6CEqrk7JGNW3OYa3+590bsV2D4QA3rLCgzkOG4p9J8HsybHxLfG7uRQEYlByj FJF7eQgflrdaG8buvdusg6OJV199i1dSGgstiWdZVmq/c1I/6k1hr+Q/9Jm+Bkqj7c IXJEYCJfXP6hA== Received: from jerry.enova.com ([12.30.159.20]) by comcast with SMTP id QjsQbjgtworbqQjsSbS5gx; Fri, 22 Jul 2016 23:29:12 +0000 Received: by jerry.enova.com (Postfix, from userid 1001) id DA3D874020E; Fri, 22 Jul 2016 18:29:05 -0500 (CDT) From: Jerry Sievers To: pgsql-admin@postgresql.org Subject: Pg-Upgrade standbys via rsync... and avoid sending UNlogged data? Date: Fri, 22 Jul 2016 18:29:05 -0500 Message-ID: <86d1m5b6bi.fsf@jerry.enova.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-CMAE-Envelope: MS4wfL1xmCXLuei0J6d3WD42oWD+fmszAb6mO4UZpCmSjzm5cBw7ytQFlXaGcE7f3AltaawUk2+kruBneUCK/WAMMrrR7tG5meocr75kQC+ZDWX9RDD5uJ3v hf4cM0NuMUIfJx5gKbWzV71SqTCXEdCTEPu17FCD6PljGD6qMeEsDnfQexPG019cOaUUfrw15d0lyQ== X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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. Thanks -- Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net p: 312.241.7800 -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin