The following bug has been logged online: Bug reference: 4834 Logged by: Aleksey Tsalolikhin Email address: aleksey.tsalolik...@gmail.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. [postg...@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 [postg...@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 [postg...@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 [postg...@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. [postg...@hwd-ddc-sonydb-prod log]$ kill 16261 [postg...@hwd-ddc-sonydb-prod log]$ kill 18763 [postg...@hwd-ddc-sonydb-prod log]$ kill 18758 21393 21402 22746 [postg...@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 [postg...@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. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs