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 1tmZy5-007na4-67 for pgsql-general@arkaria.postgresql.org; Mon, 24 Feb 2025 15:02:01 +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 1tmZy4-003j1l-0D for pgsql-general@arkaria.postgresql.org; Mon, 24 Feb 2025 15:02:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tmZy3-003j1C-LH for pgsql-general@lists.postgresql.org; Mon, 24 Feb 2025 15:01:59 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tmZy1-000YHD-0D for pgsql-general@lists.postgresql.org; Mon, 24 Feb 2025 15:01:59 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 51OF1pQ31337155; Mon, 24 Feb 2025 10:01:51 -0500 From: Tom Lane To: Dominique Devienne cc: pgsql-general@lists.postgresql.org Subject: Re: #XX000: ERROR: tuple concurrently updated In-reply-to: References: <2701260.1740065273@sss.pgh.pa.us> Comments: In-reply-to Dominique Devienne message dated "Mon, 24 Feb 2025 10:21:50 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1337153.1740409311.1@sss.pgh.pa.us> Date: Mon, 24 Feb 2025 10:01:51 -0500 Message-ID: <1337154.1740409311@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dominique Devienne writes: > But during those "restore" transactions, I must also make role-to-role > grants, > which AFAIK involve adding rows to pg_auth_members. So they are not subject > to the same "no support for concurrent updates in the catalog-manipulation" > you mentioned, as schema-to-role grants are, right? Because that's an > insert, > not an update? Just want to make sure, as I'm thinking how to change our > code. Yeah, I think "GRANT role" should be relatively immune to that problem, as long as you're making distinct grants (not same grantor/grantee/granted roles). Wouldn't hurt to test. regards, tom lane