Binary read replicas in PostgreSQL, Part 1
A read replica is a PostgreSQL server in permanent recovery that accepts queries—and nearly every surprise it causes follows from that fact.
recovery_init_sync_method
After a crash, PostgreSQL syncs every file in your data directory before replaying any WAL—and on large clusters, this can consume minutes.
recovery_end_command
A hook that fires exactly once at promotion or restore completion—but the server is neither ready nor recovering while your command runs.
random_page_cost and seq_page_cost
The planner charges `random_page_cost` per index page based on how uncorrelated the index is—but the name lies.
quote_all_identifiers
Dumping across major versions? A reserved keyword can silently break constraints and policies.
primary_slot_name
Configure a replication slot name on your standby and the upstream keeps WAL forever—until the slot itself fills your disk or the standby dies holding an old…
primary_conninfo
`primary_conninfo` tells a standby where to stream WAL from—but only after the archive and pg_wal run dry.
post_auth_delay and pre_auth_delay
Debugging PostgreSQL connections requires stopping a backend before it does anything interesting.
port
The `port` parameter does double duty: it names the TCP socket and the Unix socket file too.