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 1mussf-0007y7-E6 for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Dec 2021 09:04: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 1mussd-0007YE-Uw for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Dec 2021 09:04:51 +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 1mussd-0007Y4-LH for pgsql-hackers@lists.postgresql.org; Wed, 08 Dec 2021 09:04:51 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mussX-0006fR-DQ for pgsql-hackers@lists.postgresql.org; Wed, 08 Dec 2021 09:04:50 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 9B97A3201C60; Wed, 8 Dec 2021 04:04:41 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 08 Dec 2021 04:04:41 -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=P2kbFg9mGIVcQudA/puKVXf42vHZswl09v3cO6K6B ok=; b=DQ8lnJMnNRTTkZKQzgyd7p8cZ/THlHto0M/LOxSbXZZ4y7nbjh5ktPbet DijehB0VggcbzMv7QxA7wOTC97eDDz05BFOhXr4qVkwOn9csBgPXGwFI3B1eXZLD 2uR9gipCJNmsKSh8dhi+Ju04j1o4HmVNwZ0vLUhKN1bwDZPvvPaviYkywAiPltKX dh3XFu3ZBNWAW+Judna4mQYAYs8zNlEbcsM8d1jIuzeb5Zu9t4yOJ/0j3/7OAZXa ADKx6pomgpKfNryMUlLweqA+qdfDaQM54ZwDPCAvvvYLckJ6Uh8cr1MYJJpQGlLd tdG6eI8ZPu9R9iWIQOWpd0blGZJrQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrjeejgddutdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnheplefgteefiedtleelgeeg jeevhfeuteefvddtjeehveeuieefgedvhfeuleduteeunecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Dec 2021 04:04:39 -0500 (EST) Message-ID: Date: Wed, 8 Dec 2021 10:04:37 +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 Cc: 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> <118b249f-e4ef-2faf-8e25-dd25236dc964@enterprisedb.com> From: Peter Eisentraut In-Reply-To: <118b249f-e4ef-2faf-8e25-dd25236dc964@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 08.12.21 01:23, Tomas Vondra wrote: >> The argument "create" for fill_seq_with_data() is always true (and >> patch 0002 removes it).  So I'm not sure if it's needed.  If it is, it >> should be documented somewhere. >> > > Good point. I think it could be removed, but IIRC it'll be needed when > adding sequence decoding to the built-in replication, and that patch is > meant to be just an implementation of the API, without changing WAL. > > OTOH I don't see it in the last version of that patch (in ResetSequence2 > call) so maybe it's not really needed. I've kept it for now, but I'll > investigate. Ok, please check. If it is needed, perhaps then we need a way for test_decoding() to simulate it, for testing. But perhaps it's not needed. >> The order of the new fields sequence_cb and stream_sequence_cb is a >> bit inconsistent compared to truncate_cb and stream_truncate_cb. >> Maybe take another look to make the order more uniform. >> > > You mean in OutputPluginCallbacks? I'd actually argue it's the truncate > callbacks that are inconsistent - in the regular section truncate_cb is > right before commit_cb, while in the streaming section it's at the end. Ok, that makes sense. Then leave yours. When the question about fill_seq_with_data() is resolved, I have no more comments on this part.