'tuple concurrently updated' error when granting permissions

From: Jason Daly <jasondaly(at)trimblegeospatial(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: 'tuple concurrently updated' error when granting permissions
Date: 2014-02-28 02:54:58
Message-ID: CAFoTioX5gRjxf927ysQTRarP0rQOk4Wkp1exAtLDiqMK0Pg2jw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
When I attempt to execute the non-query "GRANT SELECT ON TABLE
<schema>.<table> TO <role>", I occasionally encounter an exception from
postgresql, 'tuple concurrently updated'.

I think the tuple it is referring to is the role.

Our app is multi-threaded, and it is very possible for more than one thread
to be attempting to grant permissions to the same role at the same time.
(the situation is that we are creating tables on the fly, and each time we
create a new table we have to grant permissions to a role so it can read
from it).

In my view, it is a bug that postgresql cannot handle multiple concurrent
grants to a role.

We're using the latest version of postgresql (9.3) in the context of an AWS
RDS.

Should I enter a bug report, or can someone convince me that we should
single-thread this part of our app (or work around it somehow)?

Please respond to jasondaly(at)trimblegeospatial(dot)com

-Jason

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dev Kumkar 2014-02-28 04:31:28 Re: Issue with default values and Rule
Previous Message James Harper 2014-02-28 00:23:38 multiple results from a function