Skip to content

PostgreSQL in SQLEye

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.

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
postgresql://postgres@127.0.0.1:<port>/postgres
Terminal window
psql -h 127.0.0.1 -p <port> -U postgres postgres

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.

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.

SQLEye is developed and maintained by CodeROG. This page is also available as Markdown.