[go: up one dir, main page]

Skip to content

Allow working with adjusted GUC values

Goal

Currently, though it's possible to set any GUC (session variable), it is not used in subsequent queries – it seems that user session's queries are not executed in a single connection.

How to reproduce (tested with Joe versions 0.9.4 and 0.10.0):

  1. set statement_timeout to a low value
    exec set statement_timeout to '1s'
  2. now try a query that takes longer than statement_timeout:
    explain select pg_sleep(2)
  3. expected result: a "statement timeout" error -- however, we see that query succeeds, so our GUC value change is not effective.

TODO / How to implement

Ensure that we keep using the same connection for the same Joe's client session?

Acceptance criteria

Any user can change a GUC and subsequent queries will use it, unless session reset or Joe restart happened. One of common use cases for this: changing planner settings such as enable_seqscan, random_page_cost, or max_parallel_workers_per_gather.

Edited by Artyom Kartasov