Berteun Damman <berteun@gmail.com> writes:
> After I've finished using it, and leaving it to itself for a while, it
> starts to consume all CPU time for, apparently, no good reason
> (because it's not doing anything).
Would you attach to the process with a debugger and get a stack trace?
$ gdb /usr/pkg/bin/postgres PID-of-process
gdb> bt
gdb> q
Probably should repeat this a few times to get a clear sense of where
it's looping.
regards, tom lane