Postgresの設定値反映方法(restart, reload, SET文実行時)

掲題の通りで、設定値変更したものの反映するにはどうすれば良いのか確認する方法を調べたのでそのメモ。

postgresに入り以下のコマンドを実行して、contextの内容を確認する。

postgres=# select name,setting,unit,context from pg_settings WHERE name = 'max_standby_streaming_delay';
            name             | setting | unit | context
-----------------------------+---------+------+---------
 max_standby_streaming_delay | 30000   | ms   | sighup
(1 row)

max_standby_streaming_delaycontext の値が sighup なので reload が必要とわかる。

contextpostmaster であれば、PostgreSQL起動時とわかる。