Re: Pg-Upgrade standbys via rsync... and avoid sending UNlogged data?

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Pg-Upgrade standbys via rsync... and avoid sending UNlogged data?
Дата
Msg-id 20160725163700.GZ4028@tamriel.snowman.net
обсуждение исходный текст
Ответ на Pg-Upgrade standbys via rsync... and avoid sending UNlogged data?  (Jerry Sievers <gsievers19@comcast.net>)
Ответы Re: Pg-Upgrade standbys via rsync... and avoid sending UNlogged data?  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-admin
* Jerry Sievers (gsievers19@comcast.net) 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.

Certainly an interesting issue to consider.  I have to admit that I
hadn't considered unlogged tables when working out how to do the
hard-link-based approach.

> 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.

You would have to address tablespaces too, if you have any.

> I have among others, a 5TB system  w/about 40G of unlogged data.

Honestly, sending an extra 40G out of 5TB (we're talking less than 1%
here...) might be worth it to keep the process simple.

Thanks!

Stephen

Вложения

В списке pgsql-admin по дате отправления:

Предыдущее
От: Jerry Sievers
Дата:
Сообщение: Re: Pg-Upgrade standbys via rsync... and avoid sending UNlogged data?
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Pg-Upgrade standbys via rsync... and avoid sending UNlogged data?