Postgresql server is running, but service appears stopped
For me, the answer lied in more careful reading of the excellent manual. Particularly the following three points:


See section 9.26.2, Server Signalling functions
See section Notes on how to signal to postgres
See description of the kill command


The general discussion about server shutdown is here.

So what I did was to terminate all the backends that were visible through pg_stat_activity view by pg_terminate_backend and then logging onto the server and running pg_ctl kill TERM &lt;pid&gt; to the remaining running postgres processes.