Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rm6bF-0062Se-JA for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Mar 2024 06:35:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rm6bE-00G8e7-5D for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Mar 2024 06:35:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rm6bD-00G8dy-TR for pgsql-bugs@lists.postgresql.org; Mon, 18 Mar 2024 06:35:56 +0000 Received: from fout8-smtp.messagingengine.com ([103.168.172.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rm6bA-00567i-Po for pgsql-bugs@lists.postgresql.org; Mon, 18 Mar 2024 06:35:55 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.nyi.internal (Postfix) with ESMTP id 588D013800CF; Mon, 18 Mar 2024 02:35:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 18 Mar 2024 02:35:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1710743753; x=1710830153; bh=9RTei5Rc1k lbb3G9de0//E+ZdO+Q6Jcn4kcRaMt1tr0=; b=CTNmrq/MPc/TY7hwpJpHgDdPKf w2olQzySp0Yeh6mXgY+MhY2TXIFnzmJcf3m6VQBmq6qB70FLOYVYhhP+A77AhBPj zPHhOgsqdMolKloWqh5iMC0dNhqQkJClCmQg9+woM1Q/Sp+5acLlpatnLq93K6M8 kJ1r64QhFZhIeite78BhKnmmvcqTQCoIW4lzSMrRmxvrKOkgn09XPpcOAADACCOx qM1KL1wWHa1cT4iMHzO4uq/Zs/HTZJczA6F+J6oF4zNQurbChDdxxPESFi4RSPSj MeSQ4tg5fzsz5YNya15t2aZP/n1SnHA8GIrbLkfmyTX/R4UpZ1aihUgqPQ/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1710743753; x=1710830153; bh=9RTei5Rc1klbb3G9de0//E+ZdO+Q 6Jcn4kcRaMt1tr0=; b=tOIT9KE7eDKaP0zTEfDYOYCtlp3ujBp0D2OUYB4m3hon pZmJxMgoJPqZ/mE5Cf7Eh1v07g6tUBKwt+SBzrCrzh8UMKxuxA0B6LlOufFG0+pB uMxJuME+XLx7cB0yxfkqTcE43j2B9iwTB2ZQzjkIcY47k9Pk9D86/iUADebANg3g 8gkoIRe5UdgrF7ZrwybxZqKfFlbmfxlqCr8eu21bvTYGrfRMuI76Z6caA29p0Aq+ 9mCCMNNd0Pv4Bxck+UtVlkAMQTQ0S7/I0W91ml5iaoJDiX+EeByZeYF6jyX+/s7h uM/aQiuHQ7BpyjiDNmf4xfk8WbtFatJM/hEQ2b37CQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkeeigdelkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeg geffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 18 Mar 2024 02:35:50 -0400 (EDT) Date: Mon, 18 Mar 2024 15:35:38 +0900 From: Michael Paquier To: Robert Haas Cc: Kyotaro Horiguchi , vignesh21@gmail.com, sawada.mshk@gmail.com, wangsh.fnst@fujitsu.com, osumi.takamichi@fujitsu.com, pgsql-bugs@lists.postgresql.org, Andres Freund Subject: Re: "unexpected duplicate for tablespace" problem in logical replication Message-ID: References: <20240112.173746.1710988914918513917.horikyota.ntt@gmail.com> <20240116.105804.1924548897701268962.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JbaENzg8i3A8wrxo" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --JbaENzg8i3A8wrxo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Feb 02, 2024 at 10:49:17AM -0500, Robert Haas wrote: > Andres, what do you think about this idea? I wonder if you just > momentarily forgot about temporary relations when coding > RelidByRelfilenumber -- because for that function to give well-defined > answers with temporary relations included, it would need the backend > ID as an additional argument. No idea what Andres thinks, but seeing that pg_filenode_relation() uses in input a tablespace OID and a filenode OID while ignoring the prefix that would be used for a temp relation path (with a 't' and the backend number), it is clear that the current function is not suited to make the difference between temporary and persistent relations as we'd need to have a priority order to choose one over the other. And that may not lead to the correct choice. Ignoring temporary relations entirely makes sense: one cannot get a regclass from only a tablespace and a relfilenode, the persistence, as well as a backend ID would also be required. I've not checked the patch in details, but it's to say that the idea to cut temporary relations sounds rather right here. -- Michael --JbaENzg8i3A8wrxo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmX34LoACgkQnvQgOdby QH3rIA//XnDkD2a3EhIpWV5fsDxQEjkYlJ2t+w4t3jE5g8FuDQVQNUMbs8SlwIRB 5CvSmA/mmy97JzHot34aPzXNBKZNWUMIfE6f2WwXK6t8Gax6tUu71oX+0t9bJcKE stfB9HlAOKaSVfg22hDEzgCGLg3DKL3O+POlL2BQaHQU9qnNMET3UO24UpO2Obqb Oxu5vBflCVEBVCFFEplVVNgXlW18M60jAE/Ks7WQ3GkpwnB3cScTqzPDuix3B11F i7cNWpBokURNM4eOWBy964jJ55/C3pNy9SeqJOOBUs0/MaIzXrHl5iPWnlnoFkW7 TJ6UpZGIYoQGIa0x1DNFPd1CKSLtfFK3ZhUfNwhxrBp54yVGeK+rJ7y+uNjhxzyz h9fJnGp3gF2ENliDZh0R653GSg4Mdrx+/z/0rAJg5rPjIkGNpo7xiAUHeASDZ9qN jRIUsT7IQwVO7iNf1MqIyXg5w11Yxga2j0gO1tbtJt/oSNGA2vwlrSx5R5KzuR+7 pREDy5XCy/MedC9Czf5LF5D50AgpP24I0S1x4OL9MQ9fO356vZUIRcm/IheX/7Xn f4YhCDfQvdqOxKYAHnBkAbk7kqtI4tZ5Z6TukEVI3bx1cgm1Yn1E3j8Tvklv2/Rf orxvTuBtKl1OVUpD8IanIltaP51WFoKRvujmGDTUhe9m5ebSGrU= =yWO0 -----END PGP SIGNATURE----- --JbaENzg8i3A8wrxo--