Allow UNIX socket connection to PostgreSQL database #3

Open
opened 2026-04-05 16:16:07 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @TobiX on 3/31/2026

I'd like to avoid exposing PostgreSQL via TCP when application and database run on the same system - This can be done by connecting over a UNIX domain socket connection. (This also allows PostgreSQL to use "peer" authentication, avoiding the PostgreSQL password altogether)

Drizzle URLs cannot encode PostgreSQL UNIX socket connections (https://github.com/drizzle-team/drizzle-orm/issues/4867), although the underlying library supports them. It would be nice to support UNIX connections in some way (maybe via a DATABASE_SOCKET environment variable as an alternative to DATABASE_URL).

*Originally created by @TobiX on 3/31/2026* I'd like to avoid exposing PostgreSQL via TCP when application and database run on the same system - This can be done by connecting over a UNIX domain socket connection. (This also allows PostgreSQL to use "peer" authentication, avoiding the PostgreSQL password altogether) Drizzle URLs cannot encode PostgreSQL UNIX socket connections (https://github.com/drizzle-team/drizzle-orm/issues/4867), although the underlying library supports them. It would be nice to support UNIX connections in some way (maybe via a `DATABASE_SOCKET` environment variable as an alternative to `DATABASE_URL`).
MrUnknownDE added the enhancement label 2026-04-05 16:16:07 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OpenArchiver#3