Murakami <exit(at)zaa(dot)att(dot)ne(dot)jp> writes:
> But when I try to stop DB with "pg_ctl -w stop", it returns an error.
> Error is "Waiting for postmaster shutting down.....pg_ctl: postmaster does not shut down"
Do you have active clients?
The default behavior of pg_ctl stop is to prevent new client connections
but not to shut down the database until the last old client disconnects.
If you want a more forceful approach to shutting down, read the man
page...
regards, tom lane