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 1mpBlZ-0007DS-Ec for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Nov 2021 16:02:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mpBlY-0008R9-CR for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Nov 2021 16:02:00 +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 1mpBlX-0008PY-Mw for pgsql-hackers@lists.postgresql.org; Mon, 22 Nov 2021 16:02:00 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mpBlS-0007yl-Oe for pgsql-hackers@lists.postgresql.org; Mon, 22 Nov 2021 16:01:59 +0000 Received: by mail-ed1-x533.google.com with SMTP id r11so79117462edd.9 for ; Mon, 22 Nov 2021 08:01:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ziQbqblrJfunIVj8+WFIoBxl9CygxEz71lMLJWLuKhA=; b=JLZeKkigYyMDlBwjxQ5U8bxsVdWOS63D6TM98lJWgkUB+XKWqvioRTdFDuQeOWUxVh NYy3qHPjeIEd5uPohalkhvU2RUJw3zsAiGGx8pnvKUqC4Ytuswdz9NAhwXN95h0qudDd jeMQs0NMf+yaKowGGl8ptNPpLfQr1sQw6j3OGqlCLVammBSb2PTfI8wLx+2K+ujP7Pjh /OdR8nsD5cCVAA8HhLr51k/4WZwbgkYMjl9cbD0MxND3JDJ7zlpEaLJPekyr5lqxyJuk CNr4DHD+N7065OrMRn4DC0QUvIi0UuoK5wl5bxNkaJSQBzWR9JnoxEU4SbGdFo63ZMzZ L2Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ziQbqblrJfunIVj8+WFIoBxl9CygxEz71lMLJWLuKhA=; b=d/M+mdj0/ek/oOHXUwzeigqXsXv0U5KcVwNnr5ERbXYmI9sC64feLpN9Mv6d16Rlbr PNoJX6k+a9P6nc3539buCHtCP13Y+uZ4MUi8AczpoaVNeKh6BP8IPHzbo+p7jQEdhb8T ptgxTorlDm7aAGmkeFUXs2KMK2PEftNMDn1PpIhhIPdLuCS/jRrCPeYz7tp8anoYXsTn KgRh9tonaUPZtJO9ry0AxoKZ1Vnvq+tIfTiAAYKBnV4jQdTPU7OEuNesXtMsVc20rjcB m/5N7fKqJlmhynAPfWsp/yxp4fa/XipVAHSew0aAzJULCKG1163woxC35mjtCbDjpdM8 UOvQ== X-Gm-Message-State: AOAM5333S2l3NVSTpjk3KboU3arbCIbDSb6OQNtIbDo8XOgCdIBr53m+ bAMc0L1D3Rr7Y77sjWK8PjbU6Nbcmms6s8ySwNlk1/GDRhtBdAfljDBX7QgTRkXCLgpJ9SE6CrP DME2dySJp8wKFS5vzMkzMCZPWwJjyKtg8mNXjgHyirdxU+tH4z623Ehdkt3g/1aWVvuPr4k9qC0 wInqIxfgjRUYksRThMqbpyaxRKKsC5d5wRf8/lxnUkBGYG2TOhnY+X X-Google-Smtp-Source: ABdhPJwhuNdd2ZOAnd5zewtXfWg53tgd2b+5YjX9t6F+qmeS6woA4PuxzvrJf9kmsAJraDogxYLJOg== X-Received: by 2002:a17:906:2f97:: with SMTP id w23mr43267854eji.31.1637596908146; Mon, 22 Nov 2021 08:01:48 -0800 (PST) Received: from smtpclient.apple (cst2-164-120.cust.vodafone.cz. [31.30.164.120]) by smtp.gmail.com with ESMTPSA id hw8sm3985487ejc.58.2021.11.22.08.01.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Nov 2021 08:01:47 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: Re: logical decoding and replication of sequences From: Petr Jelinek In-Reply-To: <962b9015-201c-9df6-d79e-8e6afad21a93@enterprisedb.com> Date: Mon, 22 Nov 2021 17:01:46 +0100 Cc: Tomas Vondra , Hannu Krosing , vignesh C , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: 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> <962b9015-201c-9df6-d79e-8e6afad21a93@enterprisedb.com> To: Peter Eisentraut X-Mailer: Apple Mail (2.3693.20.0.1.32) X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 22. 11. 2021, at 16:44, Peter Eisentraut = wrote: >=20 > 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. >=20 > 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. +1 -- Petr Jelinek