How does ipvs support remote debugging:
------------
1. Configure the postgresql. conf file
Listen_addresses = '*'
2. Configure the pg_cmd.conf File
Host all 0.0.0.0/0 trust
Appendix, how to restart ipvs
Pg_ctl start [-w] [-s] [-D datadir] [-l filename] [-o options] [-p path]
Pg_ctl stop [-W] [-s] [-D datadir] [-m s [mart] | f [ast] | I [mmediate]
Pg_ctl restart [-w] [-s] [-D datadir] [-m s [mart] | f [ast] | I [mmediate] [-o options]
Pg_ctl reload [-s] [-D datadir]
Pg_ctl status [-D datadir]
Pg_ctl kill [signal_name] [process_id]
Description
Pg_ctl is a tool used to start, stop, or restart the PostgreSQL backend server (postmaster), or display the status of a running server, although we can manually start the server, however, pg_ctl encapsulates the redirection log output, which is separated from the combination of terminals and processes, and provides an option for controlling the shutdown.
In start mode, a new server is started. The server is started in the background and the standard input is attached to/dev/null. If-l is used, the standard output and standard error are redirected to a log file, or the standard output (rather than the standard error) of pg_ctl is redirected again ). If no log file is selected, the standard output of pg_ctl should be redirected to a file again or a log rotation program similar to rotatelogs should be output in a pipeline. Otherwise, postmaster will write its output to the control terminal (in the background) and will not leave the shell process group.
In stop mode, the server running in a specific data directory is disabled. You can use the-m option to select three different off modes: "Smart" mode, waiting for all clients to interrupt the connection. This is the default value. The "Fast" mode does not wait for the client to interrupt the connection. All active transactions are rolled back and the client is forcibly disconnected. The "Immediate" mode will exit when there is no clean shutdown. This will cause recovery during restart.
Restart is to execute a stop first, followed by a start. It allows the option to change the postmaster command line.
The reload mode simply sends a SIGHUP signal to the postmaster, causing it to re-read her configuration file (postgresql. conf, pg_cmd.conf, and so on). In this way, you can modify the configuration file option without restarting the system to make it take effect.
Status mode checks whether a server is running in the specified data directory. If yes, it displays its PID and command line options for calling it.
The kill mode allows you to send signals to a specified process. This feature is especially useful for Microsoft Windows because there is no kill command. Use -- help to view the list of supported signal names.
Option
-D datadir
Declare the file system location of the database file. If you ignore this option, use the environment variable PGDATA.
-L filename
Append the server log output to the filename file. If the file does not exist, create it. Umask is set to 077. Therefore, access to log files from other users is not allowed due to lack of time.
-M mode
Declare the close mode. Mode can be smart, fast, immediate, or the first letter of one of the three.
-O options
Declare the option to be passed directly to postmaster.
Parameters are usually enclosed by single or double quotation marks to ensure that they are passed as a whole.
-P path
Declares the location of the postmaster executable file. The missing postmaster is extracted from the same directory as pg_ctl. If not, it is written to the dead installation directory. Unless you want to do something special and get errors such as not finding postmaster, you do not need to use this option.
-S
Only print error, not prompt information.
-W
Wait until startup or shutdown is completed. Timeout in 60 seconds. This parameter is the default value when it is disabled. If the PID file is successfully deleted. For startup, a successful psql-l indicates success. Pg_ctl uses the view port suitable for psql. If the environment variable PGPORT exists, use it. Otherwise, it will check whether a port is set in the postgresql. conf file. If none of them exist, it uses the default port (5432 by default) during PostgreSQL compilation ). While waiting, pg_ctl returns an accurate exit code based on the success status of startup or shutdown.
-W
Do not wait for the start or stop to complete. This is the default for start and restart.