From: Steve Crawford <scrawford@pinpointresearch.com>
To: Pascal Tufenkji <ptufenkji@usj.edu.lb>
Cc: pgsql-general@postgresql.org
Subject: Re: Temp tables
Date: Thu, 23 May 2013 12:42:15 -0700
Message-ID: <519E7117.9000402@pinpointresearch.com> (raw)
In-Reply-To: <008f01ce5786$8a6f57b0$9f4e0710$@usj.edu.lb>
References: <008f01ce5786$8a6f57b0$9f4e0710$@usj.edu.lb>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
On 05/23/2013 12:24 AM, Pascal Tufenkji wrote:
>
> Hi,
>
> To enhance the performance of the queries, I use temp tables in my
> website reports.
>
> It seems that a temp table has not been dropped automatically in a
> certain session, and now the report is giving an error since the temp
> table already exists ?!
>
> When I type the following, the database gives me an error:
>
> dragon=# CREATE TEMP TABLE _parcours (id int);
>
> ERROR: type "_parcours" already exists
>
> 1.How can I identify the session in which the temp table is still
> locked, so I can drop it manually
>
> 2.Why does those cases happen and the temp tables don't drop automatically
>
Two questions:
1. Is that the exact message you are getting. I would expect *relation*
"_parcours" already exists not *type*.
2. Are you using persistent connections or connection pooling?
It feels a bit like there is something leftover from a previous process
that was using the same connection.
Cheers,
Steve
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: scrawford@pinpointresearch.com, ptufenkji@usj.edu.lb
Subject: Re: Temp tables
In-Reply-To: <519E7117.9000402@pinpointresearch.com>
References: <008f01ce5786$8a6f57b0$9f4e0710$@usj.edu.lb> <519E7117.9000402@pinpointresearch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox