Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrX8j-0004np-DU for pgsql-admin@arkaria.postgresql.org; Thu, 19 May 2022 03:47:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nrX7k-000293-9p for pgsql-admin@arkaria.postgresql.org; Thu, 19 May 2022 03:46:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrX7j-00028o-VZ for pgsql-admin@lists.postgresql.org; Thu, 19 May 2022 03:46:51 +0000 Received: from mail-yb1-xb32.google.com ([2607:f8b0:4864:20::b32]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nrX7h-0003pZ-NX for pgsql-admin@lists.postgresql.org; Thu, 19 May 2022 03:46:50 +0000 Received: by mail-yb1-xb32.google.com with SMTP id e78so6874263ybc.12 for ; Wed, 18 May 2022 20:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dBLHbI3a7veW544xMQtW6wlDq0EPHQCJHKGyfVsLoI8=; b=nf3TLv8TWF1oUTpzf1V+iyELlCfyI3vPnIpwzCABkcT37wgL57urFLHKG+CWNCIRrZ BWfEnd+pM5CALRqv9qQNHBzjmQP+NOMBUQk/O0BNB28zyQd2OGF9/6nb/gTa+i1l46VC PGK9dxbrYYKPFS/vMHeW8VkMn6EoImiYoVbOKIH2L7zjxgf6bEExtP0Sc8ccy4KC2vOB LzqBCPUc98lSvUVSx4ozhX25wnrs8MNWkBgwS5dnWOyq+MJgDJLYcRTD6Zn0rmZD4PMO Sauz9sRc6cKr18PbFpUOCWx3lQt9Jd2cgKlcNYiUdzcle1tyBul4xcDsdxEbSpGoyMjg Rzeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dBLHbI3a7veW544xMQtW6wlDq0EPHQCJHKGyfVsLoI8=; b=U3/7veWBLTt2o2xfKHcruVAv606xfRsOmACR2R13EPSSyclf89Tm9P2Jrx1Lf6uonu s33e5iBR2DqSSBwT/TXaVzSB17P40fqOIPtPOc+bGaewYab0WDbaS/D71JBe2z9a1GS5 iVfRUh1sIS7OEDrXb6oSYVjLrclhpBwIBIumTD7WtZzLnE6tY6r2u7BpHiuuOcIg2wvi yKIH2agyJdIH+HEhfQkMdCwy+GGUxBBdZ/XwXMEa3rjQAIXvWHRDTfeBlSRwcrrut6PW v4WdhvQutbSuZH803yMQKr/UmKfU7PcGs+5pwAeRWbJKgCF1owNjl2bS+zcu3mROYcTp Re4Q== X-Gm-Message-State: AOAM533KI5ASS5wuSP6uC6P902C1JUX5ZnJcOjbOiQDl8Wpl/wE3VJDn 5uMo0ihml2SLuQKJKoXK3KlbLKBIo4hhG3VEJs/Nikc= X-Google-Smtp-Source: ABdhPJw4iM4pJhhx+NxdR0v+cqiK+DQTaab6JPyTxehTSQmU58Rj13d4usKWzpR2bf3fqLcqlkEWyJ+yicM518iwmuU= X-Received: by 2002:a25:8552:0:b0:64a:df55:efa4 with SMTP id f18-20020a258552000000b0064adf55efa4mr2444527ybn.527.1652932009180; Wed, 18 May 2022 20:46:49 -0700 (PDT) MIME-Version: 1.0 References: <49351195.20220516095634@am-soft.de> In-Reply-To: <49351195.20220516095634@am-soft.de> From: Jeff Janes Date: Wed, 18 May 2022 23:46:37 -0400 Message-ID: Subject: Re: How to get a more RSYNC compatible output of pg_dump? To: =?UTF-8?Q?Thorsten_Sch=C3=B6ning?= Cc: Pgsql-admin Content-Type: multipart/alternative; boundary="0000000000003ec7d705df553989" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000003ec7d705df553989 Content-Type: text/plain; charset="UTF-8" > > Though, with the large dumps it seems to me that with every slight > change in the actual data the entire dump gets downloaded again. I'm > already using uncompressed dumps in the hope that the output is more > stable and RSYNC better able to recognize unchanged parts. But I guess > that most changes in the dumped data simply result in all subsequent > data being that misplaced compared to what RSYNC reads against, that > it's like downloading the whole file again in the end. > For me the rsync differential algorithm on dump files just works with no special preparations. I think you need to investigate this from the rsync side, not PostgreSQL. For example, if you change a dump file just by adding or deleting one character near the beginning, how does rsync respond to that? Cheers, Jeff --0000000000003ec7d705df553989 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Though, with the large dumps it seems to me that with every slight
change in the actual data the entire dump gets downloaded again. I'm already using uncompressed dumps in the hope that the output is more
stable and RSYNC better able to recognize unchanged parts. But I guess
that most changes in the dumped data simply result in all subsequent
data being that misplaced compared to what RSYNC reads against, that
it's like downloading the whole file again in the end.
=

For me the rsync differential algorithm on dump files j= ust works with no special preparations.=C2=A0 I think you need to investiga= te this from the rsync side, not PostgreSQL.=C2=A0 For example, if you chan= ge a dump file just by adding or deleting one character near the beginning,= how does rsync respond to that?=C2=A0

Cheers,

Jeff
--0000000000003ec7d705df553989--