Pg-Upgrade standbys via rsync... and avoid sending UNlogged data? - Mailing list pgsql-admin

From Jerry Sievers
Subject Pg-Upgrade standbys via rsync... and avoid sending UNlogged data?
Date
Msg-id 86d1m5b6bi.fsf@jerry.enova.com
Whole thread Raw
Responses Re: Pg-Upgrade standbys via rsync... and avoid sending UNlogged data?  (Bruce Momjian <bruce@momjian.us>)
Re: Pg-Upgrade standbys via rsync... and avoid sending UNlogged data?  (Stephen Frost <sfrost@snowman.net>)
List pgsql-admin
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


pgsql-admin by date:

Previous
From: "Gilberto Castillo"
Date:
Subject: Re: [MASSMAIL]Re: High-end PG database configuration help
Next
From: Bruce Momjian
Date:
Subject: Re: Pg-Upgrade standbys via rsync... and avoid sending UNlogged data?