Operating system processes

postgres$ ps -o pid,command --ppid `head -n 1 /var/lib/postgresql/11/alpha/postmaster.pid`
  PID COMMAND
19255 postgres: 11/alpha: checkpointer   
19256 postgres: 11/alpha: background writer   
19257 postgres: 11/alpha: walwriter   
19258 postgres: 11/alpha: autovacuum launcher   
19259 postgres: 11/alpha: stats collector   
19260 postgres: 11/alpha: logical replication launcher   

Buffer cache and WAL related processes are the following:

Shutdown in fast mode

postgres$ rm /var/log/postgresql/postgresql-11-alpha.log
student$ sudo pg_ctlcluster 11 alpha restart

Server message log:

postgres$ cat /var/log/postgresql/postgresql-11-alpha.log
2019-02-27 15:38:48.596 MSK [20152] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2019-02-27 15:38:48.597 MSK [20152] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-02-27 15:38:48.616 MSK [20153] LOG:  database system was shut down at 2019-02-27 15:38:48 MSK
2019-02-27 15:38:48.621 MSK [20152] LOG:  database system is ready to accept connections
2019-02-27 15:38:49.184 MSK [20160] [unknown]@[unknown] LOG:  incomplete startup packet

Shutdown in immediate mode

postgres$ rm /var/log/postgresql/postgresql-11-alpha.log
student$ sudo pg_ctlcluster 11 alpha stop -m immediate --skip-systemctl-redirect
student$ sudo pg_ctlcluster 11 alpha restart

Server message log:

postgres$ cat /var/log/postgresql/postgresql-11-alpha.log
2019-02-27 15:38:51.365 MSK [20236] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2019-02-27 15:38:51.366 MSK [20236] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-02-27 15:38:51.379 MSK [20237] LOG:  database system was interrupted; last known up at 2019-02-27 15:38:48 MSK
2019-02-27 15:38:51.948 MSK [20237] LOG:  database system was not properly shut down; automatic recovery in progress
2019-02-27 15:38:51.951 MSK [20237] LOG:  invalid record length at 0/4F0940A8: wanted 24, got 0
2019-02-27 15:38:51.951 MSK [20237] LOG:  redo is not required
2019-02-27 15:38:51.963 MSK [20236] LOG:  database system is ready to accept connections
2019-02-27 15:38:52.553 MSK [20244] [unknown]@[unknown] LOG:  incomplete startup packet

Before PostgreSQL is ready to accept connections, it has to perform recovery ("automatic recovery in progress" message).