docs: add "Listener" page

Co-authored-by: Steve Chavez <stevechavezast@gmail.com>
This commit is contained in:
Laurence Isla
2024-06-12 18:30:19 -05:00
co-authored by Steve Chavez
parent 49a7aa9933
commit 0e4fcd7387
4 changed files with 44 additions and 10 deletions
+1 -5
View File
@@ -47,16 +47,12 @@ For docker you can do:
Schema Cache Reloading with NOTIFY
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PostgREST also allows you to reload its schema cache through PostgreSQL `NOTIFY <https://www.postgresql.org/docs/current/sql-notify.html>`_.
To reload the schema cache from within the database, you can use the ``NOTIFY`` command. See :ref:`listener`.
.. code-block:: postgres
NOTIFY pgrst, 'reload schema'
This is useful in environments where you cant send the SIGUSR1 Unix Signal. Like on cloud managed containers or on Windows systems.
The ``pgrst`` notification channel is enabled by default. For configuring the channel, see :ref:`db-channel` and :ref:`db-channel-enabled`.
.. _auto_schema_reloading:
Automatic Schema Cache Reloading