-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
This program will never terminate, as the rollback query infinitely blocks:
const { Pool } = require('pg')
const pool = new Pool()
async function main() {
const client = await pool.connect()
try {
await client.query('BEGIN');
await client.query('SELECT $1', [{x: 1n}]);
await client.query('COMMIT')
} catch (e) {
await client.query('ROLLBACK')
throw e
} finally {
client.release()
}
console.log('great success! Terminated!');
}
main();
Note, the value 1n works, {x: 1} works, but {x: 1n} is where the problems start
Metadata
Metadata
Assignees
Labels
No labels