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 1mpBVF-0005wC-Il for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Nov 2021 15:45:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mpBVE-00043t-GZ for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Nov 2021 15:45:08 +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 1mpBVE-00043k-6k for pgsql-hackers@lists.postgresql.org; Mon, 22 Nov 2021 15:45:08 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpBV8-0007p1-4h for pgsql-hackers@lists.postgresql.org; Mon, 22 Nov 2021 15:45:07 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 87B5E5C0245; Mon, 22 Nov 2021 10:45:00 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 22 Nov 2021 10:45:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=HQBsSTVx6StHDcDgl2FhxeOOBJ0OGUNONdhJZaejC KE=; b=mmrEtquledehKyeJQZ0MWIzN8Wvzh8smMhmTRxa7iv82lGCoijjykSNab uJTBO9KikhJaRQRBRoqgpMaxL4RSeV+zGtu3ZU4cy5TL1tjrBB5auOHxDy1DV2MU qhZ1XYGJHqTKa0wUD4ZOBs7dQrV2qJa+SQBmL2divUyAEhKtbhVHhxsXStd+LIBH ZcezUM5mst3iSWXbC0CGC8nF85y4VUcOzOezItEq2DqbrluyYn3LKpjv4amgjZOu z/9S/Hb4BtBazGbW7mHrUYPSA3z9MIpG80w5mVd7FYJZT3HW4KThK4syHY6lVF4u dc5R3NB/rkIJrHrfShTySruu9OeeQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrgeeggdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrh hprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeefjeegheetuefhveevudel ueeftdejteeiffetvdduhfdtieefgfeutedtveeggfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghuthes vghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 Nov 2021 10:44:58 -0500 (EST) Message-ID: <962b9015-201c-9df6-d79e-8e6afad21a93@enterprisedb.com> Date: Mon, 22 Nov 2021 16:44:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: logical decoding and replication of sequences Content-Language: en-US To: Tomas Vondra , Hannu Krosing Cc: vignesh C , PostgreSQL Hackers , Petr Jelinek References: <377c6fda-c3eb-7a69-e981-c77ae459c5db@enterprisedb.com> <5105c3ad-d726-fc22-1d09-514b6852a15e@enterprisedb.com> <3005299b-267d-8e4a-68a3-abdad3e96aba@enterprisedb.com> <3d6df331-5532-6848-eb45-344b265e0238@enterprisedb.com> <482c10c1-b110-819f-b0e7-17549fa2f0dc@enterprisedb.com> <12a9ecd6-4edb-a367-33da-4e2d03b0aace@enterprisedb.com> <2cd38bab-c874-8e0b-98e7-d9abaaf9806a@enterprisedb.com> From: Peter Eisentraut In-Reply-To: <2cd38bab-c874-8e0b-98e7-d9abaaf9806a@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 22.11.21 01:47, Tomas Vondra wrote: > So I think just decoding the sequence tuples is a better solution - for > large transactions (consuming many values from the sequence) it may be > more expensive (i.e. send more records to replica). But I doubt that > matters too much - it's likely negligible compared to other data for > large transactions. I agree that the original approach is better. It was worth trying out this alternative, but it seems quite complicated. I note that a lot of additional code had to be added around several areas of the code, whereas the original patch really just touched the logical decoding code, as it should. This doesn't prevent anyone from attempting to optimize things somehow in the future, but for now let's move forward with the simple approach.