Skip to content

arkstack-dev/pg-quic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

pg-quic

A transport binding of the PostgreSQL frontend/backend wire protocol (v3) over QUIC (RFC 9000).

Status: Draft v0.1 — specification only. No reference implementation yet. Not ready for production use. Feedback is welcome.

What this is

A specification for running the existing PostgreSQL wire protocol over QUIC instead of TCP+TLS. The v3 message format is unchanged; only the transport beneath it changes.

See SPEC.md for the full draft.

What it isn't

  • Not HTTP/3. QUIC is used as transport. No HTTP semantics (headers, methods, status codes) are involved.
  • Not a fork of the PostgreSQL protocol. v3 messages are preserved byte-for-byte.
  • Not a patch to PostgreSQL. A conforming server can be built as a proxy in front of an unmodified PostgreSQL.
  • Not a product. This is a vendor-neutral specification, governed independently. It is not a module of, or productization path for, any existing commercial driver or database product.

Why

The current TCP+TLS transport imposes costs that QUIC addresses directly:

  • Query cancellation requires a second TCP connection and a per-session secret key. Over QUIC, it's a STOP_SENDING on the session stream.
  • Long-lived sessions break on IP changes. QUIC connections survive them.
  • N logical sessions cost N sockets and N file descriptors client-side. Over QUIC, they share one UDP socket via independent streams.
  • Handshake latency (TCP + TLS + Startup) drops to one RTT.

See SPEC.md §1 for the full motivation.

Status

Item Status
Specification draft v0.1
ALPN token (pgsql/3) chosen yes
IANA registration pending
Reference proxy implementation not started
Interoperability test vectors not started
pgsql-hackers submission blocked on reference impl

Contributing

Issues and pull requests welcome, especially on:

  • Ambiguities or under-specified corners in SPEC.md.
  • Interaction with existing PostgreSQL drivers, poolers, and middleware.
  • SCRAM channel binding interop (see SPEC.md §6.1).

Substantive protocol changes should be proposed as an issue first, with rationale, before opening a PR.

License

All content in this repository is licensed under the APACHE 2.0 License. See LICENSE for details.

Governance

This project is governed independently of any commercial product or vendor. The specification and reference implementations are intended to be available to the wider PostgreSQL community on equal terms.

About

Standalone open-source research project specifying how the PostgreSQL wire protocol can run over QUIC instead of TCP — bringing connection migration, multiplexed sessions, and first-class query cancellation to PostgreSQL clients. RFC-first, vendor-neutral.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors