"PostgreSQL-9.6.3" Use the Pg_settings table to see the parameters ' effective conditions

Source: Internet
Author: User
Tags postgresql

The configuration parameters for the PostgreSQL database are in the postgresql.conf file, which is the database's data directory ($PGDATA). Some of these parameters are directly modified to take effect, some need to restart the database to take effect, and some cannot be modified at all. The PG database divides these parameters into the following categories:

internal: This type of parameter is read-only. Some of the Postgres program is written dead, and some are set when the database is installed INTDB.

Postmaster: This type of parameter requires a restart of the database to take effect.

sighup: You do not need to restart the database, but to send the sighup signal to the postmaster process, you need to pg_ctl the reload command.

backend: No need to restart the database, just send the sighup signal to the postmaster process. However, the new configuration value can only take effect in subsequent new connections, and these parameter values will not change in the existing connection.

Superuser: This type of parameter can be modified by the superuser using set. The parameter setting only affects the session configuration of the super user itself and does not affect other users.

User : Normal users use set settings, such parameters modified and Superuser class parameters, but also only affect their own session.

We can see if the parameters need to be restarted for the database to take effect by querying the context field value of the Pg_settings table. As follows:

Test=Selectfromwhereto like'wal_level' ;   Name    |   Context   -----------+------------| Postmaster (1 Row)

The end!

2017-09-02

"PostgreSQL-9.6.3" Use the Pg_settings table to see the parameters ' effective conditions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.