docs: clarify debounce time window in schema cache reloads

This commit is contained in:
arturbent0
2026-03-23 12:04:01 +00:00
committed by Wolfgang Walther
parent c9c6ebb53a
commit 5e504a77fa
+2 -2
View File
@@ -56,7 +56,7 @@ To reload the schema cache from within the database, you can use the ``NOTIFY``
Debouncing
~~~~~~~~~~
PostgREST does not reload the schema cache for each notification when several ``NOTIFY pgrst`` events are generated quickly after one another.
PostgREST does not reload the schema cache for each notification when several ``NOTIFY pgrst`` events are generated quickly after one another.
There are two cases to consider: when notifications are sent within a single transaction and when they are sent across multiple transactions.
@@ -64,7 +64,7 @@ In the first case, PostgreSQL deduplicates identical ``NOTIFY`` events within th
In the second case, when notifications are sent from separate transactions in a short time span, PostgREST applies a debouncing mechanism to avoid excessive schema cache reloads.
Instead of reloading the schema cache for each notification, events are grouped within a small time window. The reload function is executed once immediately when the first notification is received and once more after the burst of events settles.
Instead of reloading the schema cache for each notification, events are grouped within a small time window of 100 milliseconds. The reload function is executed once immediately when the first notification is received and once more after the burst of events settles, resulting in at most two executions within that time window.
.. _auto_schema_reloading: