In 9.5, the default pg_ctl stop mode was changed from "smart" to "fast".
In pg_upgrade, there is this code:
void
stop_postmaster(bool fast)
{ ... exec_prog(SERVER_STOP_LOG_FILE, NULL, !fast, "\"%s/pg_ctl\" -w -D \"%s\" -o \"%s\" %s stop",
cluster->bindir, cluster->pgconfig, cluster->pgopts ? cluster->pgopts : "", fast ? "-m
fast": ""); ...
}
So, when upgrading from 9.5 or later, code that requested a non-fast
shutdown would now always get a fast shutdown.
I think the last line should be changed to something like
fast ? "-m fast" : "-m smart");
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services