aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-10-03 09:08:13 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-10-03 09:15:38 +0300
commitbc1229c83238a0d71a3923cb48e53ea7ea37654c (patch)
treea6312ba5cdf19b5727bb025d276ad636e81c1619 /src
parent6bd176095b59c1d7acfed3adf7648d04d7b2916f (diff)
downloadpostgresql-bc1229c83238a0d71a3923cb48e53ea7ea37654c.tar.gz
postgresql-bc1229c83238a0d71a3923cb48e53ea7ea37654c.zip
Fix two bugs introduced in the xlog.c split.
The comment explaining the naming of timeline history files was wrong, and the history file was not being arhived. Pointed out by Fujii Masao.
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/timeline.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/access/transam/timeline.c b/src/backend/access/transam/timeline.c
index 810467d474d..f3632c572a7 100644
--- a/src/backend/access/transam/timeline.c
+++ b/src/backend/access/transam/timeline.c
@@ -6,10 +6,9 @@
* A timeline history file lists the timeline changes of the timeline, in
* a simple text format. They are archived along with the WAL segments.
*
- * The files are named like "<WAL segment>.history". For example, if the
- * database starts up and switches to timeline 5, while processing WAL
- * segment 000000030000002A00000006 (the old timeline was 3), the timeline
- * history file would be called "000000050000002A00000006.history".
+ * The files are named like "<tli>.history". For example, if the database
+ * starts up and switches to timeline 5, the timeline history file would be
+ * called "00000005.history".
*
* Each line in the file represents a timeline switch:
*
@@ -376,4 +375,8 @@ writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
errmsg("could not rename file \"%s\" to \"%s\": %m",
tmppath, path)));
#endif
+
+ /* The history file can be archived immediately. */
+ TLHistoryFileName(histfname, newTLI);
+ XLogArchiveNotify(histfname);
}