Thread: postmaster hangs

postmaster hangs

From
Rolf Staege
Date:
hi,
i'm using postgres version 7.4.1 and it run very stable until, may be,
4 weeks ago.
now the postmaster hangs sometimes for a while (actually since 2 hours)
and doesn't accept connections but comes back anytime. there is no
possibility to stop the postmaster. even a kill -9 (it's only the
developement system) doesn't work. i have to reboot the system to get
the database running again.
actually ps brings:
postgres  2148     1  0  Mar 11  ?         0:28
/usr/local/pgsql/bin/postmaster -i -d 2

top shows the postmaster process as follows:
 ?     2148 postgres 154 20   210M   244K run      0:28  0.02  0.02
postmaster

the output of netstat is (grep for 5432):
tcp        0      0  192.168.143.116.5432    192.168.143.116.61145
ESTABLISHED
tcp        0      0  192.168.143.116.61145   192.168.143.116.5432
ESTABLISHED
tcp        0      0  *.5432                 *.*                     LISTEN
tcp        0      0  192.168.143.116.5432    192.168.143.114.2550
ESTABLISHED
        45d91540 stream     38      0                0
0                0                0 /tmp/.s.PGSQL.5432
        45d916c0 stream     39      0                0
0                0                0 /tmp/.s.PGSQL.5432
        40ed2680 stream     38      0                0
43191e80                0                0 /tmp/.s.PGSQL.5432
        40ed2b00 stream     38      0                0
4458a400                0                0 /tmp/.s.PGSQL.5432
        440c3b80 stream     37      0                0
0                0                0 /tmp/.s.PGSQL.5432
        440c3d00 stream     37      0                0
0                0                0 /tmp/.s.PGSQL.5432
        449e5100 stream     37      0                0
0                0                0 /tmp/.s.PGSQL.5432
        43c65240 stream     37      0                0
4458a280                0                0 /tmp/.s.PGSQL.5432
        43a15200 stream      0      0         43b48c40
0                0                0 /tmp/.s.PGSQL.5432
        437db7c0 stream     37      0                0
0                0                0 /tmp/.s.PGSQL.5432
        437dbc40 stream     37      0                0
0                0                0 /tmp/.s.PGSQL.5432

the server is a pa-risc system with a HP-UX 11.11, 64Bit
does anybody has an idea, what could be the reason for it?
thanks
rolf

Re: postmaster hangs

From
Tom Lane
Date:
Rolf Staege <Rolf.Staege@med.uni-rostock.de> writes:
> i'm using postgres version 7.4.1 and it run very stable until, may be,
> 4 weeks ago.
> now the postmaster hangs sometimes for a while (actually since 2 hours)
> and doesn't accept connections but comes back anytime. there is no
> possibility to stop the postmaster. even a kill -9 (it's only the
> developement system) doesn't work. i have to reboot the system to get
> the database running again.

Hardware problems?  Most of the cases I've heard of where kill -9 didn't
work, it was because the process was partway through a disk operation
and the kernel was holding off the signal until the I/O completed
... but there was something broken about the disk and so the operation
never completed.

In any case, there is *no* way for an unprivileged process like Postgres
to resist kill -9, so your problem is certainly at either the hardware
or kernel level.  I'd suggest talking to HP ...

            regards, tom lane

Re: postmaster hangs

From
Scott Marlowe
Date:
On Tue, 2005-04-19 at 09:38, Rolf Staege wrote:
> hi,
> i'm using postgres version 7.4.1 and it run very stable until, may be,
> 4 weeks ago.
> now the postmaster hangs sometimes for a while (actually since 2 hours)
> and doesn't accept connections but comes back anytime. there is no
> possibility to stop the postmaster. even a kill -9 (it's only the
> developement system) doesn't work. i have to reboot the system to get
> the database running again.

In addition to what Tom said (i.e. look at hardware problems) I'd also
recommend updating the latest update of your versions of pgsql, 7.4.7.