Restarting the server quickly
Some of the database server parameters require you to stop and start the server again fully. Doing this as quickly as possible can be very important in some cases. The best time to do this is usually a quiet time, with lots of planning, testing, and forethought. Sometimes, not everything goes according to plan.
How to do it…
It's now become a habit in many recipes in this chapter that they be presented in two forms: one with systemd
and one without. This may look repetitive or boring, but it's unavoidable because the introduction of a new system does not automatically eliminate all existing alternatives, or migrate old installations to new ones.
Like before, the you can find further systemd
details, including details on service unit names, in the previous recipe, Starting the database server manually, of this chapter.
A PostgreSQL server managed by systemd
can be restarted in fast mode by issuing the following command:
sudo systemctl restart SERVICEUNIT
As before...