pg_logtap
Structured PostgreSQL log capture and delivery to Vector, HTTP, TCP, or files.
pg_logtap · Structured PostgreSQL log capture and delivery to Vector, HTTP, TCP, or files.
Overview
PostgreSQL · 15, 16, 17, 18
Usage
Sources:
pg_logtap captures PostgreSQL log events in a shared-memory ring and can deliver them to a configured collector. Upstream verified PostgreSQL 15 through 18.
Enable and inspect
Append pg_logtap to the existing shared_preload_libraries list and restart PostgreSQL. Create its SQL objects as a superuser, then inspect delivery counters and recent events.
pg_monitor can read delivery counters. Only the owner can execute pg_logtap_dump by default. Captured errors, queries and context can contain other sessions’ data. log_min_messages controls which messages reach the log.