Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(postgres): init; specify unix-domain socket length limitation #147

Merged
merged 4 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions doc/postgresql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# PostgreSQL

[PostgreSQL](https://www.postgresql.org/) 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

```nix
# 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/sosedoff/pgweb): <https://github.com/juspay/services-flake/tree/main/example/simple>

## Gotchas

{#socket-path}
### Unix-domain socket path is too long
shivaraj-bh marked this conversation as resolved.
Show resolved Hide resolved

We already talk about this in the [data directory guide](guide/datadir.md#socket-path). 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.

```nix
{
services.postgres."pg1" = {
enable = true;
socketDir = "/tmp/pg1";
};
}
```
2 changes: 1 addition & 1 deletion doc/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ short-title: Services
- Elasticsearch
- MySQL
- Nginx
- PostgreSQL
- [[postgresql]]#
- Redis
- Redis Cluster
- Zookeeper
Expand Down
Loading