-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Milestone
Description
Description:
Having native PostgreSQL query logging inside ProxySQL would be very useful for debugging, auditing, and performance analysis.
Feature Request:
Introduce query logging for PostgreSQL with configurable options, for example:
pgsql-eventslog_default_log — enable/disable query logging
pgsql-eventslog_filename — path to the log file
pgsql-eventslog_format — define the log format (1 = Binary Format, 2 - JSON Format)
pgsql-eventslog_filesize — manage log size limits
What should be logged:
client— client IP:portusername— authenticated DB userschemaname— database / schema in useserver— backend server IP:port that handled the workhostgroup_id— routing hostgroup idthread_id— ProxySQL session identifierevent— protocol-level event type (e.g. QUERY, PARSE, BIND, EXECUTE, CLOSE, ERROR)query— full SQL text as seen by the proxydigest— normalized fingerprint of the querystarttime— human-readable timestamp when the event startedstarttime_timestamp_us— start time as epoch microseconds for precise orderingendtime— human-readable timestamp when the event finishedendtime_timestamp_us— end time as epoch microsecondsduration_us— measured execution time in microseconds (end - start)rows_sent— number of rows returned to the client for this event (nullable/0 when none)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels