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 1nlaDP-0001A9-2M for pgsql-hackers@arkaria.postgresql.org; Mon, 02 May 2022 17:52:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nlaDN-00083I-I4 for pgsql-hackers@arkaria.postgresql.org; Mon, 02 May 2022 17:52:05 +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 1nlaDM-000838-Df for pgsql-hackers@lists.postgresql.org; Mon, 02 May 2022 17:52:05 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nlaDI-0003B8-Sh for pgsql-hackers@lists.postgresql.org; Mon, 02 May 2022 17:52:04 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 95BF35C00BA; Mon, 2 May 2022 13:51:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 02 May 2022 13:51:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1651513918; x=1651600318; bh=PRcC/1VQDUq7LxQdswq3/PJxIdkp DhkKvT8COWDTwnk=; b=GW+93NX1nGyKOiOsouK6BEe9bwaI07+EPUXxf3FJcYzh UQbbMYaIs4QqSskL7MUftQaVItA6pKBzXZ2A41yl1biDqicax34s3+PMvY8tcWHy FVIuNdBzfqYk6HcOJeVF1YReX9hdN/i3T3gRWrZhR2o0sgwRU78OcnmTT6zQ9/uI mCG/ShlBKs3n/NAJopk08B+Y6pRRYPGNzzWHKhvW1OhNPVGm2s295k/vHyWt0Shc CwZn6gWIjSqupBg20o4lLFuHetbpRO5k35oPeYovPqTkgZgRF8JKAqVtggjdWvQ8 1/ixvkQdTieu35p7i7GsFV2O4ynCfF3JrBayllJcCg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehgdduudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 2 May 2022 13:51:58 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 57B192A0FD1; Mon, 2 May 2022 19:51:54 +0200 (CEST) Date: Mon, 2 May 2022 19:51:54 +0200 From: Alvaro Herrera To: Tomas Vondra Cc: Amit Kapila , Peter Eisentraut , Pg Hackers Subject: Re: bogus: logical replication rows/cols combinations Message-ID: <202205021751.aosyba2mh7bc@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-May-02, Tomas Vondra wrote: > pgoutput.c is relies on relcache callbacks to get notified of changes. > See the stuff that touches replicate_valid and publications_valid. So > the walsender should notice the changes immediately. Hmm, I suppose that makes any changes easy enough to detect. We don't need a separate signalling mechanism. But it does mean that the walsender needs to test the consistency of [rowfilter, column list, published actions] whenever they change for any of the current publications and it is working for more than one, and disconnect if the combination no longer complies with the rules. By the next time the replica tries to connect, START_REPLICATION will throw the error. > Why would we need to know publications replicated by other walsenders? > And what if the subscriber is not connected at the moment? In that case > there'll be no walsender. Sure, if the replica is not connected then there's no issue -- as you say, that replica will fail at START_REPLICATION time. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "La gente vulgar sólo piensa en pasar el tiempo; el que tiene talento, en aprovecharlo"