Skip to content

Hang while querying more than 100 rows from pgpool2 #49

Open
@gary02

Description

@gary02

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions