Database Reference
In-Depth Information
needs access to a WAL archive; it can be done via streaming, and slaves no longer
need to be recloned. As of version 9.4, a restart is still required though. This may
change in future releases.
Unlogged tables don't participate in replication.
Evolution of PostgreSQL Replication
PostgreSQL's stock replication relies on WAL shipping. In versions prior to 9.3, stream‐
ing replication slaves must be running the same architecture to ensure faithful execution
of the received log stream. Streaming replication in version 9.3 and later is now
architecture-independent but still requires all servers to run the same version of Post‐
greSQL.
Support for built-in replication improved over the following PostgreSQL releases:
1. Prior to version 9.0, PostgreSQL offered only asynchronous warm slaves. A warm
slave retrieved the WAL and kept itself in sync but was not be available for queries.
It acted only as a standby.
2. Version 9.0 introduced asynchronous hot slaves as well as streaming replication,
whereby users can execute read-only queries against the slave and replication can
happen without direct file access between the servers (using database connections
for shipping logs instead).
3. With version 9.1, synchronous replication became possible.
4. Version 9.2 introduced cascading streaming replication . The main benefit is reduc‐
tions in latency. It's much faster for a slave to receive updates from a nearby slave
than from a master far, far away.
Third-Party Replication Options
As alternatives to PostgreSQL's built-in replication, common third-party options
abound. Slony and Bucardo are two of the most popular open source ones. Although
PostgreSQL is improving replication with each new release, Slony, Bucardo, and other
third-party replication options still offer more flexibility. Slony and Bucardo allow you
to replicate individual databases or even tables instead of the entire server. They also
don't require that all masters and slaves be of the same PostgreSQL version and OS. Both
also support multimaster scenarios. However, both rely on additional triggers to initiate
the replication and often don't support DDL commands for actions such as creating
Search WWH ::




Custom Search