Skip to content

Commit

Permalink
README: add caveat (prepared queries)
Browse files Browse the repository at this point in the history
  • Loading branch information
yhuelf committed Sep 7, 2023
1 parent 34df493 commit 48c322e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,15 @@ And this time, the specific configuration is applied.
Caveats
--------

`pg_query_settings` doesn't work well with **prepared queries**. More specifically:
for a given parameter `P`, if the generic plan is selected, and if the executor
needs to fetch the value of `P`, then it won't get the value specified in the
`pgqs_config` table. For example, the executor fetches the value of `work_mem`
in order to decide whether to perform an in-memory sort, while the parameter
`max_parallel_workers_per_gather` is only used during the planification stage,
so `pg_query_settings` only works for this last example.
This will be fixed in future releases.

Enabling this extension might have a performance impact on any workloads
with a high number of fast queries, as it slighlty increases the time taken
to compute the query plan. The more entries in the table, the greater the
Expand Down

0 comments on commit 48c322e

Please sign in to comment.