Re: ERROR: tuple concurrently updated - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ERROR: tuple concurrently updated
Date
Msg-id 19489.1166714954@sss.pgh.pa.us
Whole thread Raw
In response to Re: ERROR: tuple concurrently updated  (Stephen Frost <sfrost@snowman.net>)
Responses Re: ERROR: tuple concurrently updated  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> I havn't built a reliable test case yet but I *think* the tuple
> concurrently updated problem is with an analyze being run inside of a
> function and also being run by autovacuum.

If so it should be fixed as of 8.2 --- I believe we changed the locking
rules to ensure only one ANALYZE at a time for any one table.

Conflicts from concurrent ANALYZEs are the only cases I've heard of
before that make this error occur in the field, but I suppose it would
be possible to get it from other things such as concurrently trying to
CREATE OR REPLACE the same function.

> The SysCache stuff I was
> thinking about previously was actually for another problem that I hadn't
> seen in a long time (because I hadn't been doing a particular set of
> operations, not because it's that difficult to have happen) but just ran
> into again today:
> ERROR:  cache lookup failed for relation ...

I think we've got a solution for that in 8.2, also --- at least, the
only common case I know of should be fixed, namely where a RENAME or
similar has caused the same table name to be assigned to a new OID.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: column ordering, was Re: [PATCHES] Enums patch v2
Next
From: Martijn van Oosterhout
Date:
Subject: Re: column ordering, was Re: [PATCHES] Enums patch v2