OpenFn / OpenFn/adaptors

`postgresql` Allow user configuration to set query and statement timeouts

Open
#42 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
24
Forks
41
Avg merge
3d 13h
Merged PRs (30d)
12

Description

In order to make it a little easier to debug very large queries, consider adding access to these config options outlined in the pg.Client constructor.

https://github.com/OpenFn/language-postgresql/blob/9c517183b2f52f5911a5993b732b1a025f98332e/src/Adaptor.js#L46

config = {
  // ...
  statement_timeout?: number, // number of milliseconds before a statement in query will time out, default is no timeout
  query_timeout?: number, // number of milliseconds before a query call will timeout, default is no timeout
  connectionTimeoutMillis?: number, // number of milliseconds to wait for connection, default is no timeout
  idle_in_transaction_session_timeout?: number // number of milliseconds before terminating any session with an open idle transaction, default is no timeout
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Adaptor.js around line 46 and compare the existing configuration passed to the pg.Client constructor with the timeout options listed in the issue. Confirm that users can provide those four timeout values through adaptor configuration, and verify that the client receives them without changing defaults when they are omitted.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, postgresql
Domain
databases
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.