- PostgreSQL High Performance Cookbook
- Chitij Chauhan Dinesh Kumar
- 212字
- 2021-07-09 18:47:21
Restarting the database server quickly
Sometimes there are situations where you need a database bounce. This is most likely for the database parameters that require a server restart to come into effect. This is different from the reload option of the server configuration, which only reloads the configuration files without requiring a server bounce.
How to do it...
We can use the following command to restart the database server:
pg_ctl -D /var/lib/pgsql/9.6/data restart
Here, /var/lig/pgsql/9.6/data
is the location of the data directory of the PostgreSQL server.
How it works...
Using the restart mode of the pg_ctl
command first stops the running databases on the PostgreSQL server and then starts the server. It is in effect a two-way process, where the running server is first stopped and then started again. A database restart is needed in many situations. It could be likely that some of the server parameters require a server restart to enable the changes made to these parameters to come into effects or it can also be that some of the server processes have hung and a restart is needed.
In this mode, by default, the PostgreSQL process will terminate using SIGINT, which is a fast shutdown mode. However, we can also specify the restart mode using the -m argument.
- ArchiCAD 19:The Definitive Guide
- 大學計算機信息技術導論
- 大數據戰爭:人工智能時代不能不說的事
- 3D Printing with RepRap Cookbook
- OpenStack for Architects
- Mobile DevOps
- Photoshop CS3圖層、通道、蒙版深度剖析寶典
- 傳感器與物聯網技術
- Ceph:Designing and Implementing Scalable Storage Systems
- Ruby on Rails敏捷開發最佳實踐
- The Python Workshop
- 網站前臺設計綜合實訓
- Godot Engine Game Development Projects
- Working with Linux:Quick Hacks for the Command Line
- 精通LabVIEW程序設計