Обсуждение: postmaster stop hangs
Greetings, Running /etc/init.d/postgresql stop results in: Stopping postgresql service: [FAILED] I ran an strace on "/usr/local/pgsql/bin/pg_ctl stop -D /data/pgsql/data -s -m fast" and it is sending a SIGINT to processid 5676 Here is a ps of the currently running instance: postgres 5671 1 0 02:32 pts/0 00:00:00 /usr/local/pgsql/bin/postmaster -D /data/pgsql/data postgres 5674 5671 0 02:32 pts/0 00:00:00 postgres: writer process postgres 5675 5671 0 02:32 pts/0 00:00:00 postgres: stats buffer process postgres 5676 5675 0 02:32 pts/0 00:00:00 postgres: stats collector process In this case, shouldn't it be sending a SIGTERM to 5671? If I manually send a SIGINT or a SIGTERM to the postmaster (5671 in this case), postgres obediently shuts down. 5676 is in the */data/postmaster.pid Thanks for any help, Drew. postgresql 8.0.2 Linux xxx 2.6.9-5.0.3.EL #1 Sat Feb 19 18:26:49 CST 2005 i686 i686 i386 GNU/Linux
"Simpson" <asimpson@i-55.com> writes: > Here is a ps of the currently running instance: > postgres 5671 1 0 02:32 pts/0 00:00:00 > /usr/local/pgsql/bin/postmaster -D /data/pgsql/data > postgres 5674 5671 0 02:32 pts/0 00:00:00 postgres: writer process > postgres 5675 5671 0 02:32 pts/0 00:00:00 postgres: stats buffer > process > postgres 5676 5675 0 02:32 pts/0 00:00:00 postgres: stats collector > process > 5676 is in the */data/postmaster.pid That seems extremely broken. Can you reproduce this state (wrong PID in postmaster.pid) after restarting the postmaster? regards, tom lane
Yes, it does it consistently. Maybe I should start from scratch, if this seems very broken. Drew. -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Tom Lane Sent: Sunday, April 24, 2005 11:02 AM To: Simpson Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] postmaster stop hangs "Simpson" <asimpson@i-55.com> writes: > Here is a ps of the currently running instance: > postgres 5671 1 0 02:32 pts/0 00:00:00 > /usr/local/pgsql/bin/postmaster -D /data/pgsql/data > postgres 5674 5671 0 02:32 pts/0 00:00:00 postgres: writer process > postgres 5675 5671 0 02:32 pts/0 00:00:00 postgres: stats buffer > process > postgres 5676 5675 0 02:32 pts/0 00:00:00 postgres: stats collector > process > 5676 is in the */data/postmaster.pid That seems extremely broken. Can you reproduce this state (wrong PID in postmaster.pid) after restarting the postmaster? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
"Simpson" <asimpson@i-55.com> writes: > Yes, it does it consistently. > Maybe I should start from scratch, if this seems very broken. It seems not only very broken, but practically impossible: there is only one routine that writes that file, and it definitely writes the result of getpid(), and it is definitely not called in the stats collector process. How did you obtain or build your copy of PG? What is the platform exactly (you said Linux, but what release of what distro)? regards, tom lane