|
7 | 7 | * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California
|
9 | 9 | *
|
10 |
| - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.335 2009/04/07 00:31:26 tgl Exp $ |
| 10 | + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.336 2009/04/22 19:51:12 heikki Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -4850,10 +4850,22 @@ exitArchiveRecovery(TimeLineID endTLI, uint32 endLogId, uint32 endLogSeg)
|
4850 | 4850 | * If we are establishing a new timeline, we have to copy data from
|
4851 | 4851 | * the last WAL segment of the old timeline to create a starting WAL
|
4852 | 4852 | * segment for the new timeline.
|
| 4853 | + * |
| 4854 | + * Notify the archiver that the last WAL segment of the old timeline |
| 4855 | + * is ready to copy to archival storage. Otherwise, it is not archived |
| 4856 | + * for a while. |
4853 | 4857 | */
|
4854 | 4858 | if (endTLI!=ThisTimeLineID)
|
| 4859 | +{ |
4855 | 4860 | XLogFileCopy(endLogId,endLogSeg,
|
4856 | 4861 | endTLI,endLogId,endLogSeg);
|
| 4862 | + |
| 4863 | +if (XLogArchivingActive()) |
| 4864 | +{ |
| 4865 | +XLogFileName(xlogpath,endTLI,endLogId,endLogSeg); |
| 4866 | +XLogArchiveNotify(xlogpath); |
| 4867 | +} |
| 4868 | +} |
4857 | 4869 | }
|
4858 | 4870 |
|
4859 | 4871 | /*
|
|