public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dominique Devienne <[email protected]>
To: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: #XX000: ERROR: tuple concurrently updated
Date: Mon, 24 Feb 2025 10:21:50 +0100
Message-ID: <CAFCRh-957e6i9NWXo9iNCS10AGKjSRqZ_CoCP+-67s82Rd8Bjw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAFCRh-8g-41VhdbbbnP+eezFq1UJ6T2JdQ=iS60hcaqGoJ=x9w@mail.gmail.com>
	<[email protected]>

On Thu, Feb 20, 2025 at 4:27 PM Tom Lane <[email protected]> wrote:

> Dominique Devienne <[email protected]> writes:
> > Error: DDL Error: GRANT USAGE ON SCHEMA "SCH1", "SCH2" TO "SCH2:RO",
> > "SCH2:RW", "SCH2:SU": #XX000: ERROR:  tuple concurrently updated
>
> Since both restores tried to grant some permissions on SCH1, they
> both had to update SCH1's pg_namespace row (specifically nspacl).
> We have no support for concurrent updates in the catalog-manipulation
> code, so if the second run arrives at that step before the first
> one has committed its pg_namespace change, you get this error.
>

Hi Tom, and al.

I have a related question, on role-to-role grants this time.

Above, it was contention on pg_namespace.nspacl in two transactions.

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.

Thanks, --DD


view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: #XX000: ERROR: tuple concurrently updated
  In-Reply-To: <CAFCRh-957e6i9NWXo9iNCS10AGKjSRqZ_CoCP+-67s82Rd8Bjw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox