We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I'm having trouble passing this config into the client: idle_in_transaction_session_timeout implemented here: #2049
idle_in_transaction_session_timeout
However I couldn't figure out where to pass it in given the starting example of
const { Pool } = require('pg'); const pool = new Pool(); pool.query('SQL...')
I looked into the config document and did not see idle_in_transaction_session_timeout as a documented property of the PoolConfig type
It would be nice to have the available options documented here: https://node-postgres.com/api/pool#constructor
Thanks
The text was updated successfully, but these errors were encountered:
It should just be pass through to the Client object I think. The options passed to the Pool object get saved here:
https://github.com/brianc/node-postgres/blob/pg%408.4.1/packages/pg-pool/index.js#L64
which get passed to the Client object that gets constructed by the Pool here:
https://github.com/brianc/node-postgres/blob/pg%408.4.1/packages/pg-pool/index.js#L201
those go into this ConnectionParameters object:
https://github.com/brianc/node-postgres/blob/pg%408.4.1/packages/pg/lib/client.js#L19
and the idle_in_transaction_session_timeout param should be used here:
https://github.com/brianc/node-postgres/blob/pg%408.4.1/packages/pg/lib/client.js#L398
The ConnectionParameters object contains that field here:
https://github.com/brianc/node-postgres/blob/pg%408.4.1/packages/pg/lib/connection-parameters.js#L96
So I think idle_in_transaction_session_timeout just needs to be documented like statement_timeout here:
statement_timeout
https://node-postgres.com/api/client#constructor
Because those just get passed through to postgres: https://www.postgresql.org/docs/current/runtime-config-client.html
Also note that the Pool constructor docs https://node-postgres.com/api/pool#constructor mention:
The config passed to the pool is also passed to every client instance within the pool when the pool creates that client.
So something like: const pool = new Pool({ idle_in_transaction_session_timeout: 60000 }) will get passed through down to the Client.
const pool = new Pool({ idle_in_transaction_session_timeout: 60000 })
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Hello,
I'm having trouble passing this config into the client:
idle_in_transaction_session_timeout
implemented here: #2049However I couldn't figure out where to pass it in given the starting example of
I looked into the config document and did not see
idle_in_transaction_session_timeout
as a documented property of the PoolConfig typeIt would be nice to have the available options documented here: https://node-postgres.com/api/pool#constructor
Thanks
The text was updated successfully, but these errors were encountered: