Ad-hoc monitoring
In some cases, we need to observe some values in Postgres or the environment it's running on (OS, FS, etc.), and:
In some cases, we need to observe some values in Postgres or the environment it's running on (OS, FS, etc.), and:
When connected to a primary (or standby leader in case of cascaded replication), one can use pg_stat_replication:
Troubleshoot slow PostgreSQL startup and crash recovery: inspect WAL REDO progress, check max_wal_size and checkpoint_timeout, and avoid unsafe restarts.
In day 60, we discussed how to add a column and that under load you need low lock_timeout and retries (also see: Zero-downtime Postgres schema migrations need…