Re: How to get a more RSYNC compatible output of pg_dump?

Поиск
Список
Период
Сортировка
От Holger Jakobs
Тема Re: How to get a more RSYNC compatible output of pg_dump?
Дата
Msg-id 288d84eb-9b46-dbae-ceb4-4d2e5bc7f94e@jakobs.com
обсуждение исходный текст
Ответ на Re: How to get a more RSYNC compatible output of pg_dump?  (Thorsten Schöning <tschoening@am-soft.de>)
Список pgsql-admin
Am 16.05.22 um 14:50 schrieb Thorsten Schöning:
> Guten Tag Holger Jakobs,
> am Montag, 16. Mai 2022 um 12:52 schrieben Sie:
>
>> If you want to sync a new version of a file without transferring
>> the whole thing, you have to use the option -c or --checksum.
> No, --checksum is only for (slowly) recognizing changes at all,
> transfer is differential by default with or without that option.
Yes, the option causes rsync to also detect changes if the size and 
timestamps haven't changed.
>>   -c, --checksum              skip based on checksum, not mod-time & size
> https://linux.die.net/man/1/rsync
>
>> This works well only if some blocks of the file have changed, while
>> most others haven't. This won't be the case of a pg_dump.
> It is the case for some dumps I'm creating, but those are a lot
> smaller and don't store large objects like files. Therefore I was
> wondering about the order in which pg_dump outputs tables, rows etc.,
> e.g. if that is the same always or changing with each exec for some
> reason.
>
If only one byte close to the beginning of the file is added, this would 
shift all following bytes by 1, so no block of the file will be 
identical and have to be re-transferred.

Therfore, the only option is creating separate files for each table. 
This would transfer only those files where the content of the table has 
been changed since the last transmission. There has been another answer 
by depesz suggesting that.

Regards,

Holger

-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012


Вложения

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

Предыдущее
От: Thorsten Schöning
Дата:
Сообщение: Re: How to get a more RSYNC compatible output of pg_dump?
Следующее
От: Thorsten Schöning
Дата:
Сообщение: Re: How to get a more RSYNC compatible output of pg_dump?