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

  • PSQLPy
  • NextContribution guide

This view

  • Original page
  • New address

GeezerVison is showing psqlpy-python.github.io — External connection pools

External connection pools

6/28/26

PSQLPy supports external connection pools like PgBouncer or Supavisor.

Usually, external connection pools have 3 main modes: Session, Transaction and Statement.

If you use Session mode, there is nothing you have to do, just use PSQLPy as usual.

But there are a few conditions that must be met to make Transaction and Statement work.

Disable statement preparation

Disable statement preparation for any sql statement execution (if a method has prepared parameter, set it to False).

Execute statement only in transaction

Each statement must be executed in a transaction.

db_pool = ConnectionPool(...)

async with db_pool.acquire() as conn:
    async with conn.transaction() as transaction:
        await transaction.execute("SELECT 1", prepared=False)
You are visitor 01402503 — 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.