pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steven M. Wheeler <swheeler@sabre.com>
Cc: pgsql-sql@hub.org
Subject: Re: [SQL] Questions about vacuum analyze
Date: Mon, 04 Oct 1999 18:03:36 -0400
Message-ID: <3427.939074616@sss.pgh.pa.us> (raw)
In-Reply-To: <37F8F2BE.760A4087@sabre.com>

"Steven M. Wheeler" <swheeler@sabre.com> writes:
> I believe that 6.5.2 and a little space reclamation in my DB directory may
> have taken care of the vacuum problem.  The last vacuum ran in about 10
> minutes on an already vacuumed DB.

Ah, that's more like it...

> 1) With 6.5.2 should I still drop the indexes prior to running vacuum?

Probably, but I'm not sure.  Try it both ways and see.

> 2) Is there a command/script that will cleanup the temp files and previous
> table files in the DB directory.  The reason I ask: I now have 3 copies of
> my currnt table file (currnt, currnt.1, currnt.2) for a total usage of
> about 3GB.  Since it appears that currnt.2 is the one being accessed, can I
> safely delete currnt & currnt.1?

NO NO NO NO NO!!!!

Files named like that are NOT temp files!!  What they are are segments
of a large table.  We segment big tables into gigabyte-sized chunks
to avoid problems on systems that have an int32-related limit on the
size of individual files (which is most Unixes these days, I think).

If you see anything named like pg_tempNNN.NNN, then that really is
a temp file, and if it's not got a very recent mod time then it's
probably left over from a crashed backend.  Old temp files should be
safe to get rid of.  (IIRC, one of the components of the name is the
PID of the creating backend, so you can check to be sure that the
backend is no longer around if you want to be doubly sure.)

			regards, tom lane



view thread (23+ messages)  latest in thread

Message-ID: <3427.939074616@sss.pgh.pa.us>
Permalink:  ../3427.939074616@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3427.939074616@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, swheeler@sabre.com, pgsql-sql@hub.org
  Subject: Re: [SQL] Questions about vacuum analyze
  In-Reply-To: <3427.939074616@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox