You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate partition DDL statements (use --dry-run to preview)
partition info [table]
Show partition information
Examples:
# Analyze orders table for partitioning
pg partition advice orders
# Generate RANGE partition DDL for orders table
pg partition ddl orders --type=range --column=created_at --interval=monthly
# Show all partitioned tables
pg partition info
# Show details for specific table
pg partition info orders
WAL & Checkpoint
Command
Description
wal
WAL position info
wal_rate [sec]
WAL generation rate
checkpoint
Checkpoint statistics
Storage
Command
Description
db_size
Database sizes
ts_size
Tablespace sizes
schema_size
Schema sizes
toast_tables
TOAST table sizes
Configuration
Command
Description
config [pattern]
Show settings (optional filter)
config_diff
Non-default settings
reload
Reload configuration
Schema Info
Command
Description
tables [pattern]
List tables
indexes [pattern]
List indexes
views [pattern]
List views
functions [pattern]
List functions
triggers [pattern]
List triggers
fks
Foreign keys
pks
Primary keys
constraints
All constraints
Security
Command
Description
users
List users
roles
List roles
permissions
Object permissions
privilege_audit
Privilege audit
security_checks
Security configuration checks
user_access_pattern
User access patterns
Health Check
Command
Description
health
Quick health check
overview
System overview
uptime
Server uptime
Advanced Diagnostics
Command
Description
diagnose <scenario>
Combined diagnosis for common DBA scenarios
lock_tree
Lock wait tree
lock_chain
Lock wait chains
activity
Active sessions
bgwriter
Background writer stats
Query Optimization
Command
Description
explain "<sql>"
Explain query plan
explain_json "<sql>"
Explain as JSON
plan_analysis [N]
Query plan analysis
execution_profile [N]
Execution profile
histogram_stats <tbl>
Histogram statistics
parallel_efficiency
Parallel efficiency metrics
Utility
Command
Description
version
PostgreSQL version
ext
Installed extensions
set_config <name> <val>
Change setting (session)
watch <sec> <cmd>
Repeat command every N seconds
Enterprise
Command
Description
enterprise_monitor
Enterprise monitoring dashboard
sla_tracker
SLA tracking
alert_engine
Alert engine
security_scan
Security scan
compliance_check
Compliance checking
Diagnose Scenarios
The diagnose command provides combined analysis for common DBA scenarios: