Add no downtime schema cache reload
This commit is contained in:
committed by
Steve Chavez
parent
20bee2ec34
commit
33f0da0509
@@ -19,6 +19,9 @@ Added
|
|||||||
* Allow :ref:`embedding_view_chains` recursively to any depth.
|
* Allow :ref:`embedding_view_chains` recursively to any depth.
|
||||||
|br| -- `@wolfgangwalther <https://github.com/wolfgangwalther>`_
|
|br| -- `@wolfgangwalther <https://github.com/wolfgangwalther>`_
|
||||||
|
|
||||||
|
* No downtime when reloading the schema cache. See the note in :ref:`schema_reloading`.
|
||||||
|
|br| -- `@steve-chavez <https://github.com/steve-chavez>`_
|
||||||
|
|
||||||
* Allow schema cache reloading using PostgreSQL :ref:`NOTIFY <schema_reloading_notify>` command.
|
* Allow schema cache reloading using PostgreSQL :ref:`NOTIFY <schema_reloading_notify>` command.
|
||||||
|br| -- `@steve-chavez <https://github.com/steve-chavez>`_
|
|br| -- `@steve-chavez <https://github.com/steve-chavez>`_
|
||||||
|
|
||||||
|
|||||||
+11
-8
@@ -95,16 +95,19 @@ To refresh the cache without restarting the PostgREST server, send a SIGUSR1 sig
|
|||||||
|
|
||||||
killall -SIGUSR1 postgrest
|
killall -SIGUSR1 postgrest
|
||||||
|
|
||||||
|
|
||||||
|
For docker you can do:
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
docker kill -s SIGUSR1 <container>
|
||||||
|
|
||||||
|
# or in docker-compose
|
||||||
|
docker-compose kill -s SIGUSR1 <service>
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
To refresh the cache in docker:
|
There's no downtime when reloading the schema cache. The reloading will happen on a background thread while requests keep being served.
|
||||||
|
|
||||||
.. code:: bash
|
|
||||||
|
|
||||||
docker kill -s SIGUSR1 <container>
|
|
||||||
|
|
||||||
# or in docker-compose
|
|
||||||
docker-compose kill -s SIGUSR1 <service>
|
|
||||||
|
|
||||||
.. _schema_reloading_notify:
|
.. _schema_reloading_notify:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user