Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 1.31 KB

File metadata and controls

42 lines (25 loc) · 1.31 KB

pgtrace limitations

What pgtrace cannot tell you

Per-statement wait attribution

Without executor hooks, pgtrace cannot attribute waits to specific SQL statements. Wait samples are session-level, not statement-level.

Parameter values

pgtrace never stores parameter values for privacy and security reasons.

Query text (by default)

Query text is not stored by default. Only query fingerprints (qhash) are stored. Query text samples can be enabled but are redacted.

Real-time query execution

pgtrace samples at intervals (default 500ms for waits, 1000ms for locks). It does not capture every query execution in real-time.

Plan execution details

pgtrace does not capture actual execution plans or runtime statistics without EXPLAIN ANALYZE, which requires query execution.

Application-level context

pgtrace focuses on database-level signals. For application-level context (request IDs, user IDs, etc.), correlate with application logs.

Known blind spots

  • 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)

When to correlate with app logs

  • Request-level tracing
  • User actions
  • Application errors
  • External service calls
  • Business logic context