Re: PG 8.3.3 - ERROR: lock AccessShareLock on object 16385/16467/0 is already held - Mailing list pgsql-bugs

From Michael Milligan
Subject Re: PG 8.3.3 - ERROR: lock AccessShareLock on object 16385/16467/0 is already held
Date
Msg-id 48B87BC6.5010901@acmeps.com
Whole thread Raw
In response to Re: PG 8.3.3 - ERROR: lock AccessShareLock on object 16385/16467/0 is already held  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PG 8.3.3 - ERROR: lock AccessShareLock on object 16385/16467/0 is already held
List pgsql-bugs
Tom Lane wrote:
> Michael Milligan <milli@acmeps.com> writes:
>> Tom Lane wrote:
>>> Huh, that shouldn't happen.  What object is that?  The 16385 should be
>>> a database OID, and the 16467 is most likely a table's OID within that
>>> database.
>
> Please answer the above question.

16385 is the database (db) and 16467 is the table (email) the prepared
inserts are executed against.  That table (email) is an inherited table
definition for partitioned tables that are named by date ranges.  E.g.,

CREATE TABLE email_2008_week27 ( PRIMARY KEY (id), CHECK ( ts >=
'2008-06-30'::timestamp AND ts < '2008-07-07'::timestamp ) ) INHERITS
(email)

>
>> And a correction, the transaction that caused this error was inserting
>> 13.5 million rows and failed near the end.
>
> Once you've determined which table the error message is talking about,
> please show us what the transaction does with that table.

You mean like:

BEGIN;
PREPARE msg (...) INSERT INTO email VALUES (...);
EXECUTE msg (...)
EXECUTE msg (...)
EXECUTE msg (...)
EXECUTE msg (...)
... repeated millions of times
COMMIT;

Regards,
Mike

--
Michael Milligan                                   -> milli@acmeps.com

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: PG 8.3.3 - ERROR: lock AccessShareLock on object 16385/16467/0 is already held
Next
From: Tom Lane
Date:
Subject: Re: PG 8.3.3 - ERROR: lock AccessShareLock on object 16385/16467/0 is already held