aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/cluster.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2010-01-15 09:19:10 +0000
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2010-01-15 09:19:10 +0000
commit40f908bdcdc726fc11912cd95dfd2f89603d1f37 (patch)
treefcbbda839e58184fc284d261cc5a0f5e8ac921f3 /src/backend/commands/cluster.c
parent4cbe473938779ec414d90c2063c4398e68a70838 (diff)
downloadpostgresql-40f908bdcdc726fc11912cd95dfd2f89603d1f37.tar.gz
postgresql-40f908bdcdc726fc11912cd95dfd2f89603d1f37.zip
Introduce Streaming Replication.
This includes two new kinds of postmaster processes, walsenders and walreceiver. Walreceiver is responsible for connecting to the primary server and streaming WAL to disk, while walsender runs in the primary server and streams WAL from disk to the client. Documentation still needs work, but the basics are there. We will probably pull the replication section to a new chapter later on, as well as the sections describing file-based replication. But let's do that as a separate patch, so that it's easier to see what has been added/changed. This patch also adds a new section to the chapter about FE/BE protocol, documenting the protocol used by walsender/walreceivxer. Bump catalog version because of two new functions, pg_last_xlog_receive_location() and pg_last_xlog_replay_location(), for monitoring the progress of replication. Fujii Masao, with additional hacking by me
Diffstat (limited to 'src/backend/commands/cluster.c')
-rw-r--r--src/backend/commands/cluster.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 0f0ebd3ebc0..913ba1681c5 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.192 2010/01/06 11:25:39 itagaki Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.193 2010/01/15 09:19:01 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@@ -816,10 +816,10 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex,
isnull = (bool *) palloc(natts * sizeof(bool));
/*
- * We need to log the copied data in WAL iff WAL archiving is enabled AND
- * it's not a temp rel.
+ * We need to log the copied data in WAL iff WAL archiving/streaming
+ * is enabled AND it's not a temp rel.
*/
- use_wal = XLogArchivingActive() && !NewHeap->rd_istemp;
+ use_wal = XLogIsNeeded() && !NewHeap->rd_istemp;
/* use_wal off requires rd_targblock be initially invalid */
Assert(NewHeap->rd_targblock == InvalidBlockNumber);