From: | "Aleksey Tsalolikhin" <aleksey(dot)tsalolikhin(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #4834: "pg_ctl stop -m fast" fails to stop database |
Date: | 2009-06-02 19:55:09 |
Message-ID: | 200906021955.n52Jt9ED008199@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 4834
Logged by: Aleksey Tsalolikhin
Email address: aleksey(dot)tsalolikhin(at)gmail(dot)com
PostgreSQL version: 8.3.7
Operating system: CentOS 5.2
Description: "pg_ctl stop -m fast" fails to stop database
Details:
"pg_ctl stop -m fast" fails to stop database when idle clients are
connected. It fails to disconnect the idle clients.
Here is an example:
I have idle clients connected.
I try to stop the server using "pg_ctl stop -m fast", but it fails.
When I manually kill the postgres processes handling the idle clients, the
database exits.
[postgres(at)hwd-ddc-sonydb-prod ~]$ ps ax|grep postgres
2873 ? S 0:01 /usr/local/pgsql/bin/postgres -D
/usr/local/pgsql/data
2877 ? Ss 0:00 postgres: writer process
2880 ? Ss 0:31 postgres: stats collector process
16261 ? Ss 0:00 postgres: user1 db1 10.10.10.135(50670) idle
18758 ? Ss 0:00 postgres: user2 db2 10.10.10.135(33371) idle
18763 ? Ss 0:00 postgres: user1 db1 10.10.10.135(33572) idle
21393 ? Ss 0:00 postgres: user1 db1 10.10.10.135(44450) idle
21402 ? Ss 0:00 postgres: user1 db1 10.10.10.135(45766) idle
22746 ? Ss 0:00 postgres: user1 db1 10.10.10.135(34241) idle
25009 pts/2 S 0:00 su - postgres
25039 pts/2 R+ 0:00 grep postgres
[postgres(at)hwd-ddc-sonydb-prod ~]$ PGDATA=/usr/local/pgsql/data
/usr/local/pgsql/bin/pg_ctl stop -m fast
waiting for server to shut
down............................................................... failed
pg_ctl: server does not shut down
[postgres(at)hwd-ddc-sonydb-prod ~]$ ps ax|grep postgres
2873 ? S 0:01 /usr/local/pgsql/bin/postgres -D
/usr/local/pgsql/data
2877 ? Ss 0:00 postgres: writer process
2880 ? Ss 0:31 postgres: stats collector process
16261 ? Ss 0:00 postgres: user1 db1 10.10.10.135(50670) idle
18758 ? Ss 0:00 postgres: user2 db2 10.10.10.135(33371) idle
18763 ? Ss 0:00 postgres: user1 db1 10.10.10.135(33572) idle
21393 ? Ss 0:00 postgres: user1 db1 10.10.10.135(44450) idle
21402 ? Ss 0:00 postgres: user1 db1 10.10.10.135(45766) idle
22746 ? Ss 0:00 postgres: user1 db1 10.10.10.135(34241) idle
25009 pts/2 S 0:00 su - postgres
25074 pts/2 R+ 0:00 grep postgres
[postgres(at)hwd-ddc-sonydb-prod ~]$
Postgres would not exit until I killed the processes corresponding to the
"idle" clients.
Then all the remaining database processes exited.
[postgres(at)hwd-ddc-sonydb-prod log]$ kill 16261
[postgres(at)hwd-ddc-sonydb-prod log]$ kill 18763
[postgres(at)hwd-ddc-sonydb-prod log]$ kill 18758 21393 21402 22746
[postgres(at)hwd-ddc-sonydb-prod log]$ ps ax|grep postgres
25009 pts/2 S 0:00 su - postgres
25084 pts/2 R+ 0:00 grep postgres
[postgres(at)hwd-ddc-sonydb-prod log]$
From pg_ctl man page:
‘‘Fast’’ mode does not wait for clients to disconnect. All
active transactions
are rolled back and clients are forcibly disconnected, then the
server is shut
down.
Looks like the forcible disconnect did not work.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-06-02 20:40:24 | Re: BUG #4834: "pg_ctl stop -m fast" fails to stop database |
Previous Message | Bruce Momjian | 2009-06-02 19:54:33 | Re: BUG #4809: Missing Expected Operator |