Re: Temp tables

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: Pascal Tufenkji <ptufenkji(at)usj(dot)edu(dot)lb>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Temp tables
Date: 2013-05-23 19:42:15
Message-ID: 519E7117.9000402@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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

In response to

  • Temp tables at 2013-05-23 07:24:17 from Pascal Tufenkji

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-05-23 20:32:34 Re: Temp tables
Previous Message Sajeev Mayandi 2013-05-23 17:45:52 Re: Rule for all the tables in a schema