diff --git a/admin.rst b/admin.rst index 908514a9b..68df23052 100644 --- a/admin.rst +++ b/admin.rst @@ -120,12 +120,12 @@ The burst argument tells Nginx to start dropping requests if more than five queu Nginx rate limiting is general and indiscriminate. To rate limit each authenticated request individually you will need to add logic in a :ref:`Custom Validation ` function. -.. _connection_poolers: +.. _external_connection_poolers: -Using Connection Poolers ------------------------- +Using External Connection Poolers +--------------------------------- -In order to increase performance, PostgREST uses prepared statements by default. However, this setting is incompatible with connection poolers such as PgBouncer working in transaction pooling mode. In this case, you need to set the :ref:`db-prepared-statements` config option to ``false``. On the other hand, session pooling is fully compatible with PostgREST, while statement pooling is not compatible at all. +PostgREST manages its :ref:`own pool of connections ` and uses prepared statements by default in order to increase performance. However, this setting is incompatible with external connection poolers such as PgBouncer working in transaction pooling mode. In this case, you need to set the :ref:`db-prepared-statements` config option to ``false``. On the other hand, session pooling is fully compatible with PostgREST, while statement pooling is not compatible at all. .. note:: diff --git a/configuration.rst b/configuration.rst index 04dd236db..2da88d208 100644 --- a/configuration.rst +++ b/configuration.rst @@ -158,7 +158,7 @@ db-channel-enabled When this is set to :code:`true`, the notification channel specified in :ref:`db-channel` is enabled. - You should set this to ``false`` when using PostgresSQL behind a connection pooler such as PgBouncer working in transaction pooling mode. See :ref:`this section ` for more information. + You should set this to ``false`` when using PostgresSQL behind an external connection pooler such as PgBouncer working in transaction pooling mode. See :ref:`this section ` for more information. .. _db-prepared-statements: @@ -169,7 +169,7 @@ db-prepared-statements When disabled, the generated queries will be parameterized (invulnerable to SQL injection) but they will not be prepared (cached in the database session). Not using prepared statements will noticeably decrease performance, so it's recommended to always have this setting enabled. - You should only set this to ``false`` when using PostgresSQL behind a connection pooler such as PgBouncer working in transaction pooling mode. See :ref:`this section ` for more information. + You should only set this to ``false`` when using PostgresSQL behind an external connection pooler such as PgBouncer working in transaction pooling mode. See :ref:`this section ` for more information. .. _db-tx-end: diff --git a/releases/v8.0.0.rst b/releases/v8.0.0.rst index 6b55c98e1..a02a20f69 100644 --- a/releases/v8.0.0.rst +++ b/releases/v8.0.0.rst @@ -28,7 +28,7 @@ Added * Allow sending the header ``Prefer: headers-only`` to get a response with a ``Location`` header. See :ref:`insert_update`. |br| -- `@laurenceisla `_ -* Allow :ref:`connection_poolers` such as PgBouncer in transaction pooling mode. +* Allow :ref:`external_connection_poolers` such as PgBouncer in transaction pooling mode. |br| -- `@laurenceisla `_ * Allow :ref:`config_reloading` by sending a SIGUSR2 signal.