From 698db875908fdcdeaf407e44d21041d005ecf713 Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Mon, 26 Jul 2021 03:01:00 -0500 Subject: [PATCH] Reorder configuration reloading --- configuration.rst | 70 ++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/configuration.rst b/configuration.rst index 5f074ac87..c7355f0fb 100644 --- a/configuration.rst +++ b/configuration.rst @@ -9,6 +9,10 @@ PostgREST reads a configuration file to determine information about the database ./postgrest /path/to/postgrest.conf +.. note:: + + Configuration can be reloaded without restarting the server. See :ref:`config_reloading`. + The configuration file must contain a set of key value pairs. At minimum you must include these keys: .. code:: @@ -62,40 +66,6 @@ raw-media-types String You can also set these configuration parameters using environment variables. They are capitalized, have a ``PGRST_`` prefix, and use underscores. For example: ``PGRST_DB_URI`` corresponds to ``db-uri``. -.. _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 @@ -408,3 +378,35 @@ raw-media-types raw-media-types="image/png, text/xml" +.. _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 + +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`` +