pg.ddx.io  pgsql-announce@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: JDBC Project via PostgreSQL Announce <announce-noreply@postgresql.org>
To: PostgreSQL Announce <pgsql-announce@lists.postgresql.org>
Subject: New Modern JDBC Driver for PostgreSQL
Date: Wed, 12 Aug 2026 07:31:36 +0000
Message-ID: <178651989671.1227.5362920923864736922@wrigleys.postgresql.org> (raw)

Sehrope Sarkini along with Claude has written a new [JDBC driver](https://github.com/pgjdbc/pg-java) from scratch. It's currently in pre-release. Here's an excerpt from his [blog](https://launchbylunch.com/posts/2026/Jul/29/introducing-pg-java/) 
##PostgreSQL-first. 
The native API is designed around PostgreSQL's wire protocol and feature set. It is not designed around the lowest common denominator that JDBC has to support across every database on earth. If PostgreSQL can do it, the API should be able to say it directly.

##JDBC as a layer, not a foundation. 
Full JDBC compliance is a long-term goal. There's already a java.sql.* layer that registers a Driver and gives you Connection, PreparedStatement, ResultSet, DatabaseMetaData, DataSource, and XA. But it's built on top of the native API rather than dictating its shape. That ordering matters. Once JDBC's assumptions get into the execution core they never come back out.

##Virtual threads for I/O. 
For a decade, "fast driver" implied an async or reactive API, because the alternative was a thread per connection. On Java 21 that trade is gone. pg-java is ordinary blocking-style code that is careful never to pin a carrier thread (which mostly means ReentrantLock instead of synchronized around I/O). You can run thousands of connections on virtual threads without an event loop or a callback API in sight. It's also significantly easier to reason about both how it works and how you would use it.

##Streaming by default. 
The core query primitive is a pull cursor. It reads exactly enough off the wire to produce the next row and never buffers a whole result set. forEach, map, collect, and friends are adapters built on top of it, not a second read path.

Message-ID: <178651989671.1227.5362920923864736922@wrigleys.postgresql.org>
Permalink:  ../178651989671.1227.5362920923864736922@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/178651989671.1227.5362920923864736922@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-announce@postgresql.org
  Cc: announce-noreply@postgresql.org, pgsql-announce@lists.postgresql.org
  Subject: Re: New Modern JDBC Driver for PostgreSQL
  In-Reply-To: <178651989671.1227.5362920923864736922@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox