# PostgreSQL in SQLEye

> How SQLEye runs PostgreSQL 15, 16 and 17, covering managed config, trust authentication, binding, how capture works, and the connection string.

Source: https://sqleye.com/docs/engines/postgresql/ · Last updated: 2026-11-29 · Publisher: CodeROG (https://coderog.com)

SQLEye runs PostgreSQL 15.20, 16.16 or 17.12 (as of 2026-11-29) on `127.0.0.1` with the `postgres` user and no password.

## How is the server set up?

The cluster is created with `initdb --auth=trust`, encoding UTF8 and no locale. SQLEye writes `instances/<id>/data/sqleye.conf`, which starts with "# Managed by SQLEye - edits are overwritten.":

| Setting | Value |
| --- | --- |
| `listen_addresses` | `'127.0.0.1'` |
| `unix_socket_directories` | `''` (no unix socket) |
| `shared_buffers` | `64MB` |
| `max_connections` | `50` |

> **Caution.**
Trust authentication means anyone who can reach the port can connect. That is acceptable because of the `127.0.0.1` binding. Do not expose the port.

## What is the connection string?

```text
postgresql://postgres@127.0.0.1:<port>/postgres
```

```bash
psql -h 127.0.0.1 -p <port> -U postgres postgres
```

## How does capture work?

The managed `sqleye.conf` always contains `logging_collector=on`, `log_destination='jsonlog'`, `log_directory` (the instance logs folder), `log_filename='postgresql-%a.log'`, `log_rotation_age=1d`, `log_rotation_size=32MB` and `log_truncate_on_rotation=on`. What capture changes is `log_min_duration_statement`: `0` while capture is on (every statement is logged with its duration), `-1` while it is off. SQLEye applies that change with `pg_reload_conf()`, with no restart, and tails the JSON log, producing one event per statement.

Log files are named by weekday and truncated on rotation, so old logs get overwritten. While capture is on, those files contain statement text.

SQLEye's own admin connections use `application_name` "sqleye" and are excluded. JSON logging needs PostgreSQL 15 or later; all catalogue versions qualify.

## What does a PostgreSQL event include?

Duration, connection id (backend pid), database, user, application name, and the error for failed statements. Rows examined and "No index used" are MySQL-only.

See [capture](/docs/live-eye/capture/).
