public inbox for [email protected]  
help / color / mirror / Atom feed
From: Holger Jakobs <[email protected]>
To: [email protected]
Subject: Re: How to get a more RSYNC compatible output of pg_dump?
Date: Mon, 16 May 2022 15:23:37 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>

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



Attachments:

  [application/pgp-signature] OpenPGP_signature (203B, 2-OpenPGP_signature)
  download

view thread (8+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: How to get a more RSYNC compatible output of pg_dump?
  In-Reply-To: <[email protected]>

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

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