mirror of
https://github.com/juspay/services-flake.git
synced 2024-09-19 08:17:11 +03:00
18d5c1d168
resolves #139 > empty `unix_socket_directories` means not listening on any Unix-domain sockets, in which case only TCP/IP sockets can be used to connect to the server. see: https://www.postgresql.org/docs/current/runtime-config-connection.html#GUC-UNIX-SOCKET-DIRECTORIES * use TCP/IP by default for health check
1.1 KiB
1.1 KiB
PostgreSQL
PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
Getting Started
# In `perSystem.process-compose.<name>`
{
services.postgres."pg1".enable = true;
}
Examples
- Run postgres server initialised with a sample database and graphically interact with it using pgweb: https://github.com/juspay/services-flake/tree/main/example/simple
Gotchas
{#socket-path}
Unix-domain socket path is too long
Warning
Only relevant if
socketDir
is set. If not, postgres uses TCP/IP by default.
We already talk about this in the data directory guide. In case of postgres, you can set socketDir
while keeping the dataDir
unchanged.
Note
The
socketDir
must be set to a shorter path (less than 100 chars) as a workaround.
{
services.postgres."pg1" = {
enable = true;
socketDir = "/tmp/pg1";
};
}