PostgreSQL

*PostgreSQLについて
公式ページ:[[https://www.postgresql.org/]]

**用語


**機能


*サーバー構築
**構築環境
-PostgreSQL
10.1

-OS
CentOS 7.4

**OS設定
***ネットワーク
****固定IPアドレス割り当て
次のファイルを編集する
# ifcfg-loはループバックインタフェースであるため、触らない
vi /etc/sysconfig/network-scripts/ifcfg-<インタフェース名>

以下では例として192.168.0.111/24を割り当てた
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.0.111
NETMASK=255.255.255.0
NETWORK=192.168.0.0
GATEWAY=192.168.0.1

ネットワークを再起動する
systemctl restart network

ip addressコマンドにより、インタフェースが有効になっていることを確認する
これによりホストマシンなどからSSHでログイン可能となる


****firewalld
リモートホストからアクセスする場合、PostgreSQLで使用するTCP/5432を開ける。
※CentOS7.2以前のCentOS7場合はfirewalldのバージョン場古く、下記を実行できない。アップデートすること。
yum update firewalld -y

+現在ルールが定義されていないか確認
firewall-cmd –permanent –info-service=postgres
+新しいルールを定義
firewall-cmd –new-service=postgres –permanent
firewall-cmd –service=postgres –add-port=5432/tcp –permanent
+ルールが定義されていることを確認
firewall-cmd –permanent –info-service=postgres
+現在ルールが適用されていないことを確認する
firewall-cmd –list-services –zone=public –permanent | sed -e “s/ /\n/g” | grep postgres
+ルールを適用する
firewall-cmd –add-service=postgres –zone=public –permanent
+ルールが適用されていることを確認する
firewall-cmd –list-services –zone=public –permanent | sed -e “s/ /\n/g” | grep postgres
+firewalldシステムを再起動して設定を反映させる
systemctl restart firewalld

***ホスト名
ホスト名としてmailを設定する
hostname postgres.corp
# 再起動しても有効にする
echo postgres.corp > /etc/hostname
再ログインすることで有効になる。

***ユーザ作成
PostgreSQL用のユーザを作成する

****デーモン用ユーザ
useradd –user-group –no-create-home –shell /sbin/nologin postgres

*PostgreSQLの構築
**PostgreSQLのインストール
***パッケージからインストール
+リポジトリを追加する
++リポジトリファイルのURLを取得する
[[https://yum.postgresql.org/repopackages.php]]
++リポジトリファイルをダウンロードする
curl -s -O https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-2.noarch.rpm
++リポジトリファイルをインストールする
yum localinstall pgdg-redhat10-10-2.noarch.rpm -y
+本体をインストールする
yum install postgresql10 -y
#expand
[root@postgres ~]# yum install postgresql10 -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.tsukuba.wide.ad.jp
* extras: ftp.tsukuba.wide.ad.jp
* updates: ftp.tsukuba.wide.ad.jp
Resolving Dependencies
–> Running transaction check
—> Package postgresql10.x86_64 0:10.1-1PGDG.rhel7 will be installed
–> Processing Dependency: postgresql10-libs(x86-64) = 10.1-1PGDG.rhel7 for package: postgresql10-10.1-1PGDG.rhel7.x86_64
–> Processing Dependency: libicu for package: postgresql10-10.1-1PGDG.rhel7.x86_64
–> Running transaction check
—> Package libicu.x86_64 0:50.1.2-15.el7 will be installed
—> Package postgresql10-libs.x86_64 0:10.1-1PGDG.rhel7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
postgresql10 x86_64 10.1-1PGDG.rhel7 pgdg10 1.5 M
Installing for dependencies:
libicu x86_64 50.1.2-15.el7 base 6.9 M
postgresql10-libs x86_64 10.1-1PGDG.rhel7 pgdg10 347 k

Transaction Summary
================================================================================
Install 1 Package (+2 Dependent packages)

Total download size: 8.7 M
Installed size: 33 M
Is this ok [y/d/N]: y
Downloading packages:
(1/3): libicu-50.1.2-15.el7.x86_64.rpm | 6.9 MB 00:01
(2/3): postgresql10-10.1-1PGDG.rhel7.x86_64.rpm | 1.5 MB 00:02
(3/3): postgresql10-libs-10.1-1PGDG.rhel7.x86_64.rpm | 347 kB 00:02
——————————————————————————–
Total 3.4 MB/s | 8.7 MB 00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libicu-50.1.2-15.el7.x86_64 1/3
Installing : postgresql10-libs-10.1-1PGDG.rhel7.x86_64 2/3
Installing : postgresql10-10.1-1PGDG.rhel7.x86_64 3/3
Verifying : postgresql10-10.1-1PGDG.rhel7.x86_64 1/3
Verifying : postgresql10-libs-10.1-1PGDG.rhel7.x86_64 2/3
Verifying : libicu-50.1.2-15.el7.x86_64 3/3

Installed:
postgresql10.x86_64 0:10.1-1PGDG.rhel7

Dependency Installed:
libicu.x86_64 0:50.1.2-15.el7 postgresql10-libs.x86_64 0:10.1-1PGDG.rhel7

Complete!
#expand(end)

***ソースコードからインストール
-参考:[[https://www.postgresql.org/docs/10/static/installation.html]]

+rootになる
su –
+ソースコードを取得する
++ダウンロードサイト:[[https://www.postgresql.org/ftp/source/v10.1/]]からアーカイブのURLを取得する(tar.gz版を選択)
++ダウンロードする
curl -O -s https://ftp.postgresql.org/pub/source/v10.1/postgresql-10.1.tar.gz
++アーカイブファイルを展開する
tar xzfv postgresql-*.tar.gz
++ソースコードディレクトリへ移動する
cd postgresql-*
+必要なパッケージをインストールする
yum install gcc readline-devel zlib-devel -y
+コンパイル、インストールを行う
++データ用ディレクトリを作成する
mkdir /pgsql-data
++コンパイル最適化設定を行う
export CFLAGS=”-O3 -m64″
++Makefileを生成する
PREFIX=/usr/local/pgsql-`pwd | sed “s/.*\-//”`
./configure –prefix=$PREFIX | tee configure.log
-オプション一覧
参考:[[https://www.postgresql.jp/document/9.6/html/install-procedure.html]]
#expand
[root@postgres postgresql-10.1]# ./configure –help
`configure’ configures PostgreSQL 10.1 to adapt to many kinds of systems.

Usage: ./configure [OPTION]… [VAR=VALUE]…

To assign environment variables (e.g., CC, CFLAGS…), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
-h, –help display this help and exit
–help=short display options specific to this package
–help=recursive display the short help of all the included packages
-V, –version display version information and exit
-q, –quiet, –silent do not print `checking …’ messages
–cache-file=FILE cache test results in FILE [disabled]
-C, –config-cache alias for `–cache-file=config.cache’
-n, –no-create do not create output files
–srcdir=DIR find the sources in DIR [configure dir or `..’]

Installation directories:
–prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local/pgsql]
–exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]

By default, `make install’ will install all the files in
`/usr/local/pgsql/bin’, `/usr/local/pgsql/lib’ etc. You can specify
an installation prefix other than `/usr/local/pgsql’ using `–prefix’,
for instance `–prefix=$HOME’.

For better control, use the options below.

Fine tuning of the installation directories:
–bindir=DIR user executables [EPREFIX/bin]
–sbindir=DIR system admin executables [EPREFIX/sbin]
–libexecdir=DIR program executables [EPREFIX/libexec]
–sysconfdir=DIR read-only single-machine data [PREFIX/etc]
–sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
–localstatedir=DIR modifiable single-machine data [PREFIX/var]
–libdir=DIR object code libraries [EPREFIX/lib]
–includedir=DIR C header files [PREFIX/include]
–oldincludedir=DIR C header files for non-gcc [/usr/include]
–datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
–datadir=DIR read-only architecture-independent data [DATAROOTDIR]
–infodir=DIR info documentation [DATAROOTDIR/info]
–localedir=DIR locale-dependent data [DATAROOTDIR/locale]
–mandir=DIR man documentation [DATAROOTDIR/man]
–docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
–htmldir=DIR html documentation [DOCDIR]
–dvidir=DIR dvi documentation [DOCDIR]
–pdfdir=DIR pdf documentation [DOCDIR]
–psdir=DIR ps documentation [DOCDIR]

System types:
–build=BUILD configure for building on BUILD [guessed]
–host=HOST cross-compile to build programs to run on HOST [BUILD]

Optional Features:
–disable-option-checking ignore unrecognized –enable/–with options
–disable-FEATURE do not include FEATURE (same as –enable-FEATURE=no)
–enable-FEATURE[=ARG] include FEATURE [ARG=yes]
–disable-integer-datetimes
obsolete option, no longer supported
–enable-nls[=LANGUAGES]
enable Native Language Support
–disable-rpath do not embed shared library search path in
executables
–disable-spinlocks do not use spinlocks
–disable-atomics do not use atomic operations
–disable-strong-random do not use a strong random number source
–enable-debug build with debugging symbols (-g)
–enable-profiling build with profiling enabled
–enable-coverage build with coverage testing instrumentation
–enable-dtrace build with DTrace support
–enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
–enable-depend turn on automatic dependency tracking
–enable-cassert enable assertion checks (for debugging)
–disable-thread-safety disable thread-safety in client libraries
–disable-largefile omit support for large files
–disable-float4-byval disable float4 passed by value
–disable-float8-byval disable float8 passed by value

Optional Packages:
–with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
–without-PACKAGE do not use PACKAGE (same as –with-PACKAGE=no)
–with-extra-version=STRING
append STRING to version
–with-template=NAME override operating system template
–with-includes=DIRS look for additional header files in DIRS
–with-libraries=DIRS look for additional libraries in DIRS
–with-libs=DIRS alternative spelling of –with-libraries
–with-pgport=PORTNUM set default port number [5432]
–with-blocksize=BLOCKSIZE
set table block size in kB [8]
–with-segsize=SEGSIZE set table segment size in GB [1]
–with-wal-blocksize=BLOCKSIZE
set WAL block size in kB [8]
–with-wal-segsize=SEGSIZE
set WAL segment size in MB [16]
–with-CC=CMD set compiler (deprecated)
–with-icu build with ICU support
–with-tcl build Tcl modules (PL/Tcl)
–with-tclconfig=DIR tclConfig.sh is in DIR
–with-perl build Perl modules (PL/Perl)
–with-python build Python modules (PL/Python)
–with-gssapi build with GSSAPI support
–with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
[postgres]
–with-pam build with PAM support
–with-bsd-auth build with BSD Authentication support
–with-ldap build with LDAP support
–with-bonjour build with Bonjour support
–with-openssl build with OpenSSL support
–with-selinux build with SELinux support
–with-systemd build with systemd support
–without-readline do not use GNU Readline nor BSD Libedit for editing
–with-libedit-preferred
prefer BSD Libedit over GNU Readline
–with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
–with-ossp-uuid obsolete spelling of –with-uuid=ossp
–with-libxml build with XML support
–with-libxslt use XSLT support when building contrib/xml2
–with-system-tzdata=DIR
use system time zone data in DIR
–without-zlib do not use Zlib
–with-gnu-ld assume the C compiler uses GNU ld [default=no]

Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config’s search path
PKG_CONFIG_LIBDIR
path overriding pkg-config’s built-in search path
ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
ICU_LIBS linker flags for ICU, overriding pkg-config
LDFLAGS_EX extra linker flags for linking executables only
LDFLAGS_SL extra linker flags for linking shared libraries only

Use these variables to override the choices made by `configure’ or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to <pgsql-bugs@postgresql.org>.
#expand(end)
–パス系オプションについて
インストールパスを指定する各種オプションは指定してもデフォルトでは何もインストールされない。
実質有効であるのは以下のみである。
–prefix=
–bindir=
–includedir=
–libdir=
–datarootdir=
ただし、その他のオプションもバイナリファイル中に値が埋め込まれるので、何らかの影響はあるかもしれない。
bin/ディレクトリ中で言えば、以下ファイルはオプションを変更することで内容に変化が見られた。
—initdb
—postgres
—postmaster
++コンパイルする
-ドキュメント類をインストールしない場合
make | tee make.log
-ドキュメント類をインストールする場合
make world | tee make.log
++インストールを行う。
-ドキュメント類をインストールしない場合
make install | tee make_install.log
-ドキュメント類をインストールする場合
make install-world | tee make_install.log
/*
MANPATH=/usr/local/pgsql/share/man:$MANPATH
export MANPATH
*/
+リンク作成、環境変数設定などを行う
++インストールディレクトリへのシンボリックリンクを作成する。
これによって、複数のバージョンを同居させ、リンクを切り替えることで、バージョン変更が可能となる。
各バージョンの実行ファイルはデフォルトでは各バージョンの設定ファイルを読み込むこととなる。
rm -f /usr/local/postgres
ln -s $PREFIX /usr/local/pgsql
++簡単にアクセスできるように環境変数を設定する
export POSTGRESQL_HOME=/usr/local/pgsql
export POSTGRESQL_DATA=/pgsql-data
++ツール類にパスを通す
export PATH=$POSTGRESQL_HOME/bin:$PATH
++環境変数を再起動後も有効にする
echo “” >> /etc/bashrc
echo “# POSTGRESQL ENVIRONMENT VARIABLE” >> /etc/bashrc
echo “export POSTGRESQL_HOME=$POSTGRESQL_HOME” >> /etc/bashrc
echo “export POSTGRESQL_DATA=$POSTGRESQL_DATA” >> /etc/bashrc
echo “export PATH=\$POSTGRESQL_HOME/bin:\$PATH” >> /etc/bashrc
+不要なソースコードを削除する
cd ../
rm -rf postgresql*
+インストールしたディレクトリに移動する
cd $POSTGRESQL_HOME
+ファイル所有者を変更する
chown -R postgres:postgres $POSTGRESQL_DATA
chown -R postgres:postgres $POSTGRESQL_HOME*
+データディレクトリを初期化する
sudo -u postgres $POSTGRESQL_HOME/bin/initdb –encoding=UTF8 –pgdata=$POSTGRESQL_DATA –locale=ja_JP.UTF-8 -U postgres
-その他のオプション
#expand
[root@postgres pgsql]# initdb –help
initdb initializes a PostgreSQL database cluster.

Usage:
initdb [OPTION]… [DATADIR]

Options:
-A, –auth=METHOD default authentication method for local connections
–auth-host=METHOD default authentication method for local TCP/IP connections
–auth-local=METHOD default authentication method for local-socket connections
[-D, –pgdata=]DATADIR location for this database cluster
-E, –encoding=ENCODING set default encoding for new databases
–locale=LOCALE set default locale for new databases
–lc-collate=, –lc-ctype=, –lc-messages=LOCALE
–lc-monetary=, –lc-numeric=, –lc-time=LOCALE
set default locale in the respective category for
new databases (default taken from environment)
–no-locale equivalent to –locale=C
–pwfile=FILE read password for the new superuser from file
-T, –text-search-config=CFG
default text search configuration
-U, –username=NAME database superuser name
-W, –pwprompt prompt for a password for the new superuser
-X, –waldir=WALDIR location for the write-ahead log directory

Less commonly used options:
-d, –debug generate lots of debugging output
-k, –data-checksums use data page checksums
-L DIRECTORY where to find the input files
-n, –no-clean do not clean up after errors
-N, –no-sync do not wait for changes to be written safely to disk
-s, –show show internal settings
-S, –sync-only only sync data directory

Other options:
-V, –version output version information, then exit
-?, –help show this help, then exit

If the data directory is not specified, the environment variable PGDATA
is used.

Report bugs to <pgsql-bugs@postgresql.org>.
#expand(end)
-ログ
#expand
[root@postgres pgsql]# sudo -u postgres $POSTGRESQL_HOME/bin/initdb –encoding=UTF8 –pgdata=$POSTGRESQL_DATA –locale=ja_JP.UTF-8 -U postgres
The files belonging to this database system will be owned by user “postgres”.
This user must also own the server process.

The database cluster will be initialized with locale “ja_JP.UTF-8”.
initdb: could not find suitable text search configuration for locale “ja_JP.UTF-8”
The default text search configuration will be set to “simple”.

Data page checksums are disabled.

fixing permissions on existing directory /pgsql-data … ok
creating subdirectories … ok
selecting default max_connections … 100
selecting default shared_buffers … 128MB
selecting dynamic shared memory implementation … posix
creating configuration files … ok
running bootstrap script … ok
performing post-bootstrap initialization … ok
syncing data to disk … ok

WARNING: enabling “trust” authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
–auth-local and –auth-host, the next time you run initdb.

Success. You can now start the database server using:

/usr/local/pgsql/bin/pg_ctl -D /pgsql-data -l logfile start

#expand(end)
/*
+設定ファイルを作成する
-サンプルファイルを使用する場合、コピーする
cp -R share/postgresql.conf.sample $POSTGRESQL_DATA/postgresql.conf
-自作する場合
cat > $DOVECOT_HOME/conf/dovecot.conf << EOT
protocols = imap
default_login_user = mda
log_path = /usr/local/dovecot/log/log
mail_location = maildir:/usr/local/data/mail/%u
EOT
ログをsyslogではなくファイルに直接出力する設定を行ったので、出力先のディレクトリを作成する。
mkdir log
++設定ファイルに誤りがないか確認する
問題があれば、”Error”が出力される
doveconf
+パーミッションを変更する
chmod 700 -R $POSTGRESQL_DATA
*/
+ログ保存用ディレクトリを作成する
mkdir $POSTGRESQL_DATA/log
chown postgres:postgres $POSTGRESQL_DATA/log
+デーモン操作スクリプトを作成する
PostgreSQLはrootユーザで実行するとエラーとなる。
これは開始だけでなく、ステータス確認、終了もである。
次のように実行することで、デーモンの操作が可能となる。
-起動
sudo -u postgres sh -c “cd $POSTGRESQL_DATA; $POSTGRESQL_HOME/bin/pg_ctl -D $POSTGRESQL_DATA -l $POSTGRESQL_DATA/log/postgres.log start”
-終了
sudo -u postgres sh -c “cd $POSTGRESQL_DATA; $POSTGRESQL_HOME/bin/pg_ctl -D $POSTGRESQL_DATA stop”
-ステータス確認
sudo -u postgres sh -c “cd $POSTGRESQL_DATA; $POSTGRESQL_HOME/bin/pg_ctl -D $POSTGRESQL_DATA status”
-再起動
sudo -u postgres sh -c “cd $POSTGRESQL_DATA; $POSTGRESQL_HOME/bin/pg_ctl -D $POSTGRESQL_DATA restart”
-設定ファイル再読み込み
sudo -u postgres sh -c “cd $POSTGRESQL_DATA; $POSTGRESQL_HOME/bin/pg_ctl -D $POSTGRESQL_DATA reload”
しかし、毎回これを入力するのは困難であるので、スクリプトを作成する。
cat > bin/pg_start << EOT
sudo -u postgres sh -c “cd $POSTGRESQL_DATA; $POSTGRESQL_HOME/bin/pg_ctl -D $POSTGRESQL_DATA -l $POSTGRESQL_DATA/log/postgres.log start”
EOT
cat > bin/pg_status << EOT
sudo -u postgres sh -c “cd $POSTGRESQL_DATA; $POSTGRESQL_HOME/bin/pg_ctl -D $POSTGRESQL_DATA status”
EOT
cat > bin/pg_stop << EOT
sudo -u postgres sh -c “cd $POSTGRESQL_DATA; $POSTGRESQL_HOME/bin/pg_ctl -D $POSTGRESQL_DATA stop”
EOT
cat > bin/pg_restart << EOT
sudo -u postgres sh -c “cd $POSTGRESQL_DATA; $POSTGRESQL_HOME/bin/pg_ctl -D $POSTGRESQL_DATA restart”
EOT
cat > bin/pg_reload << EOT
sudo -u postgres sh -c “cd $POSTGRESQL_DATA; $POSTGRESQL_HOME/bin/pg_ctl -D $POSTGRESQL_DATA reload”
EOT
chmod 755 bin/pg_*
chown postgres:postgres bin/pg_*
+systemdの設定する
++サービスファイルを作成する
※PostgreSQLはTypeに”forking”を指定しないと起動後すぐに終了してしまう。
cat > /etc/systemd/system/postgres.service << EOT
[Unit]
Description=PostgreSQL database server
After=local-fs.target network.target network-online.target

[Service]
Type=forking
ExecStart=$POSTGRESQL_HOME/bin/pg_ctl -D $POSTGRESQL_DATA -l $POSTGRESQL_DATA/log/postgres.log start -s
ExecStop=$POSTGRESQL_HOME/bin/pg_ctl -D $POSTGRESQL_DATA stop -s
ExecReload=$POSTGRESQL_HOME/bin/pg_ctl -D $POSTGRESQL_DATA reload -s
User=postgres
PrivateTmp=true
NonBlocking=yes

[Install]
WantedBy=multi-user.target
EOT
++サービスを有効化する
systemctl enable postgres
++サービスが有効化されていることを確認する
systemctl list-unit-files –type service –no-pager | grep postgres
+PostgreSQLを起動する
systemctl start postgres
+稼働確認
systemctl status postgres -l

*PostgreSQL設定
-参考:[[https://www.postgresql.org/docs/10/static/runtime-config.html]]
-参考:[[https://www.postgresql.jp/document/9.6/html/runtime-config.html]] ※前バージョン


設定の反映は次のコマンドで行う
pg_reload
or
systemctl reload postgres

**設定ファイルパス
$POSTGRESQL_DATA/postgresql.conf

**記法
***設定値
以下のように記述する。
<設定項目> = <値>
=以降に更に=が含まれる場合があるが、これは全て<値>の文字列である。

設定値の欄において括弧の意味は以下。
-[]
任意の値を選択するが、省略はできない
-{}
任意の値を選択し、省略もできる
-…
直前の変数値を複数個列挙して記述可能

***コメント
先頭に#を付けることでコメントアウト可能
# xxx = yyy

**標準設定一覧
次のコマンドで確認可能
cat $POSTGRESQL_HOME/share/postgresql.conf.sample

#expand
# —————————–
# PostgreSQL configuration file
# —————————–
#
# This file consists of lines of the form:
#
# name = value
#
# (The “=” is optional.) Whitespace may be used. Comments are introduced with
# “#” anywhere on a line. The complete list of parameter names and allowed
# values can be found in the PostgreSQL documentation.
#
# The commented-out settings shown in this file represent the default values.
# Re-commenting a setting is NOT sufficient to revert it to the default value;
# you need to reload the server.
#
# This file is read on server startup and when the server receives a SIGHUP
# signal. If you edit the file on a running system, you have to SIGHUP the
# server for the changes to take effect, run “pg_ctl reload”, or execute
# “SELECT pg_reload_conf()”. Some parameters, which are marked below,
# require a server shutdown and restart to take effect.
#
# Any parameter can also be given as a command-line option to the server, e.g.,
# “postgres -c log_connections=on”. Some parameters can be changed at run time
# with the “SET” SQL command.
#
# Memory units: kB = kilobytes Time units: ms = milliseconds
# MB = megabytes s = seconds
# GB = gigabytes min = minutes
# TB = terabytes h = hours
# d = days


#——————————————————————————
# FILE LOCATIONS
#——————————————————————————

# The default values of these variables are driven from the -D command-line
# option or PGDATA environment variable, represented here as ConfigDir.

#data_directory = ‘ConfigDir’ # use data in another directory
# (change requires restart)
#hba_file = ‘ConfigDir/pg_hba.conf’ # host-based authentication file
# (change requires restart)
#ident_file = ‘ConfigDir/pg_ident.conf’ # ident configuration file
# (change requires restart)

# If external_pid_file is not explicitly set, no extra PID file is written.
#external_pid_file = ” # write an extra PID file
# (change requires restart)


#——————————————————————————
# CONNECTIONS AND AUTHENTICATION
#——————————————————————————

# – Connection Settings –

#listen_addresses = ‘localhost’ # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to ‘localhost’; use ‘*’ for all
# (change requires restart)
#port = 5432 # (change requires restart)
#max_connections = 100 # (change requires restart)
#superuser_reserved_connections = 3 # (change requires restart)
#unix_socket_directories = ‘/tmp’ # comma-separated list of directories
# (change requires restart)
#unix_socket_group = ” # (change requires restart)
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
# (change requires restart)
#bonjour = off # advertise server via Bonjour
# (change requires restart)
#bonjour_name = ” # defaults to the computer name
# (change requires restart)

# – Security and Authentication –

#authentication_timeout = 1min # 1s-600s
#ssl = off
#ssl_ciphers = ‘HIGH:MEDIUM:+3DES:!aNULL’ # allowed SSL ciphers
#ssl_prefer_server_ciphers = on
#ssl_ecdh_curve = ‘prime256v1’
#ssl_dh_params_file = ”
#ssl_cert_file = ‘server.crt’
#ssl_key_file = ‘server.key’
#ssl_ca_file = ”
#ssl_crl_file = ”
#password_encryption = md5 # md5 or scram-sha-256
#db_user_namespace = off
#row_security = on

# GSSAPI using Kerberos
#krb_server_keyfile = ”
#krb_caseins_users = off

# – TCP Keepalives –
# see “man 7 tcp” for details

#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
# 0 selects the system default
#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
# 0 selects the system default
#tcp_keepalives_count = 0 # TCP_KEEPCNT;
# 0 selects the system default


#——————————————————————————
# RESOURCE USAGE (except WAL)
#——————————————————————————

# – Memory –

#shared_buffers = 32MB # min 128kB
# (change requires restart)
#huge_pages = try # on, off, or try
# (change requires restart)
#temp_buffers = 8MB # min 800kB
#max_prepared_transactions = 0 # zero disables the feature
# (change requires restart)
# Caution: it is not advisable to set max_prepared_transactions nonzero unless
# you actively intend to use prepared transactions.
#work_mem = 4MB # min 64kB
#maintenance_work_mem = 64MB # min 1MB
#replacement_sort_tuples = 150000 # limits use of replacement selection sort
#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem
#max_stack_depth = 2MB # min 100kB
#dynamic_shared_memory_type = posix # the default is the first option
# supported by the operating system:
# posix
# sysv
# windows
# mmap
# use none to disable dynamic shared memory
# (change requires restart)

# – Disk –

#temp_file_limit = -1 # limits per-process temp file space
# in kB, or -1 for no limit

# – Kernel Resource Usage –

#max_files_per_process = 1000 # min 25
# (change requires restart)
#shared_preload_libraries = ” # (change requires restart)

# – Cost-Based Vacuum Delay –

#vacuum_cost_delay = 0 # 0-100 milliseconds
#vacuum_cost_page_hit = 1 # 0-10000 credits
#vacuum_cost_page_miss = 10 # 0-10000 credits
#vacuum_cost_page_dirty = 20 # 0-10000 credits
#vacuum_cost_limit = 200 # 1-10000 credits

# – Background Writer –

#bgwriter_delay = 200ms # 10-10000ms between rounds
#bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round
#bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round
#bgwriter_flush_after = 0 # measured in pages, 0 disables

# – Asynchronous Behavior –

#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching
#max_worker_processes = 8 # (change requires restart)
#max_parallel_workers_per_gather = 2 # taken from max_parallel_workers
#max_parallel_workers = 8 # maximum number of max_worker_processes that
# can be used in parallel queries
#old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate
# (change requires restart)
#backend_flush_after = 0 # measured in pages, 0 disables


#——————————————————————————
# WRITE AHEAD LOG
#——————————————————————————

# – Settings –

#wal_level = replica # minimal, replica, or logical
# (change requires restart)
#fsync = on # flush data to disk for crash safety
# (turning this off can cause
# unrecoverable data corruption)
#synchronous_commit = on # synchronization level;
# off, local, remote_write, remote_apply, or on
#wal_sync_method = fsync # the default is the first option
# supported by the operating system:
# open_datasync
# fdatasync (default on Linux)
# fsync
# fsync_writethrough
# open_sync
#full_page_writes = on # recover from partial page writes
#wal_compression = off # enable compression of full-page writes
#wal_log_hints = off # also do full page writes of non-critical updates
# (change requires restart)
#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
# (change requires restart)
#wal_writer_delay = 200ms # 1-10000 milliseconds
#wal_writer_flush_after = 1MB # measured in pages, 0 disables

#commit_delay = 0 # range 0-100000, in microseconds
#commit_siblings = 5 # range 1-1000

# – Checkpoints –

#checkpoint_timeout = 5min # range 30s-1d
#max_wal_size = 1GB
#min_wal_size = 80MB
#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 – 1.0
#checkpoint_flush_after = 0 # measured in pages, 0 disables
#checkpoint_warning = 30s # 0 disables

# – Archiving –

#archive_mode = off # enables archiving; off, on, or always
# (change requires restart)
#archive_command = ” # command to use to archive a logfile segment
# placeholders: %p = path of file to archive
# %f = file name only
# e.g. ‘test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f’
#archive_timeout = 0 # force a logfile segment switch after this
# number of seconds; 0 disables


#——————————————————————————
# REPLICATION
#——————————————————————————

# – Sending Server(s) –

# Set these on the master and on any standby that will send replication data.

#max_wal_senders = 10 # max number of walsender processes
# (change requires restart)
#wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables
#wal_sender_timeout = 60s # in milliseconds; 0 disables

#max_replication_slots = 10 # max number of replication slots
# (change requires restart)
#track_commit_timestamp = off # collect timestamp of transaction commit
# (change requires restart)

# – Master Server –

# These settings are ignored on a standby server.

#synchronous_standby_names = ” # standby servers that provide sync rep
# method to choose sync standbys, number of sync standbys,
# and comma-separated list of application_name
# from standby(s); ‘*’ = all
#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed

# – Standby Servers –

# These settings are ignored on a master server.

#hot_standby = on # “off” disallows queries during recovery
# (change requires restart)
#max_standby_archive_delay = 30s # max delay before canceling queries
# when reading WAL from archive;
# -1 allows indefinite delay
#max_standby_streaming_delay = 30s # max delay before canceling queries
# when reading streaming WAL;
# -1 allows indefinite delay
#wal_receiver_status_interval = 10s # send replies at least this often
# 0 disables
#hot_standby_feedback = off # send info from standby to prevent
# query conflicts
#wal_receiver_timeout = 60s # time that receiver waits for
# communication from master
# in milliseconds; 0 disables
#wal_retrieve_retry_interval = 5s # time to wait before retrying to
# retrieve WAL after a failed attempt

# – Subscribers –

# These settings are ignored on a publisher.

#max_logical_replication_workers = 4 # taken from max_worker_processes
# (change requires restart)
#max_sync_workers_per_subscription = 2 # taken from max_logical_replication_workers


#——————————————————————————
# QUERY TUNING
#——————————————————————————

# – Planner Method Configuration –

#enable_bitmapscan = on
#enable_hashagg = on
#enable_hashjoin = on
#enable_indexscan = on
#enable_indexonlyscan = on
#enable_material = on
#enable_mergejoin = on
#enable_nestloop = on
#enable_seqscan = on
#enable_sort = on
#enable_tidscan = on

# – Planner Cost Constants –

#seq_page_cost = 1.0 # measured on an arbitrary scale
#random_page_cost = 4.0 # same scale as above
#cpu_tuple_cost = 0.01 # same scale as above
#cpu_index_tuple_cost = 0.005 # same scale as above
#cpu_operator_cost = 0.0025 # same scale as above
#parallel_tuple_cost = 0.1 # same scale as above
#parallel_setup_cost = 1000.0 # same scale as above
#min_parallel_table_scan_size = 8MB
#min_parallel_index_scan_size = 512kB
#effective_cache_size = 4GB

# – Genetic Query Optimizer –

#geqo = on
#geqo_threshold = 12
#geqo_effort = 5 # range 1-10
#geqo_pool_size = 0 # selects default based on effort
#geqo_generations = 0 # selects default based on effort
#geqo_selection_bias = 2.0 # range 1.5-2.0
#geqo_seed = 0.0 # range 0.0-1.0

# – Other Planner Options –

#default_statistics_target = 100 # range 1-10000
#constraint_exclusion = partition # on, off, or partition
#cursor_tuple_fraction = 0.1 # range 0.0-1.0
#from_collapse_limit = 8
#join_collapse_limit = 8 # 1 disables collapsing of explicit
# JOIN clauses
#force_parallel_mode = off


#——————————————————————————
# ERROR REPORTING AND LOGGING
#——————————————————————————

# – Where to Log –

#log_destination = ‘stderr’ # Valid values are combinations of
# stderr, csvlog, syslog, and eventlog,
# depending on platform. csvlog
# requires logging_collector to be on.

# This is used when logging to stderr:
#logging_collector = off # Enable capturing of stderr and csvlog
# into log files. Required to be on for
# csvlogs.
# (change requires restart)

# These are only used if logging_collector is on:
#log_directory = ‘log’ # directory where log files are written,
# can be absolute or relative to PGDATA
#log_filename = ‘postgresql-%Y-%m-%d_%H%M%S.log’ # log file name pattern,
# can include strftime() escapes
#log_file_mode = 0600 # creation mode for log files,
# begin with 0 to use octal notation
#log_truncate_on_rotation = off # If on, an existing log file with the
# same name as the new log file will be
# truncated rather than appended to.
# But such truncation only occurs on
# time-driven rotation, not on restarts
# or size-driven rotation. Default is
# off, meaning append to existing files
# in all cases.
#log_rotation_age = 1d # Automatic rotation of logfiles will
# happen after that time. 0 disables.
#log_rotation_size = 10MB # Automatic rotation of logfiles will
# happen after that much log output.
# 0 disables.

# These are relevant when logging to syslog:
#syslog_facility = ‘LOCAL0’
#syslog_ident = ‘postgres’
#syslog_sequence_numbers = on
#syslog_split_messages = on

# This is only relevant when logging to eventlog (win32):
# (change requires restart)
#event_source = ‘PostgreSQL’

# – When to Log –

#client_min_messages = notice # values in order of decreasing detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# log
# notice
# warning
# error

#log_min_messages = warning # values in order of decreasing detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# info
# notice
# warning
# error
# log
# fatal
# panic

#log_min_error_statement = error # values in order of decreasing detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# info
# notice
# warning
# error
# log
# fatal
# panic (effectively off)

#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
# and their durations, > 0 logs only
# statements running at least this number
# of milliseconds


# – What to Log –

#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = on
#log_checkpoints = off
#log_connections = off
#log_disconnections = off
#log_duration = off
#log_error_verbosity = default # terse, default, or verbose messages
#log_hostname = off
#log_line_prefix = ‘%m [%p] ‘ # special values:
# %a = application name
# %u = user name
# %d = database name
# %r = remote host and port
# %h = remote host
# %p = process ID
# %t = timestamp without milliseconds
# %m = timestamp with milliseconds
# %n = timestamp with milliseconds (as a Unix epoch)
# %i = command tag
# %e = SQL state
# %c = session ID
# %l = session line number
# %s = session start timestamp
# %v = virtual transaction ID
# %x = transaction ID (0 if none)
# %q = stop here in non-session
# processes
# %% = ‘%’
# e.g. ‘<%u%%%d> ‘
#log_lock_waits = off # log lock waits >= deadlock_timeout
#log_statement = ‘none’ # none, ddl, mod, all
#log_replication_commands = off
#log_temp_files = -1 # log temporary files equal or larger
# than the specified size in kilobytes;
# -1 disables, 0 logs all temp files
#log_timezone = ‘GMT’


# – Process Title –

#cluster_name = ” # added to process titles if nonempty
# (change requires restart)
#update_process_title = on


#——————————————————————————
# RUNTIME STATISTICS
#——————————————————————————

# – Query/Index Statistics Collector –

#track_activities = on
#track_counts = on
#track_io_timing = off
#track_functions = none # none, pl, all
#track_activity_query_size = 1024 # (change requires restart)
#stats_temp_directory = ‘pg_stat_tmp’


# – Statistics Monitoring –

#log_parser_stats = off
#log_planner_stats = off
#log_executor_stats = off
#log_statement_stats = off


#——————————————————————————
# AUTOVACUUM PARAMETERS
#——————————————————————————

#autovacuum = on # Enable autovacuum subprocess? ‘on’
# requires track_counts to also be on.
#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and
# their durations, > 0 logs only
# actions running at least this number
# of milliseconds.
#autovacuum_max_workers = 3 # max number of autovacuum subprocesses
# (change requires restart)
#autovacuum_naptime = 1min # time between autovacuum runs
#autovacuum_vacuum_threshold = 50 # min number of row updates before
# vacuum
#autovacuum_analyze_threshold = 50 # min number of row updates before
# analyze
#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
# (change requires restart)
#autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age
# before forced vacuum
# (change requires restart)
#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for
# autovacuum, in milliseconds;
# -1 means use vacuum_cost_delay
#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
# autovacuum, -1 means use
# vacuum_cost_limit


#——————————————————————————
# CLIENT CONNECTION DEFAULTS
#——————————————————————————

# – Statement Behavior –

#search_path = ‘”$user”, public’ # schema names
#default_tablespace = ” # a tablespace name, ” uses the default
#temp_tablespaces = ” # a list of tablespace names, ” uses
# only default tablespace
#check_function_bodies = on
#default_transaction_isolation = ‘read committed’
#default_transaction_read_only = off
#default_transaction_deferrable = off
#session_replication_role = ‘origin’
#statement_timeout = 0 # in milliseconds, 0 is disabled
#lock_timeout = 0 # in milliseconds, 0 is disabled
#idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled
#vacuum_freeze_min_age = 50000000
#vacuum_freeze_table_age = 150000000
#vacuum_multixact_freeze_min_age = 5000000
#vacuum_multixact_freeze_table_age = 150000000
#bytea_output = ‘hex’ # hex, escape
#xmlbinary = ‘base64’
#xmloption = ‘content’
#gin_fuzzy_search_limit = 0
#gin_pending_list_limit = 4MB

# – Locale and Formatting –

#datestyle = ‘iso, mdy’
#intervalstyle = ‘postgres’
#timezone = ‘GMT’
#timezone_abbreviations = ‘Default’ # Select the set of available time zone
# abbreviations. Currently, there are
# Default
# Australia (historical usage)
# India
# You can create your own file in
# share/timezonesets/.
#extra_float_digits = 0 # min -15, max 3
#client_encoding = sql_ascii # actually, defaults to database
# encoding

# These settings are initialized by initdb, but they can be changed.
#lc_messages = ‘C’ # locale for system error message
# strings
#lc_monetary = ‘C’ # locale for monetary formatting
#lc_numeric = ‘C’ # locale for number formatting
#lc_time = ‘C’ # locale for time formatting

# default configuration for text search
#default_text_search_config = ‘pg_catalog.simple’

# – Other Defaults –

#dynamic_library_path = ‘$libdir’
#local_preload_libraries = ”
#session_preload_libraries = ”


#——————————————————————————
# LOCK MANAGEMENT
#——————————————————————————

#deadlock_timeout = 1s
#max_locks_per_transaction = 64 # min 10
# (change requires restart)
#max_pred_locks_per_transaction = 64 # min 10
# (change requires restart)
#max_pred_locks_per_relation = -2 # negative values mean
# (max_pred_locks_per_transaction
# / -max_pred_locks_per_relation) – 1
#max_pred_locks_per_page = 2 # min 0


#——————————————————————————
# VERSION/PLATFORM COMPATIBILITY
#——————————————————————————

# – Previous PostgreSQL Versions –

#array_nulls = on
#backslash_quote = safe_encoding # on, off, or safe_encoding
#default_with_oids = off
#escape_string_warning = on
#lo_compat_privileges = off
#operator_precedence_warning = off
#quote_all_identifiers = off
#standard_conforming_strings = on
#synchronize_seqscans = on

# – Other Platforms and Clients –

#transform_null_equals = off


#——————————————————————————
# ERROR HANDLING
#——————————————————————————

#exit_on_error = off # terminate session on any error?
#restart_after_crash = on # reinitialize after backend crash?


#——————————————————————————
# CONFIG FILE INCLUDES
#——————————————————————————

# These options allow settings to be loaded from files other than the
# default postgresql.conf.

#include_dir = ‘conf.d’ # include files ending in ‘.conf’ from
# directory ‘conf.d’
#include_if_exists = ‘exists.conf’ # include file only if it exists
#include = ‘special.conf’ # include file


#——————————————————————————
# CUSTOMIZED OPTIONS
#——————————————————————————

# Add settings for extensions here
#expand(end)

**パラメータ
***パラメータ内容
次のコマンドで、パラメータの各内容を表示することができる。
postgres –describe-config
#expand
[root@postgres bin]# postgres –describe-config
archive_command sighup Write-Ahead Log / Archiving STRING Sets the shell command that will be called to archive a WAL file.
archive_mode postmaster Write-Ahead Log / Archiving ENUM off Allows archiving of WAL files using archive_command.
archive_timeout sighup Write-Ahead Log / Archiving INTEGER 0 0 1073741823 Forces a switch to the next WAL file if a new file has not been started within N seconds.
array_nulls user Version and Platform Compatibility / Previous PostgreSQL Versions BOOLEAN FALSE Enable input of NULL elements in arrays. When turned on, unquoted NULL in an array input value means a null value; otherwise it is taken literally.
authentication_timeout sighup Connections and Authentication / Security and Authentication INTEGER 0 1 600 Sets the maximum allowed time to complete client authentication.
autovacuum sighup Autovacuum BOOLEAN FALSE Starts the autovacuum subprocess.
autovacuum_analyze_scale_factor sighup Autovacuum REAL 0 0 100 Number of tuple inserts, updates, or deletes prior to analyze as a fraction of reltuples.
autovacuum_analyze_threshold sighup Autovacuum INTEGER 0 0 2147483647 Minimum number of tuple inserts, updates, or deletes prior to analyze.
autovacuum_freeze_max_age postmaster Autovacuum INTEGER 0 100000 2000000000 Age at which to autovacuum a table to prevent transaction ID wraparound.
autovacuum_max_workers postmaster Autovacuum INTEGER 0 1 262143 Sets the maximum number of simultaneously running autovacuum worker processes.
autovacuum_multixact_freeze_max_age postmaster Autovacuum INTEGER 0 10000 2000000000 Multixact age at which to autovacuum a table to prevent multixact wraparound.
autovacuum_naptime sighup Autovacuum INTEGER 0 1 2147483 Time to sleep between autovacuum runs.
autovacuum_vacuum_cost_delay sighup Autovacuum INTEGER 0 -1 100 Vacuum cost delay in milliseconds, for autovacuum.
autovacuum_vacuum_cost_limit sighup Autovacuum INTEGER 0 -1 10000 Vacuum cost amount available before napping, for autovacuum.
autovacuum_vacuum_scale_factor sighup Autovacuum REAL 0 0 100 Number of tuple updates or deletes prior to vacuum as a fraction of reltuples.
autovacuum_vacuum_threshold sighup Autovacuum INTEGER 0 0 2147483647 Minimum number of tuple updates or deletes prior to vacuum.
autovacuum_work_mem sighup Resource Usage / Memory INTEGER 0 -1 2147483647 Sets the maximum memory to be used by each autovacuum worker process.
backend_flush_after user Resource Usage / Asynchronous Behavior INTEGER 0 0 256 Number of pages after which previously performed writes are flushed to disk.
backslash_quote user Version and Platform Compatibility / Previous PostgreSQL Versions ENUM safe_encoding Sets whether “\'” is allowed in string literals.
bgwriter_delay sighup Resource Usage / Background Writer INTEGER 0 10 10000 Background writer sleep time between rounds.
bgwriter_flush_after sighup Resource Usage / Background Writer INTEGER 0 0 256 Number of pages after which previously performed writes are flushed to disk.
bgwriter_lru_maxpages sighup Resource Usage / Background Writer INTEGER 0 0 1073741823 Background writer maximum number of LRU pages to flush per round.
bgwriter_lru_multiplier sighup Resource Usage / Background Writer REAL 0 0 10 Multiple of the average buffer usage to free per round.
bonjour postmaster Connections and Authentication / Connection Settings BOOLEAN FALSE Enables advertising the server via Bonjour.
bonjour_name postmaster Connections and Authentication / Connection Settings STRING Sets the Bonjour service name.
bytea_output user Client Connection Defaults / Statement Behavior ENUM hex Sets the output format for bytea.
check_function_bodies user Client Connection Defaults / Statement Behavior BOOLEAN FALSE Check function bodies during CREATE FUNCTION.
checkpoint_completion_target sighup Write-Ahead Log / Checkpoints REAL 0 0 1 Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval.
checkpoint_flush_after sighup Write-Ahead Log / Checkpoints INTEGER 0 0 256 Number of pages after which previously performed writes are flushed to disk.
checkpoint_timeout sighup Write-Ahead Log / Checkpoints INTEGER 0 30 86400 Sets the maximum time between automatic WAL checkpoints.
checkpoint_warning sighup Write-Ahead Log / Checkpoints INTEGER 0 0 2147483647 Enables warnings if checkpoint segments are filled more frequently than this. Write a message to the server log if checkpoints caused by the filling of checkpoint segment files happens more frequently than this number of seconds. Zero turns off the warning.
client_encoding user Client Connection Defaults / Locale and Formatting STRING SQL_ASCII Sets the client’s character set encoding.
client_min_messages user Reporting and Logging / When to Log ENUM notice Sets the message levels that are sent to the client. Each level includes all the levels that follow it. The later the level, the fewer messages are sent.
cluster_name postmaster Process Title STRING Sets the name of the cluster, which is included in the process title.
commit_delay superuser Write-Ahead Log / Settings INTEGER 0 0 100000 Sets the delay in microseconds between transaction commit and flushing WAL to disk.
commit_siblings user Write-Ahead Log / Settings INTEGER 0 0 1000 Sets the minimum concurrent open transactions before performing commit_delay.
constraint_exclusion user Query Tuning / Other Planner Options ENUM partition Enables the planner to use constraints to optimize queries. Table scans will be skipped if their constraints guarantee that no rows match the query.
cpu_index_tuple_cost user Query Tuning / Planner Cost Constants REAL 0 0 1.79769e+308 Sets the planner’s estimate of the cost of processing each index entry during an index scan.
cpu_operator_cost user Query Tuning / Planner Cost Constants REAL 0 0 1.79769e+308 Sets the planner’s estimate of the cost of processing each operator or function call.
cpu_tuple_cost user Query Tuning / Planner Cost Constants REAL 0 0 1.79769e+308 Sets the planner’s estimate of the cost of processing each tuple (row).
cursor_tuple_fraction user Query Tuning / Other Planner Options REAL 0 0 1 Sets the planner’s estimate of the fraction of a cursor’s rows that will be retrieved.
data_directory postmaster File Locations STRING Sets the server’s data directory.
DateStyle user Client Connection Defaults / Locale and Formatting STRING ISO, MDY Sets the display format for date and time values. Also controls interpretation of ambiguous date inputs.
db_user_namespace sighup Connections and Authentication / Security and Authentication BOOLEAN FALSE Enables per-database user names.
deadlock_timeout superuser Lock Management INTEGER 0 1 2147483647 Sets the time to wait on a lock before checking for deadlock.
debug_pretty_print user Reporting and Logging / What to Log BOOLEAN FALSE Indents parse and plan tree displays.
debug_print_parse user Reporting and Logging / What to Log BOOLEAN FALSE Logs each query’s parse tree.
debug_print_plan user Reporting and Logging / What to Log BOOLEAN FALSE Logs each query’s execution plan.
debug_print_rewritten user Reporting and Logging / What to Log BOOLEAN FALSE Logs each query’s rewritten parse tree.
default_statistics_target user Query Tuning / Other Planner Options INTEGER 0 1 10000 Sets the default statistics target. This applies to table columns that have not had a column-specific target set via ALTER TABLE SET STATISTICS.
default_tablespace user Client Connection Defaults / Statement Behavior STRING Sets the default tablespace to create tables and indexes in. An empty string selects the database’s default tablespace.
default_text_search_config user Client Connection Defaults / Locale and Formatting STRING pg_catalog.simple Sets default text search configuration.
default_transaction_deferrable user Client Connection Defaults / Statement Behavior BOOLEAN FALSE Sets the default deferrable status of new transactions.
default_transaction_isolation user Client Connection Defaults / Statement Behavior ENUM read committed Sets the transaction isolation level of each new transaction.
default_transaction_read_only user Client Connection Defaults / Statement Behavior BOOLEAN FALSE Sets the default read-only status of new transactions.
default_with_oids user Version and Platform Compatibility / Previous PostgreSQL Versions BOOLEAN FALSE Create new tables with OIDs by default.
dynamic_library_path superuser Client Connection Defaults / Other Defaults STRING $libdir Sets the path for dynamically loadable modules. If a dynamically loadable module needs to be opened and the specified name does not have a directory component (i.e., the name does not contain a slash), the system will search this path for the specified file.
dynamic_shared_memory_type postmaster Resource Usage / Memory ENUM posix Selects the dynamic shared memory implementation used.
effective_cache_size user Query Tuning / Planner Cost Constants INTEGER 0 1 2147483647 Sets the planner’s assumption about the size of the disk cache. That is, the portion of the kernel’s disk cache that will be used for PostgreSQL data files. This is measured in disk pages, which are normally 8 kB each.
effective_io_concurrency user Resource Usage / Asynchronous Behavior INTEGER 0 0 1000 Number of simultaneous requests that can be handled efficiently by the disk subsystem. For RAID arrays, this should be approximately the number of drive spindles in the array.
enable_bitmapscan user Query Tuning / Planner Method Configuration BOOLEAN FALSE Enables the planner’s use of bitmap-scan plans.
enable_gathermerge user Query Tuning / Planner Method Configuration BOOLEAN FALSE Enables the planner’s use of gather merge plans.
enable_hashagg user Query Tuning / Planner Method Configuration BOOLEAN FALSE Enables the planner’s use of hashed aggregation plans.
enable_hashjoin user Query Tuning / Planner Method Configuration BOOLEAN FALSE Enables the planner’s use of hash join plans.
enable_indexonlyscan user Query Tuning / Planner Method Configuration BOOLEAN FALSE Enables the planner’s use of index-only-scan plans.
enable_indexscan user Query Tuning / Planner Method Configuration BOOLEAN FALSE Enables the planner’s use of index-scan plans.
enable_material user Query Tuning / Planner Method Configuration BOOLEAN FALSE Enables the planner’s use of materialization.
enable_mergejoin user Query Tuning / Planner Method Configuration BOOLEAN FALSE Enables the planner’s use of merge join plans.
enable_nestloop user Query Tuning / Planner Method Configuration BOOLEAN FALSE Enables the planner’s use of nested-loop join plans.
enable_seqscan user Query Tuning / Planner Method Configuration BOOLEAN FALSE Enables the planner’s use of sequential-scan plans.
enable_sort user Query Tuning / Planner Method Configuration BOOLEAN FALSE Enables the planner’s use of explicit sort steps.
enable_tidscan user Query Tuning / Planner Method Configuration BOOLEAN FALSE Enables the planner’s use of TID scan plans.
escape_string_warning user Version and Platform Compatibility / Previous PostgreSQL Versions BOOLEAN FALSE Warn about backslash escapes in ordinary string literals.
event_source postmaster Reporting and Logging / Where to Log STRING PostgreSQL Sets the application name used to identify PostgreSQL messages in the event log.
exit_on_error user Error Handling BOOLEAN FALSE Terminate session on any error.
external_pid_file postmaster File Locations STRING Writes the postmaster PID to the specified file.
extra_float_digits user Client Connection Defaults / Locale and Formatting INTEGER 0 -15 3 Sets the number of digits displayed for floating-point values. This affects real, double precision, and geometric data types. The parameter value is added to the standard number of digits (FLT_DIG or DBL_DIG as appropriate).
force_parallel_mode user Query Tuning / Other Planner Options ENUM off Forces use of parallel query facilities. If possible, run query using a parallel worker and with parallel restrictions.
from_collapse_limit user Query Tuning / Other Planner Options INTEGER 0 1 2147483647 Sets the FROM-list size beyond which subqueries are not collapsed. The planner will merge subqueries into upper queries if the resulting FROM list would have no more than this many items.
fsync sighup Write-Ahead Log / Settings BOOLEAN FALSE Forces synchronization of updates to disk. The server will use the fsync() system call in several places to make sure that updates are physically written to disk. This insures that a database cluster will recover to a consistent state after an operating system or hardware crash.
full_page_writes sighup Write-Ahead Log / Settings BOOLEAN FALSE Writes full pages to WAL when first modified after a checkpoint. A page write in process during an operating system crash might be only partially written to disk. During recovery, the row changes stored in WAL are not enough to recover. This option writes pages when first modified after a checkpoint to WAL so full recovery is possible.
geqo user Query Tuning / Genetic Query Optimizer BOOLEAN FALSE Enables genetic query optimization. This algorithm attempts to do planning without exhaustive searching.
geqo_effort user Query Tuning / Genetic Query Optimizer INTEGER 0 1 10 GEQO: effort is used to set the default for other GEQO parameters.
geqo_generations user Query Tuning / Genetic Query Optimizer INTEGER 0 0 2147483647 GEQO: number of iterations of the algorithm. Zero selects a suitable default value.
geqo_pool_size user Query Tuning / Genetic Query Optimizer INTEGER 0 0 2147483647 GEQO: number of individuals in the population. Zero selects a suitable default value.
geqo_seed user Query Tuning / Genetic Query Optimizer REAL 0 0 1 GEQO: seed for random path selection.
geqo_selection_bias user Query Tuning / Genetic Query Optimizer REAL 0 1.5 2 GEQO: selective pressure within the population.
geqo_threshold user Query Tuning / Genetic Query Optimizer INTEGER 0 2 2147483647 Sets the threshold of FROM items beyond which GEQO is used.
gin_fuzzy_search_limit user Client Connection Defaults / Other Defaults INTEGER 0 0 2147483647 Sets the maximum allowed result for exact search by GIN.
gin_pending_list_limit user Client Connection Defaults / Statement Behavior INTEGER 0 64 2147483647 Sets the maximum size of the pending list for GIN index.
hba_file postmaster File Locations STRING Sets the server’s “hba” configuration file.
hot_standby postmaster Replication / Standby Servers BOOLEAN FALSE Allows connections and queries during recovery.
hot_standby_feedback sighup Replication / Standby Servers BOOLEAN FALSE Allows feedback from a hot standby to the primary that will avoid query conflicts.
huge_pages postmaster Resource Usage / Memory ENUM try Use of huge pages on Linux.
ident_file postmaster File Locations STRING Sets the server’s “ident” configuration file.
idle_in_transaction_session_timeout user Client Connection Defaults / Statement Behavior INTEGER 0 0 2147483647 Sets the maximum allowed duration of any idling transaction. A value of 0 turns off the timeout.
IntervalStyle user Client Connection Defaults / Locale and Formatting ENUM postgres Sets the display format for interval values.
join_collapse_limit user Query Tuning / Other Planner Options INTEGER 0 1 2147483647 Sets the FROM-list size beyond which JOIN constructs are not flattened. The planner will flatten explicit JOIN constructs into lists of FROM items whenever a list of no more than this many items would result.
krb_caseins_users sighup Connections and Authentication / Security and Authentication BOOLEAN FALSE Sets whether Kerberos and GSSAPI user names should be treated as case-insensitive.
krb_server_keyfile sighup Connections and Authentication / Security and Authentication STRING Sets the location of the Kerberos server key file.
lc_messages superuser Client Connection Defaults / Locale and Formatting STRING Sets the language in which messages are displayed.
lc_monetary user Client Connection Defaults / Locale and Formatting STRING C Sets the locale for formatting monetary amounts.
lc_numeric user Client Connection Defaults / Locale and Formatting STRING C Sets the locale for formatting numbers.
lc_time user Client Connection Defaults / Locale and Formatting STRING C Sets the locale for formatting date and time values.
listen_addresses postmaster Connections and Authentication / Connection Settings STRING localhost Sets the host name or IP address(es) to listen to.
lo_compat_privileges superuser Version and Platform Compatibility / Previous PostgreSQL Versions BOOLEAN FALSE Enables backward compatibility mode for privilege checks on large objects. Skips privilege checks when reading or modifying large objects, for compatibility with PostgreSQL releases prior to 9.0.
local_preload_libraries user Client Connection Defaults / Shared Library Preloading STRING Lists unprivileged shared libraries to preload into each backend.
lock_timeout user Client Connection Defaults / Statement Behavior INTEGER 0 0 2147483647 Sets the maximum allowed duration of any wait for a lock. A value of 0 turns off the timeout.
log_autovacuum_min_duration sighup Reporting and Logging / What to Log INTEGER 0 -1 2147483647 Sets the minimum execution time above which autovacuum actions will be logged. Zero prints all actions. -1 turns autovacuum logging off.
log_checkpoints sighup Reporting and Logging / What to Log BOOLEAN FALSE Logs each checkpoint.
log_connections superuser-backend Reporting and Logging / What to Log BOOLEAN FALSE Logs each successful connection.
log_destination sighup Reporting and Logging / Where to Log STRING stderr Sets the destination for server log output. Valid values are combinations of “stderr”, “syslog”, “csvlog”, and “eventlog”, depending on the platform.
log_directory sighup Reporting and Logging / Where to Log STRING log Sets the destination directory for log files. Can be specified as relative to the data directory or as absolute path.
log_disconnections superuser-backend Reporting and Logging / What to Log BOOLEAN FALSE Logs end of a session, including duration.
log_duration superuser Reporting and Logging / What to Log BOOLEAN FALSE Logs the duration of each completed SQL statement.
log_error_verbosity superuser Reporting and Logging / What to Log ENUM default Sets the verbosity of logged messages.
log_executor_stats superuser Statistics / Monitoring BOOLEAN FALSE Writes executor performance statistics to the server log.
log_file_mode sighup Reporting and Logging / Where to Log INTEGER 0 0 511 Sets the file permissions for log files. The parameter value is expected to be a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)
log_filename sighup Reporting and Logging / Where to Log STRING postgresql-%Y-%m-%d_%H%M%S.log Sets the file name pattern for log files.
log_hostname sighup Reporting and Logging / What to Log BOOLEAN FALSE Logs the host name in the connection logs. By default, connection logs only show the IP address of the connecting host. If you want them to show the host name you can turn this on, but depending on your host name resolution setup it might impose a non-negligible performance penalty.
log_line_prefix sighup Reporting and Logging / What to Log STRING %m [%p] Controls information prefixed to each log line. If blank, no prefix is used.
log_lock_waits superuser Reporting and Logging / What to Log BOOLEAN FALSE Logs long lock waits.
log_min_duration_statement superuser Reporting and Logging / When to Log INTEGER 0 -1 2147483647 Sets the minimum execution time above which statements will be logged. Zero prints all queries. -1 turns this feature off.
log_min_error_statement superuser Reporting and Logging / When to Log ENUM error Causes all statements generating error at or above this level to be logged. Each level includes all the levels that follow it. The later the level, the fewer messages are sent.
log_min_messages superuser Reporting and Logging / When to Log ENUM warning Sets the message levels that are logged. Each level includes all the levels that follow it. The later the level, the fewer messages are sent.
log_parser_stats superuser Statistics / Monitoring BOOLEAN FALSE Writes parser performance statistics to the server log.
log_planner_stats superuser Statistics / Monitoring BOOLEAN FALSE Writes planner performance statistics to the server log.
log_replication_commands superuser Reporting and Logging / What to Log BOOLEAN FALSE Logs each replication command.
log_rotation_age sighup Reporting and Logging / Where to Log INTEGER 0 0 35791394 Automatic log file rotation will occur after N minutes.
log_rotation_size sighup Reporting and Logging / Where to Log INTEGER 0 0 2097151 Automatic log file rotation will occur after N kilobytes.
log_statement superuser Reporting and Logging / What to Log ENUM none Sets the type of statements logged.
log_statement_stats superuser Statistics / Monitoring BOOLEAN FALSE Writes cumulative performance statistics to the server log.
log_temp_files superuser Reporting and Logging / What to Log INTEGER 0 -1 2147483647 Log the use of temporary files larger than this number of kilobytes. Zero logs all files. The default is -1 (turning this feature off).
log_timezone sighup Reporting and Logging / What to Log STRING GMT Sets the time zone to use in log messages.
log_truncate_on_rotation sighup Reporting and Logging / Where to Log BOOLEAN FALSE Truncate existing log files of same name during log rotation.
logging_collector postmaster Reporting and Logging / Where to Log BOOLEAN FALSE Start a subprocess to capture stderr output and/or csvlogs into log files.
maintenance_work_mem user Resource Usage / Memory INTEGER 0 1024 2147483647 Sets the maximum memory to be used for maintenance operations. This includes operations such as VACUUM and CREATE INDEX.
max_connections postmaster Connections and Authentication / Connection Settings INTEGER 0 1 262143 Sets the maximum number of concurrent connections.
max_files_per_process postmaster Resource Usage / Kernel Resources INTEGER 0 25 2147483647 Sets the maximum number of simultaneously open files for each server process.
max_locks_per_transaction postmaster Lock Management INTEGER 0 10 2147483647 Sets the maximum number of locks per transaction. The shared lock table is sized on the assumption that at most max_locks_per_transaction * max_connections distinct objects will need to be locked at any one time.
max_logical_replication_workers postmaster Replication / Subscribers INTEGER 0 0 262143 Maximum number of logical replication worker processes.
max_parallel_workers user Resource Usage / Asynchronous Behavior INTEGER 0 0 1024 Sets the maximum number of parallel workers than can be active at one time.
max_parallel_workers_per_gather user Resource Usage / Asynchronous Behavior INTEGER 0 0 1024 Sets the maximum number of parallel processes per executor node.
max_pred_locks_per_page sighup Lock Management INTEGER 0 0 2147483647 Sets the maximum number of predicate-locked tuples per page. If more than this number of tuples on the same page are locked by a connection, those locks are replaced by a page-level lock.
max_pred_locks_per_relation sighup Lock Management INTEGER 0 -2147483648 2147483647 Sets the maximum number of predicate-locked pages and tuples per relation. If more than this total of pages and tuples in the same relation are locked by a connection, those locks are replaced by a relation-level lock.
max_pred_locks_per_transaction postmaster Lock Management INTEGER 0 10 2147483647 Sets the maximum number of predicate locks per transaction. The shared predicate lock table is sized on the assumption that at most max_pred_locks_per_transaction * max_connections distinct objects will need to be locked at any one time.
max_prepared_transactions postmaster Resource Usage / Memory INTEGER 0 0 262143 Sets the maximum number of simultaneously prepared transactions.
max_replication_slots postmaster Replication / Sending Servers INTEGER 0 0 262143 Sets the maximum number of simultaneously defined replication slots.
max_stack_depth superuser Resource Usage / Memory INTEGER 0 100 2147483647 Sets the maximum stack depth, in kilobytes.
max_standby_archive_delay sighup Replication / Standby Servers INTEGER 0 -1 2147483647 Sets the maximum delay before canceling queries when a hot standby server is processing archived WAL data.
max_standby_streaming_delay sighup Replication / Standby Servers INTEGER 0 -1 2147483647 Sets the maximum delay before canceling queries when a hot standby server is processing streamed WAL data.
max_sync_workers_per_subscription sighup Replication / Subscribers INTEGER 0 0 262143 Maximum number of table synchronization workers per subscription.
max_wal_senders postmaster Replication / Sending Servers INTEGER 0 0 262143 Sets the maximum number of simultaneously running WAL sender processes.
max_wal_size sighup Write-Ahead Log / Checkpoints INTEGER 0 2 2147483647 Sets the WAL size that triggers a checkpoint.
max_worker_processes postmaster Resource Usage / Asynchronous Behavior INTEGER 0 0 262143 Maximum number of concurrent worker processes.
min_parallel_index_scan_size user Query Tuning / Planner Cost Constants INTEGER 0 0 715827882 Sets the minimum amount of index data for a parallel scan. If the planner estimates that it will read a number of index pages too small to reach this limit, a parallel scan will not be considered.
min_parallel_table_scan_size user Query Tuning / Planner Cost Constants INTEGER 0 0 715827882 Sets the minimum amount of table data for a parallel scan. If the planner estimates that it will read a number of table pages too small to reach this limit, a parallel scan will not be considered.
min_wal_size sighup Write-Ahead Log / Checkpoints INTEGER 0 2 2147483647 Sets the minimum size to shrink the WAL to.
old_snapshot_threshold postmaster Resource Usage / Asynchronous Behavior INTEGER 0 -1 86400 Time before a snapshot is too old to read pages changed after the snapshot was taken. A value of -1 disables this feature.
operator_precedence_warning user Version and Platform Compatibility / Previous PostgreSQL Versions BOOLEAN FALSE Emit a warning for constructs that changed meaning since PostgreSQL 9.4.
parallel_setup_cost user Query Tuning / Planner Cost Constants REAL 0 0 1.79769e+308 Sets the planner’s estimate of the cost of starting up worker processes for parallel query.
parallel_tuple_cost user Query Tuning / Planner Cost Constants REAL 0 0 1.79769e+308 Sets the planner’s estimate of the cost of passing each tuple (row) from worker to master backend.
password_encryption user Connections and Authentication / Security and Authentication ENUM md5 Encrypt passwords. When a password is specified in CREATE USER or ALTER USER without writing either ENCRYPTED or UNENCRYPTED, this parameter determines whether the password is to be encrypted.
port postmaster Connections and Authentication / Connection Settings INTEGER 0 1 65535 Sets the TCP port the server listens on.
quote_all_identifiers user Version and Platform Compatibility / Previous PostgreSQL Versions BOOLEAN FALSE When generating SQL fragments, quote all identifiers.
random_page_cost user Query Tuning / Planner Cost Constants REAL 0 0 1.79769e+308 Sets the planner’s estimate of the cost of a nonsequentially fetched disk page.
replacement_sort_tuples user Resource Usage / Memory INTEGER 0 0 2147483647 Sets the maximum number of tuples to be sorted using replacement selection. When more tuples than this are present, quicksort will be used.
restart_after_crash sighup Error Handling BOOLEAN FALSE Reinitialize server after backend crash.
row_security user Connections and Authentication / Security and Authentication BOOLEAN FALSE Enable row security. When enabled, row security will be applied to all users.
search_path user Client Connection Defaults / Statement Behavior STRING “$user”, public Sets the schema search order for names that are not schema-qualified.
seq_page_cost user Query Tuning / Planner Cost Constants REAL 0 0 1.79769e+308 Sets the planner’s estimate of the cost of a sequentially fetched disk page.
session_preload_libraries superuser Client Connection Defaults / Shared Library Preloading STRING Lists shared libraries to preload into each backend.
session_replication_role superuser Client Connection Defaults / Statement Behavior ENUM origin Sets the session’s behavior for triggers and rewrite rules.
shared_buffers postmaster Resource Usage / Memory INTEGER 0 16 1073741823 Sets the number of shared memory buffers used by the server.
shared_preload_libraries postmaster Client Connection Defaults / Shared Library Preloading STRING Lists shared libraries to preload into server.
ssl sighup Connections and Authentication / Security and Authentication BOOLEAN FALSE Enables SSL connections.
ssl_ca_file sighup Connections and Authentication / Security and Authentication STRING Location of the SSL certificate authority file.
ssl_cert_file sighup Connections and Authentication / Security and Authentication STRING server.crt Location of the SSL server certificate file.
ssl_ciphers sighup Connections and Authentication / Security and Authentication STRING none Sets the list of allowed SSL ciphers.
ssl_crl_file sighup Connections and Authentication / Security and Authentication STRING Location of the SSL certificate revocation list file.
ssl_dh_params_file sighup Connections and Authentication / Security and Authentication STRING Location of the SSL DH parameters file.
ssl_ecdh_curve sighup Connections and Authentication / Security and Authentication STRING none Sets the curve to use for ECDH.
ssl_key_file sighup Connections and Authentication / Security and Authentication STRING server.key Location of the SSL server private key file.
ssl_prefer_server_ciphers sighup Connections and Authentication / Security and Authentication BOOLEAN FALSE Give priority to server ciphersuite order.
standard_conforming_strings user Version and Platform Compatibility / Previous PostgreSQL Versions BOOLEAN FALSE Causes ‘…’ strings to treat backslashes literally.
statement_timeout user Client Connection Defaults / Statement Behavior INTEGER 0 0 2147483647 Sets the maximum allowed duration of any statement. A value of 0 turns off the timeout.
stats_temp_directory sighup Statistics / Query and Index Statistics Collector STRING pg_stat_tmp Writes temporary statistics files to the specified directory.
superuser_reserved_connections postmaster Connections and Authentication / Connection Settings INTEGER 0 0 262143 Sets the number of connection slots reserved for superusers.
synchronize_seqscans user Version and Platform Compatibility / Previous PostgreSQL Versions BOOLEAN FALSE Enable synchronized sequential scans.
synchronous_commit user Write-Ahead Log / Settings ENUM on Sets the current transaction’s synchronization level.
synchronous_standby_names sighup Replication / Master Server STRING Number of synchronous standbys and list of names of potential synchronous ones.
syslog_facility sighup Reporting and Logging / Where to Log ENUM local0 Sets the syslog “facility” to be used when syslog enabled.
syslog_ident sighup Reporting and Logging / Where to Log STRING postgres Sets the program name used to identify PostgreSQL messages in syslog.
syslog_sequence_numbers sighup Reporting and Logging / Where to Log BOOLEAN FALSE Add sequence number to syslog messages to avoid duplicate suppression.
syslog_split_messages sighup Reporting and Logging / Where to Log BOOLEAN FALSE Split messages sent to syslog by lines and to fit into 1024 bytes.
tcp_keepalives_count user Client Connection Defaults / Other Defaults INTEGER 0 0 2147483647 Maximum number of TCP keepalive retransmits. This controls the number of consecutive keepalive retransmits that can be lost before a connection is considered dead. A value of 0 uses the system default.
tcp_keepalives_idle user Client Connection Defaults / Other Defaults INTEGER 0 0 2147483647 Time between issuing TCP keepalives. A value of 0 uses the system default.
tcp_keepalives_interval user Client Connection Defaults / Other Defaults INTEGER 0 0 2147483647 Time between TCP keepalive retransmits. A value of 0 uses the system default.
temp_buffers user Resource Usage / Memory INTEGER 0 100 1073741823 Sets the maximum number of temporary buffers used by each session.
temp_file_limit superuser Resource Usage / Disk INTEGER 0 -1 2147483647 Limits the total size of all temporary files used by each process. -1 means no limit.
temp_tablespaces user Client Connection Defaults / Statement Behavior STRING Sets the tablespace(s) to use for temporary tables and sort files.
TimeZone user Client Connection Defaults / Locale and Formatting STRING GMT Sets the time zone for displaying and interpreting time stamps.
timezone_abbreviations user Client Connection Defaults / Locale and Formatting STRING Selects a file of time zone abbreviations.
trace_recovery_messages sighup Developer Options ENUM log Enables logging of recovery-related debugging information. Each level includes all the levels that follow it. The later the level, the fewer messages are sent.
track_activities superuser Statistics / Query and Index Statistics Collector BOOLEAN FALSE Collects information about executing commands. Enables the collection of information on the currently executing command of each session, along with the time at which that command began execution.
track_activity_query_size postmaster Resource Usage / Memory INTEGER 0 100 102400 Sets the size reserved for pg_stat_activity.query, in bytes.
track_commit_timestamp postmaster Replication BOOLEAN FALSE Collects transaction commit time.
track_counts superuser Statistics / Query and Index Statistics Collector BOOLEAN FALSE Collects statistics on database activity.
track_functions superuser Statistics / Query and Index Statistics Collector ENUM none Collects function-level statistics on database activity.
track_io_timing superuser Statistics / Query and Index Statistics Collector BOOLEAN FALSE Collects timing statistics for database I/O activity.
transform_null_equals user Version and Platform Compatibility / Other Platforms and Clients BOOLEAN FALSE Treats “expr=NULL” as “expr IS NULL”. When turned on, expressions of the form expr = NULL (or NULL = expr) are treated as expr IS NULL, that is, they return true if expr evaluates to the null value, and false otherwise. The correct behavior of expr = NULL is to always return null (unknown).
unix_socket_directories postmaster Connections and Authentication / Connection Settings STRING /tmp Sets the directories where Unix-domain sockets will be created.
unix_socket_group postmaster Connections and Authentication / Connection Settings STRING Sets the owning group of the Unix-domain socket. The owning user of the socket is always the user that starts the server.
unix_socket_permissions postmaster Connections and Authentication / Connection Settings INTEGER 0 0 511 Sets the access permissions of the Unix-domain socket. Unix-domain sockets use the usual Unix file system permission set. The parameter value is expected to be a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)
update_process_title superuser Process Title BOOLEAN FALSE Updates the process title to show the active SQL command. Enables updating of the process title every time a new SQL command is received by the server.
vacuum_cost_delay user Resource Usage / Cost-Based Vacuum Delay INTEGER 0 0 100 Vacuum cost delay in milliseconds.
vacuum_cost_limit user Resource Usage / Cost-Based Vacuum Delay INTEGER 0 1 10000 Vacuum cost amount available before napping.
vacuum_cost_page_dirty user Resource Usage / Cost-Based Vacuum Delay INTEGER 0 0 10000 Vacuum cost for a page dirtied by vacuum.
vacuum_cost_page_hit user Resource Usage / Cost-Based Vacuum Delay INTEGER 0 0 10000 Vacuum cost for a page found in the buffer cache.
vacuum_cost_page_miss user Resource Usage / Cost-Based Vacuum Delay INTEGER 0 0 10000 Vacuum cost for a page not found in the buffer cache.
vacuum_defer_cleanup_age sighup Replication / Master Server INTEGER 0 0 1000000 Number of transactions by which VACUUM and HOT cleanup should be deferred, if any.
vacuum_freeze_min_age user Client Connection Defaults / Statement Behavior INTEGER 0 0 1000000000 Minimum age at which VACUUM should freeze a table row.
vacuum_freeze_table_age user Client Connection Defaults / Statement Behavior INTEGER 0 0 2000000000 Age at which VACUUM should scan whole table to freeze tuples.
vacuum_multixact_freeze_min_age user Client Connection Defaults / Statement Behavior INTEGER 0 0 1000000000 Minimum age at which VACUUM should freeze a MultiXactId in a table row.
vacuum_multixact_freeze_table_age user Client Connection Defaults / Statement Behavior INTEGER 0 0 2000000000 Multixact age at which VACUUM should scan whole table to freeze tuples.
wal_buffers postmaster Write-Ahead Log / Settings INTEGER 0 -1 262143 Sets the number of disk-page buffers in shared memory for WAL.
wal_compression superuser Write-Ahead Log / Settings BOOLEAN FALSE Compresses full-page writes written in WAL file.
wal_keep_segments sighup Replication / Sending Servers INTEGER 0 0 2147483647 Sets the number of WAL files held for standby servers.
wal_level postmaster Write-Ahead Log / Settings ENUM replica Set the level of information written to the WAL.
wal_log_hints postmaster Write-Ahead Log / Settings BOOLEAN FALSE Writes full pages to WAL when first modified after a checkpoint, even for a non-critical modifications.
wal_receiver_status_interval sighup Replication / Standby Servers INTEGER 0 0 2147483 Sets the maximum interval between WAL receiver status reports to the primary.
wal_receiver_timeout sighup Replication / Standby Servers INTEGER 0 0 2147483647 Sets the maximum wait time to receive data from the primary.
wal_retrieve_retry_interval sighup Replication / Standby Servers INTEGER 0 1 2147483647 Sets the time to wait before retrying to retrieve WAL after a failed attempt.
wal_sender_timeout sighup Replication / Sending Servers INTEGER 0 0 2147483647 Sets the maximum time to wait for WAL replication.
wal_sync_method sighup Write-Ahead Log / Settings ENUM fdatasync Selects the method used for forcing WAL updates to disk.
wal_writer_delay sighup Write-Ahead Log / Settings INTEGER 0 1 10000 Time between WAL flushes performed in the WAL writer.
wal_writer_flush_after sighup Write-Ahead Log / Settings INTEGER 0 0 2147483647 Amount of WAL written out by WAL writer that triggers a flush.
work_mem user Resource Usage / Memory INTEGER 0 64 2147483647 Sets the maximum memory to be used for query workspaces. This much memory can be used by each internal sort operation and hash table before switching to temporary disk files.
xmlbinary user Client Connection Defaults / Statement Behavior ENUM base64 Sets how binary values are to be encoded in XML.
xmloption user Client Connection Defaults / Statement Behavior ENUM content Sets whether XML data in implicit parsing and serialization operations is to be considered as documents or content fragments.
#expand(end)

***基本設定
/*
****パス
*****base_dir
実行時データの格納場所

-設定値
base_dir = <パス>

-デフォルト
base_dir = <インストールパス>
*/

*ツール


Notice: Trying to get property 'queue' of non-object in /usr/local/wordpress/wp-includes/script-loader.php on line 2876

Warning: Invalid argument supplied for foreach() in /usr/local/wordpress/wp-includes/script-loader.php on line 2876