Strange error related to temporary tables - Mailing list pgsql-general

From Csaba Nagy
Subject Strange error related to temporary tables
Date
Msg-id 1157036331.3033.57.camel@coppola.muc.ecircle.de
Whole thread Raw
Responses Re: Strange error related to temporary tables  (Alban Hertroys <alban@magproductions.nl>)
Re: Strange error related to temporary tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Postgres version: 8.1.3

I have a code similar to this pseudo-code:

try {
  create temp table temp_report ...;
  ... do some processing using this table...
  drop table temp_report;
  commit;
} catch all errors {
  rollback;
}

This code occasionally triggered the following error (couldn't reliably
reproduce):

SQL state: 42710

ERROR: type "temp_report" already exists


The code is possible to be executed in parallel by multiple threads, on
different connections, or in sequence on the same connection. I would
expect it in both cases to work correctly... in manual tests I was able
to create in parallel temporary tables named identically in different
connections, and on the same connection after rolling back the
transaction which created the first table... so I don't know what to try
to trigger this.

Any ideas what's the problem ?

TIA,
Csaba.



pgsql-general by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Cutting the Gborg throat
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: Cutting the Gborg throat