- 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.
- ROS機(jī)器人編程與SLAM算法解析指南
- Data Wrangling with Python
- Photoshop CS3圖像處理融會(huì)貫通
- Windows環(huán)境下32位匯編語言程序設(shè)計(jì)
- ESP8266 Home Automation Projects
- Visual FoxPro程序設(shè)計(jì)
- Excel 2010函數(shù)與公式速查手冊(cè)
- PowerMill 2020五軸數(shù)控加工編程應(yīng)用實(shí)例
- Spark大數(shù)據(jù)商業(yè)實(shí)戰(zhàn)三部曲:內(nèi)核解密|商業(yè)案例|性能調(diào)優(yōu)
- 無人駕駛感知智能
- 計(jì)算機(jī)硬件技術(shù)基礎(chǔ)(第2版)
- Learning iOS 8 for Enterprise
- 軟件質(zhì)量管理實(shí)踐
- 工廠電氣控制設(shè)備
- 單片機(jī)C語言編程實(shí)踐