Обсуждение: tracking down temp files

Поиск
Список
Период
Сортировка

tracking down temp files

От
Robert Treat
Дата:
is there some way to determine the query that creates the file
pgsql_tmp15041.0? i thought maybe 15041 was the procpid but apparently
not...  anyone know?


Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


Re: tracking down temp files

От
Bruce Momjian
Дата:
Robert Treat wrote:
> is there some way to determine the query that creates the file
> pgsql_tmp15041.0? i thought maybe 15041 was the procpid but apparently
> not...  anyone know?

It is the proc id.  Perhaps the backend crashed.  If so, a postmaster
restart clears those sort directories.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: tracking down temp files

От
Robert Treat
Дата:
On Monday 17 November 2003 21:38, Bruce Momjian wrote:
> Robert Treat wrote:
> > is there some way to determine the query that creates the file
> > pgsql_tmp15041.0? i thought maybe 15041 was the procpid but apparently
> > not...  anyone know?
>
> It is the proc id.  Perhaps the backend crashed.  If so, a postmaster
> restart clears those sort directories.

Hmm...  when I see those files created I look in pg_stat_activity, but I don't
see any corresponding query... shouldn't I?

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

Re: tracking down temp files

От
Bruce Momjian
Дата:
Robert Treat wrote:
> On Monday 17 November 2003 21:38, Bruce Momjian wrote:
> > Robert Treat wrote:
> > > is there some way to determine the query that creates the file
> > > pgsql_tmp15041.0? i thought maybe 15041 was the procpid but apparently
> > > not...  anyone know?
> >
> > It is the proc id.  Perhaps the backend crashed.  If so, a postmaster
> > restart clears those sort directories.
>
> Hmm...  when I see those files created I look in pg_stat_activity, but I don't
> see any corresponding query... shouldn't I?

Yes, you should unless the backend died unexpectedly in which case they
would be left around until postmaster restart.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073