diff options
| author | Heikki Linnakangas | 2011-03-01 18:46:57 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2011-03-01 18:54:35 +0000 |
| commit | 6eba5a7c57d1d61f46b6966026bf7bc07f8e087c (patch) | |
| tree | ad88d9f8c60462809b00738f30dbf43849095b23 /src/include | |
| parent | 47ad79122bc099c1f0ea8a7ae413fcd8d45e26a6 (diff) | |
Change pg_last_xlog_receive_location() not to move backwards. That makes
it a lot more useful for determining which standby is most up-to-date,
for example. There was long discussions on whether overwriting existing
existing WAL makes sense to begin with, and whether we should do some more
extensive variable renaming, but this change nevertheless seems quite
uncontroversial.
Fujii Masao, reviewed by Jeff Janes, Robert Haas, Stephen Frost.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/replication/walreceiver.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/include/replication/walreceiver.h b/src/include/replication/walreceiver.h index 9137b861c7d..775232b6e6f 100644 --- a/src/include/replication/walreceiver.h +++ b/src/include/replication/walreceiver.h @@ -52,11 +52,17 @@ typedef struct pg_time_t startTime; /* + * receiveStart is the first byte position that will be received. + * When startup process starts the walreceiver, it sets receiveStart + * to the point where it wants the streaming to begin. + */ + XLogRecPtr receiveStart; + + /* * receivedUpto-1 is the last byte position that has already been - * received. When startup process starts the walreceiver, it sets - * receivedUpto to the point where it wants the streaming to begin. After - * that, walreceiver updates this whenever it flushes the received WAL to - * disk. + * received. At the first startup of walreceiver, receivedUpto is + * set to receiveStart. After that, walreceiver updates this whenever + * it flushes the received WAL to disk. */ XLogRecPtr receivedUpto; |
