Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL
Date
Msg-id 20070703004634.GB4757@alvh.no-ip.org
Whole thread Raw
In response to Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL  ("Jaime Casanova" <systemguards@gmail.com>)
Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane escribió:
> Jim Nasby <decibel@decibel.org> writes:
> > I've often thought that having global temp tables would be a really  
> > good idea, since it would drastically reduce the need to vacuum  
> > catalog tables,
> 
> I rather doubt that.  The most likely implementation would involve
> cloning a "template" entry into pg_class.

How about a new relkind which causes the table to be located in
PGDATA/base/<dboid>/pg_temp_<backendid>/<relfilenode>

So each backend can have its own copy of the table with the same
relfilenode; there's no need for extra catalog entries.

-- 
Alvaro Herrera       Valdivia, Chile   ICBM: S 39º 49' 18.1", W 73º 13' 56.4"
"La victoria es para quien se atreve a estar solo"


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Still recommending daily vacuum...
Next
From: Bruce Momjian
Date:
Subject: Re: Updated tsearch documentation