Re: Removal of temp tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Removal of temp tables
Date: 2001-06-14 18:10:45
Message-ID: 18638.992542245@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> What else do we do with them except sorts?

Hash joins. Materialize nodes. Not to mention that sorting is used for
things that aren't obviously sorts (SELECT count(distinct foo), for
example).

> Seems
> pid_ was a good file name because they are always based on pid in
> storage/file/fd.c. The directory could be called simply 'tempfile' with
> no pg_. How is that?

You had that to begin with, and I changed it because I thought it was a
bad idea. The directory name and file name should both make perfectly
clear that the files are temp files belonging to Postgres. For example,
it would be unsafe to make pg_tempfiles be a symlink pointing to a temp
directory shared with other apps if there was any risk of temp file name
collisions. (Not sure you'd do that anyway, because of security issues,
but let's not foreclose it with a poor choice of file names.) A purely
numeric file name for temp files is a particularly bad idea because it
looks too much like our numeric names for table data files. Don't
eliminate a hypothetical confusion factor between relnames and filenames
(which are never seen in the same context anyway) by introducing one
between filenames and other filenames.

If you don't like pg_temp here, maybe post_temp? pgsql_temp?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-06-14 18:18:29 Re: Removal of temp tables
Previous Message Bruce Momjian 2001-06-14 17:53:50 Re: Removal of temp tables

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-06-14 18:18:29 Re: Removal of temp tables
Previous Message Stephen Ramsey 2001-06-14 18:00:20 possible patch to increase number of hash overflow pages?