Subject: PostgreSQL taking a *lot* of CPU time.
To: None <netbsd-help@netbsd.org>
From: Berteun Damman <berteun@gmail.com>
List: netbsd-help
Date: 12/30/2004 09:27:19
Hello,

Currently I'm runing PostgreSQL 7.4.6 on NetBSD 2.0 (release, but with
own kernel), and I'm able to start PostgreSQL, and after that it
performs normally for a while, but after it hasn't done anything for a
while (after 12 hours idling or so), it just starts to consume all CPU
time,

top yields:
 1715 pgsql     72    4  4380K  564K RUN       25:14 98.05% 98.05% postgres

And, now I'm unable to stop PostgreSQL via the 'normal' way and have
to kill it using -9.

I've started postmaster in debug mode (-d 3), to see if something
unusual came up, but it only shows:

DEBUG:  child process (PID 24738) exited with exit code 0
DEBUG:  proc_exit(0)
DEBUG:  shmem_exit(0)
DEBUG:  exit(0)

Once in a while -- with varying PID's of course -- and nothing
special. (I cannot quit the postmaster with ctrl+c anymore after it
starts to consume all CPU).

After PostgreSQL is killed and restarted, it functions normally, but
again after half a day it hangs for no good reason.

I'm sorry the causes of the problem are quite vague, but I really have
no clue why it would perform this way.

Berteun