# Talking to Postgres Through Java 16 Unix-Domain Socket Channels

DevFeed: [Talking to Postgres Through Java 16 Unix-Domain Socket Channels](<https://devfeed.tech/articles/talking-to-postgres-through-java-16-unix-domain-socket-channels-18873.md>)

Original publisher: [Read original article](<https://www.morling.dev/blog/talking-to-postgres-through-java-16-unix-domain-socket-channels/>)

Published: 2021-01-31T19:25:00Z

Content type: tutorial

Language: en

Sources: [Gunnar Morling](<https://devfeed.tech/sources/gunnar-morling.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Unix](<https://devfeed.tech/topics/unix.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [client](<https://devfeed.tech/topics/client.md>), [Fedora](<https://devfeed.tech/topics/fedora.md>)

Tags: [database](<https://devfeed.tech/tags/database.md>), [java](<https://devfeed.tech/tags/java.md>), [processes](<https://devfeed.tech/tags/processes.md>), [unix](<https://devfeed.tech/tags/unix.md>)

## AI overview

This tutorial explores connecting to Postgres from Java 16 through Unix domain sockets. It explains the security and efficiency advantages of local Unix-domain-socket connections and discusses configuring Postgres and the JDBC driver for testing.

## Source excerpt

Table of Contents The Postgres JDBC Driver The Vert.x Postgres Client Other Use Cases Reading a blog post about what's coming up in JDK 16 recently, I learned that one of the new features is support for Unix domain sockets (JEP 380). Before Java 16, you'd have to resort to 3rd party libraries like jnr-unixsocket in order to use them. If you haven't heard about Unix domain sockets before, they are "data communications [endpoints] for exchanging data between processes executing on the same host operating system". Don't be put off by the name btw.; Unix domain sockets are also supported by macOS and even Windows since version 10.