If we kill the postmaster on master, we will see two processes keep running.
pguo 44007 1 0 16:35 ? 00:00:00 postgres: port 5432, master logger process
pguo 44014 1 0 16:35 ? 00:00:00 postgres: port 5432, WAL Send Server process
Well, maybe we should exit the "WAL Send Server process" so that the processes on master are all gone via checking PostmasterIsAlive() in its loop code.
Note in distributed system any process could be killed at any time without any callback, handler etc.