May 2018
Intermediate to advanced
576 pages
30h 25m
English
Streaming replication connects to a virtual database called replication. We do this because the WAL data contains changes to objects in all databases, so in a way, we aren't just connecting to one database—we are connecting to all of them.
Streaming replication connects similar to a normal user, except that instead of a normal user process, we are given a WALSender process.
You can set a connection limit on the number of replication connections in two ways:
ALTER ROLE replogin CONNECTION LIMIT 2;
Always allow one more connection than you think is required, to allow for disconnections ...