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 1mgCeL-0001PD-G7 for pgsql-general@arkaria.postgresql.org; Thu, 28 Oct 2021 21:09:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mgCeK-0007qb-Ap for pgsql-general@arkaria.postgresql.org; Thu, 28 Oct 2021 21:09:24 +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 1mgCeK-0007pF-0g for pgsql-general@lists.postgresql.org; Thu, 28 Oct 2021 21:09:24 +0000 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mgCeH-000417-SM for pgsql-general@lists.postgresql.org; Thu, 28 Oct 2021 21:09:23 +0000 Received: by mail-oi1-x231.google.com with SMTP id m11so5395692oif.13 for ; Thu, 28 Oct 2021 14:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=LpHjYpAUg+FL/VGpwTvRR/oKSohOyK7iEAB9zhuNbnA=; b=jaREbHlQmRZQveMsw4+J7mqVuNzPPMHyskI/2yjfHO+EBvIsoHbQHC6lNUv4OtPADz Zef/UDzkrMLrmEwY/+ZHdUOnx7UyCfTJFP/X5NJEHdMy7GBeBVoAkgLOWNllgeYJrW1u aaDvRnkhpD3c3UYCQRewFRpDtNAEQpobosvL2r7FHsGBBVu7k1hyYoqgqJ4JuyCm/SZV MsSQTTCKnstonyT/ZF8ABQCdhp0yPJO4dk1LBXhvs1CkSFT4n9ARlxTZ5SICUK0b9hhL z+ITlkBgYZrGoNQHN0Gg6DsckIBVEHQ15D0ICsHGs/jkxse27jjbVloRul8xiDveRbxh aFIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=LpHjYpAUg+FL/VGpwTvRR/oKSohOyK7iEAB9zhuNbnA=; b=XxtgGRlzvRvcTmZnS7lHICAvUv8WjYzniem+AEACMh60Le5qnQSCud7eGm1u2n/iK6 uE95p0RXQo7AyZC3I5cTXVJRYn8n8pLVVmW+qjdN6arGhpGA4FRiiqZyIzmOSey0sWRJ vsb973blajbgSNxnC+piPbK7PILE1szOVRGzYcbZVljpoa6HSUNh1E8GkRegxHCra5nF 1pRGGZtV3wqR1cbHM3A42s5q+8jiOnKFEmV886lccB8utK396aqAMYuPtDHOuK+rMrAH FpbGMKO/hd1MBIk/E/P+3RKKsCDWueCVZgDYusNUpJKgiQbTbzCjXjSXMlLyK586SyFk iuxw== X-Gm-Message-State: AOAM531f2IbnWxrv3x0S7L4w5WI3lwKRFDwDswQwjOhmVnXDb9LoDNgg K7JRO5dt9FqZXaUUzGqVUBCWCQlTVqE= X-Google-Smtp-Source: ABdhPJxn6qBD9+w06V6hfnDsi8CsW+tkm+dVNJMhD9jJ7xSNltlgDTbYKHjBDug4yBEuQM//NC8tRQ== X-Received: by 2002:aca:d989:: with SMTP id q131mr4843786oig.167.1635455360783; Thu, 28 Oct 2021 14:09:20 -0700 (PDT) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id r44sm1497148otv.39.2021.10.28.14.09.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Oct 2021 14:09:20 -0700 (PDT) Subject: Re: Incremental backup To: pgsql-general@lists.postgresql.org References: <4ad9560c-d6f7-3f74-b577-cf72c93195d0@aklaver.com> <68943e88-7d6b-edb3-90b5-782b9fb5fcbd@gmail.com> <57f54e84-c5f2-84fe-6e65-de5f4ddfdd47@aklaver.com> <995bab59-10e3-eaa9-2b93-afb0474595cd@gmail.com> <20211028200853.GA1020@momjian.us> From: Ron Message-ID: Date: Thu, 28 Oct 2021 16:09:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211028200853.GA1020@momjian.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/28/21 3:08 PM, Bruce Momjian wrote: > On Thu, Oct 28, 2021 at 02:23:39PM -0500, Ron wrote: >> On 10/28/21 2:06 PM, Adrian Klaver wrote: >>> On 10/28/21 11:48, Ron wrote: >>>> On 10/28/21 1:00 PM, Adrian Klaver wrote: >>>>> On 10/28/21 10:51, Ron wrote: >>>>> >>>> Not doable in Postgresql because WAL files are global to cluster. >>>> I've read multiple times that will not be changed. >>> Yet somehow logical replication does it: >>> >>> https://www.postgresql.org/docs/14/logical-replication-architecture.html >>> >>> " >>> Logical replication is built with an architecture similar to physical >>> streaming replication (see Section 27.2.5). It is implemented by >>> “walsender” and “apply” processes. The walsender process starts logical >>> decoding (described in Chapter 49) of the WAL and loads the >> Scans the (global) WAL data for only the that portion from the relevant >> database? >> >> If so, definitely not the same as having per-database WAL files. >> >> Just as importantly, replication is not, and never will be, a substitute for >> backups. > Uh, for replication slots, we don't send the entire WAL stream to the > subscriber: I meant scanning at the source. > https://www.postgresql.org/docs/14/logical-replication.html > > Logical replication of a table typically starts with taking a snapshot > of the data on the publisher database and copying that to the subscriber. > Once that is done, the changes on the publisher are sent to the subscriber > as they occur in real-time. The subscriber applies the data in the same > order as the publisher so that transactional consistency is guaranteed for > publications within a single subscription. This method of data replication > is sometimes referred to as transactional replication. It's still a bunch of transaction logs, whereas differential and incremental backups only backup the changed pages, no matter how many times they've been changed. That's a serious reduction in disk space, and time to apply them. -- Angular momentum makes the world go 'round.