PostgreSQL

New table creation with foreign key and composite indexes

info
storageUpdated Mar 16, 2026(via Exa)
How to detect:

Migration 0013_spike_events creates posthog_errortrackingspikeevent table with foreign key to posthog_team and two composite indexes on (team_id, detected_at DESC) and (issue_id, detected_at DESC). Safe in PG11+ but requires monitoring.

Recommended action:

Monitor migration execution time during deployment; verify index creation completes successfully; check for lock contention on posthog_team table during foreign key constraint creation; ensure adequate database connection pool size.