Skip to content
New issue

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

Hang while querying more than 100 rows from pgpool2 #49

Open
gary02 opened this issue Nov 30, 2022 · 0 comments
Open

Hang while querying more than 100 rows from pgpool2 #49

gary02 opened this issue Nov 30, 2022 · 0 comments

Comments

@gary02
Copy link

gary02 commented Nov 30, 2022

Thx for your time!

I have a pgpool2 instance in front of a postgresql@12 database.

The problem is that database-proxy get stuck when querying more than 100 rows ('select id from book limit 100' for example) from the pgpool2 , but it work well when querying the postgresql directly.

I've dig the code a bit and found that pg client actually can querying more than 100 rows from pgpool2 successfully .

import pg from "pg"
const {Pool} = pg;
const pool = new Pool({connectionString: 'postgresql://user:passwd@pgpool2address:9999/database'});
const client = await pool.connect();
client.query('select id from book limit 1000', (err, res) => {
  if (err) {
    console.log(err.stack)
  } else {
    console.log(res.rows.length)    //  output `1000`
  }
})

env

Node.js v16.18.1
@observablehq/database-proxy 3.0.0
pg 8.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant