GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Pool min size · Issue #1869 · brianc/node-postgres

Pool min size #1869

New issue
Copy link
New issue
Copy link
Open
Open
Pool min size#1869
Copy link

Description

@krabradosty
krabradosty
opened on Apr 4, 2019
Issue body actions

Hi. It seems that min parameter of Pool configuration is not used.

Code

let pool = new Pool({
        database: connectionConfig.database,
        port: connectionConfig.port,
        nolimit: connectionConfig.nolimit,
        user: connectionConfig.user,
        password: connectionConfig.password,
        host: connectionConfig.host,
        min: 1
    });

Expected:
At least one connection is always established

Actual:
I receive a removed event with pool.totalCount equals to zero. After that my process is terminated.

Reacted by Super Snager, IvanBialotski-GBI and Roman Stetsyk

Activity

  1. charmander commented on Apr 5, 2019

    @charmander
    charmander
    on Apr 5, 2019
    Collaborator
    More actions

    min doesn’t exist. I don’t think nolimit does either.

  2. krabradosty commented on Apr 6, 2019

    @krabradosty
    krabradosty
    on Apr 6, 2019
    Author
    More actions

    Strange, I think it can be useful: e.g. I want to know that there is a problem with a connection to DB before my app come in a state when it needs to perform a query.
    Right now when I detect that pool.totalCount is zero, I send SELECT now() to DB to maintain the connection.

    Reacted by andymel
  3. champikasam commented on Mar 2, 2022

    @champikasam
    champikasam
    on Mar 2, 2022
    More actions

    I also have a requirement to maintain a given, minimum number of connections to the database. Is there a known workaround to achieve this? I noticed that PgBouncer supports this but i prefer to use node-postgres if a viable workaround is available.

    Reacted by Simon Lemieux, andymel and 제이크
  4. gajus commented on Aug 3, 2022

    @gajus
    gajus
    on Aug 3, 2022
    Contributor
    More actions

    @brianc This would be a nice feature. Any reason it isn't supported given that we can just leverage generic-pool functionality for this?

    Would be nice to have this for compatibility with postgres.

    gajus/postgres-bridge@2463f7f

  5. gajus commented on Aug 3, 2022

    @gajus
    gajus
    on Aug 3, 2022
    Contributor
    More actions

    Upon a second look, it looks like Pool is not using generic-pool, contrary to what I thought.

  6. Smriti-OSS commented on Jun 5, 2023

    @Smriti-OSS
    Smriti-OSS
    on Jun 5, 2023
    More actions

    Hi @brianc Is there any future roadmap to support this feature??

    Reacted by Roman Stetsyk
  7. EQuincerot commented on Sep 21, 2026

    @EQuincerot
    EQuincerot
    on Sep 21, 2026
    More actions

    Resolved by #3438 if I'm correct :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.