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 1oqGcl-0002Yu-Qe for pgsql-general@arkaria.postgresql.org; Wed, 02 Nov 2022 16:29:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oqGck-0004SQ-B6 for pgsql-general@arkaria.postgresql.org; Wed, 02 Nov 2022 16:29:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oqGcj-0004SH-V6 for pgsql-general@lists.postgresql.org; Wed, 02 Nov 2022 16:29:54 +0000 Received: from mail-oa1-x35.google.com ([2001:4860:4864:20::35]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oqGch-0002ba-Gm for pgsql-general@lists.postgresql.org; Wed, 02 Nov 2022 16:29:53 +0000 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-13b103a3e5dso20882131fac.2 for ; Wed, 02 Nov 2022 09:29:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=TyBLDbpjbYHVf4Z7S+ynVt7CSRss/EFvlzlXUHxKY9Y=; b=HK36sChMe8NqZQq9GHhxiew86rQlzLIcQnX7U7F0jllTpkwO9nxNCXM93uh1RSxLGb u9Oy4y/s3XQWU6pnsO/PzmBKyEfSUwMUPZSwwQiXf1h0NcQwsjKq7jEqrntbqRIGdEak sbhj7Q9Py2FvxIJc1BrBoFBpkCZwHiik0HcqjTjFIIo/5CTnp7uxSqCZzvpN2s3Q+KFH yxd7U+OKwjkcnIvhH0iiYn/15eygOwO9JMtXUT6JvLU3GY+wA3DCY77EmaIntBjNi8lq YOmwxreB1umuYHu3Nk2UPnAwMt1PPHEdxfQpCU/qtJ3PJmxGPQlFf5zRZoAaNVkirVug j6cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=TyBLDbpjbYHVf4Z7S+ynVt7CSRss/EFvlzlXUHxKY9Y=; b=bsfIr8PHJAGTIizQVxmk5vmjmilEHQSJ3Q3uhv/cEgo4XZkmxk4MeEKGaSJLO/S/yE OHuHZ7J0r4Ze92sxwPjMAGuynWEFpTj+Rnds3auk5VAtfd8K/XVzq4ISnZ7pbo3A9Rq2 COAkGwMGI+a7n86QvpSqCOi8FN0YXLWYWBXBU8/7Q/2mrvIYrF1EZFkJuXgJ8NEWSGn4 WkdA9Xi2gS6cVKTQ4vS3epq0p8wmea8ZcawbdBRELoRrlBVkagxzOuB8jozO7wfzFx+l Da4HKtiU64VKoXuEFY/GbzSpgYLLHLpDfJmee1fhriQMfMh9QEhtdaa1iFe/w2KNqWb/ ve+A== X-Gm-Message-State: ACrzQf3KgkoJQbtlUx+LOxP2rDtRDe7no0gw+Z+FrNWFDlj8if0KQ08m NCrFsnztmKOb9wsLZpxAjNXvkSDVf+c= X-Google-Smtp-Source: AMsMyM5v1zbvmzs6l4hrwBdypqnpHMqvYAnj/d5Lx3wic8qPKwTyr3CJP3xcen4VmuwfhssZCUPknA== X-Received: by 2002:a05:6870:2417:b0:127:be13:2d1 with SMTP id n23-20020a056870241700b00127be1302d1mr15226661oap.268.1667406588974; Wed, 02 Nov 2022 09:29:48 -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 z8-20020a056870d68800b00136a0143de8sm6211113oap.40.2022.11.02.09.29.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Nov 2022 09:29:48 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------lX9ALVsK0RLatqhFwz80EYp0" Message-ID: Date: Wed, 2 Nov 2022 11:29:47 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: Reducing bandwidth usage of database replication Content-Language: en-US To: pgsql-general@lists.postgresql.org References: From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------lX9ALVsK0RLatqhFwz80EYp0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/2/22 09:56, Sascha Zenglein wrote: > Hi all, > > I want to use the postgres-native logical replication to have multiple > clients receive and send data to a central database. > Real-time is far less important than network usage, and with my current > test setup it appears both instances communicate frequently if a > subscription is active, even if nothing is happening. > > Is there a good way to reduce data usage, for example by limiting the > amount of keep-alive messages? One database will likely be idle most of > the time. > > I estimated the current solution to idle at around 1.4MiB per day. Ideally > it would use less than 100KiB a day. 1.4MiB/day is 17 *bytes* per second.  That's not too much. -- Angular momentum makes the world go 'round. --------------lX9ALVsK0RLatqhFwz80EYp0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 11/2/22 09:56, Sascha Zenglein wrote:
Hi all,

I want to use the postgres-native logical replication to have multiple clients receive and send data to a central database.
Real-time is far less important than network usage, and with my current test setup it appears both instances communicate frequently if a subscription is active, even if nothing is happening.

Is there a good way to reduce data usage, for example by limiting the amount of keep-alive messages? One database will likely be idle most of the time.

I estimated the current solution to idle at around 1.4MiB per day. Ideally it would use less than 100KiB a day.

1.4MiB/day is 17 bytes per second.  That's not too much.

--
Angular momentum makes the world go 'round.
--------------lX9ALVsK0RLatqhFwz80EYp0--