| From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Jim Nasby <decibel(at)decibel(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL |
| Date: | 2007-07-03 00:46:34 |
| Message-ID: | 20070703004634.GB4757@alvh.no-ip.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane escribió:
> Jim Nasby <decibel(at)decibel(dot)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"
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2007-07-03 01:37:46 | Re: Updated tsearch documentation |
| Previous Message | Jim C. Nasby | 2007-07-02 21:52:22 | Still recommending daily vacuum... |