From 2e50a22e641e077444a0619bf836df2baa8676e7 Mon Sep 17 00:00:00 2001 From: laurenceisla Date: Sat, 24 Jul 2021 18:52:52 -0500 Subject: [PATCH] Add config reloading with SIGUSR2 --- configuration.rst | 34 ++++++++++++++++++++++++++++++++++ releases/upcoming.rst | 3 +++ 2 files changed, 37 insertions(+) diff --git a/configuration.rst b/configuration.rst index bed5a750d..56aee4713 100644 --- a/configuration.rst +++ b/configuration.rst @@ -60,6 +60,40 @@ role-claim-key String .role raw-media-types String ======================== ======= ================= ======== +.. _config_reloading: + +Configuration Reloading +----------------------- + +To reload the configuration without restarting the PostgREST server send a SIGUSR2 signal to the server process. + +.. code:: bash + + killall -SIGUSR2 postgrest + +.. note:: + + To refresh the cache in docker: + + .. code:: bash + + docker kill -s SIGUSR2 + + # or in docker-compose + docker-compose kill -s SIGUSR2 + +.. important:: + + The following settings will not be reread when reloading the configuration. You will need to restart PostgREST in that case. + + * ``db-uri`` + * ``db-pool`` + * ``db-pool-timeout`` + * ``server-host`` + * ``server-port`` + * ``server-unix-socket`` + * ``server-unix-socket-mode`` + .. _db-uri: db-uri diff --git a/releases/upcoming.rst b/releases/upcoming.rst index cda81ff1b..b8cf803e3 100644 --- a/releases/upcoming.rst +++ b/releases/upcoming.rst @@ -25,6 +25,9 @@ Added * Allow :ref:`connection_poolers` such as PgBouncer in transaction pooling mode. |br| -- `@laurenceisla `_ +* Allow :ref:`config_reloading` by sending a SIGUSR2 signal. + |br| -- `@steve-chavez `_ + * Config options for showing a full OpenAPI output regardless of the JWT role privileges and for disabling it altogether. See :ref:`openapi-mode`. |br| -- `@steve-chavez `_