Re: AutoVacuum Behaviour Question

From: Alban Hertroys <alban(at)magproductions(dot)nl>
To: Bruce McAlister <bruce(dot)mcalister(at)blueface(dot)ie>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: AutoVacuum Behaviour Question
Date: 2007-06-28 09:46:31
Message-ID: 46838377.6040806@magproductions.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Bruce McAlister wrote:
> Which brings me onto a possibly related question. I've noticed that in
> this particular database, that there are temporary tables that are
> created. I'm not 100% sure how/why these temporary tables are being
> created, but I do assume that it must be by some sort of SQL query that
> runs against the database. How does postgresql handle these temporary
> tables, i mean, if a temporary table is created by some sql query, is it
> up to the user performing the query to remove the temporary table
> afterwards, or does postgresql automagically remove the temporary table
> when the query completes?

That would defeat the purpose of temporary tables. You usually create
them to perform queries on a data set from another query from the same
session.

AFAIK temporary tables are dropped when the session in which they were
created terminates, or optionally on commit if specified that way (ON
COMMIT DROP).

--
Alban Hertroys
alban(at)magproductions(dot)nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede

// Integrate Your World //

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2007-06-28 10:00:32 Re: Image Archiving with postgres
Previous Message Alban Hertroys 2007-06-28 09:40:45 Re: a JOIN on same table, but 'slided over'

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce McAlister 2007-06-28 10:12:19 Re: AutoVacuum Behaviour Question
Previous Message Bruce McAlister 2007-06-28 09:33:58 Re: AutoVacuum Behaviour Question