Database Reference
In-Depth Information
ps -ef | grep startup on standby
postgres: startup process waiting for 000000010000000000000041
Prior to PostgreSQL 9.0, it was difficult to measure the replication delay precisely and some
hackish methods needed to be used. Those aren't presented here.
Monitoring replication is covered in more detail in the recipe on Managing log shipping
replication later in this chapter.
Some of the tuning advice on compressing WAL files from the Backup chapter may apply here,
though in general WAL may not be around long enough to build up a large enough volume to
worry you. In that case, the compression might just slow you down instead.
See also
If you have configuration instructions written for PostgreSQL 8.2 to 8.4, then they will work
almost exactly the same in PostgreSQL 9.0 onwards. The only difference is that you will also
need to specify wal_level . Note that the procedures covered here are not the default
configuration, and do differ from earlier releases. In PostgreSQL 9.0, the utility pg_Standby
is no longer required, as many of its features are now performed directly by the server. If you
prefer to continue using pg_Standby with PostgreSQL 9.0, then you do not need to use the
archive_cleanup_command , Standby_mode , or trigger_file parameters at all.
You may also be interested in an improved version of pg_standby that is available as part
of the 2warm project.
Visit the following URL to know more about the 2warm toolset:
http://projects.2ndQuadrant.com/2warm
Setting up streaming log replication
Log shipping is a replication technique used by many database management systems. The
Master records changes in its transaction log (WAL), and then the log data is shipped from the
Master to the Standby, where the log is replayed.
Streaming log replication is new in PostgreSQL 9.0 and by time of release will have been
through nearly three years of design, development, and beta-testing. The key feature in
PostgreSQL 9.0 is that the data is transferred directly from Master to Standby, giving us
integrated security and reduced replication delay.
There are two main ways to set up streaming replication: with or without an additional
archive. Set up without an external archive is presented here, as it is both the most simple
and efficient way. There is one downside that suggests the simple approach may not be
appropriate for larger databases, explained later in the recipe.
 
Search WWH ::




Custom Search