Skip to content

Commit c9adaed

Browse files
committed
docs: target_session_attrs=read-only in libpq>=14
1 parent 381e12e commit c9adaed

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/references/listener.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ This will cause the :ref:`connection_pool` to connect to the read replica host a
4646

4747
.. note::
4848

49-
Under the hood, PostgREST forces `target_session_attrs=read-write <https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-TARGET-SESSION-ATTRS>`_ for the ``LISTEN`` session.
49+
- Under the hood, PostgREST forces `target_session_attrs=read-write <https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-TARGET-SESSION-ATTRS>`_ for the ``LISTEN`` session.
50+
So if you specify ``target_session_attrs=read-only`` as mentioned above, PostgREST will override it for the ``LISTEN``.
51+
- ``read-only`` is only available on libpq >= 14, if you use a lower version you will get an error like ``invalid target_session_attrs value: \"read-only\"``.
5052

5153
.. _listener_automatic_recovery:
5254

0 commit comments

Comments
 (0)