The following section introduces some functions and system information that are often used by database administrators. Some of these functions might be used on a daily basis, such as pg_reload_conf()
, which is used to reload the database cluster after amending pg_hba.conf
or postgresql.conf
, and pg_terminate_backend(pid)
, which is used to kill a certain process.
The PostgreSQL version allows the user to know the supported features and helps them to write compatible SQL queries for different versions. For example, the process ID attribute name in the pg_stat_activity
view in PostgreSQL versions older than 9.2 is procpid
; in PostgreSQL version 9.2, this attribute name is pid
.
In addition, the version information provides compatibility information to client tools and the backend version. To get the database cluster, one can use the version function as follows:
postgres=# SELECT version(); ...