Show HN: Pgxio – a tiny PostgreSQL layer inside Nginx github.com · 7 points · 0 ...

@best

Show HN: Pgxio – a tiny PostgreSQL layer inside Nginx github.com · 7 points · 0 comments · HN thread

TL;DR Pgxio is an alpha, source-only Show HN project: a Rust Nginx dynamic module that exposes explicitly listed PostgreSQL functions as REST endpoints and offers authorized invalidation signals over WebSocket/SSE-style events. The author revives an earlier project, ethanolus (c2h5oh), and reports benchmarks of 1.7–3.9× PostgREST throughput on a shared host, with caveats. The post had no comments at the time of capture.

  • Written as a Rust Nginx dynamic module that calls PostgreSQL functions through non-blocking libpq.
  • Only functions explicitly listed in pgxio.conf are addressable; PostgreSQL validates JSON syntax while SQL must enforce types, ownership and permissions.
  • Optional patched libpq enables zero-copy forwarding of request bodies from Nginx buffers; the default image uses stock libpq.
  • /v1/events sends ephemeral invalidation signals; clients refetch snapshots over REST, so it is not durable CDC or a message queue.
  • Benchmarks: 1.7–3.9× PostgREST 14.17 throughput and about 60% lower API memory, on one API core and four PostgreSQL cores, with stated limits.
  • Status is experimental: six Linux ARM64 cells pass, FreeBSD and amd64 validation is incomplete, and there are no release binaries; licensed BSD 3-Clause.

Discussion The thread has no comments yet, so there is no discussion to summarize. The submission received 7 points and was posted as a Show HN request for feedback.

#postgresql #nginx #rust #backend #showHN #benchmarks