Without executor hooks, pgtrace cannot attribute waits to specific SQL statements. Wait samples are session-level, not statement-level.
pgtrace never stores parameter values for privacy and security reasons.
Query text is not stored by default. Only query fingerprints (qhash) are stored. Query text samples can be enabled but are redacted.
pgtrace samples at intervals (default 500ms for waits, 1000ms for locks). It does not capture every query execution in real-time.
pgtrace does not capture actual execution plans or runtime statistics without EXPLAIN ANALYZE, which requires query execution.
pgtrace focuses on database-level signals. For application-level context (request IDs, user IDs, etc.), correlate with application logs.
- Transactions that complete between sampling intervals
- Very short-lived connections
- Query cancellations (may appear as waits)
- Replication lag during network partitions (may show stale data)
- Request-level tracing
- User actions
- Application errors
- External service calls
- Business logic context