Richard Boyes <r.boyes@auckland.ac.nz> writes:
> Inside the $PGDATA/base/thedatabase I came across a rather
> large file called pg_sorttemp28193.0 (~ 587 MB). Our datbase
> is not anywhere near this large, so I can only guess this was
> a query gone awry that needed a large amount of sorting space.
> Around the time this file was created the database server
> also crashed, I'm wondering if this was a cause of it
> (the server crashed due to a memory problem). Could that be possible ?
Possibly, but this is not a lot of evidence. Can you provide any
log file entries, core dump backtraces, etc?
> Also, would I now be safe in removing this file ?
If there's not currently a backend with PID 28193, then that's a
dead file. Zap away.
regards, tom lane