aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorItagaki Takahiro <itagaki.takahiro@gmail.com>2010-02-19 01:04:39 +0000
committerItagaki Takahiro <itagaki.takahiro@gmail.com>2010-02-19 01:04:39 +0000
commit472e29bf879ad4ed60cfb103b87130cd523d639b (patch)
treeb4ad394430edde83e9fd3b42156fbfc72f15d5db
parentd1b9b0c5632595dec59093fa6231705c0efeda99 (diff)
downloadpostgresql-472e29bf879ad4ed60cfb103b87130cd523d639b.tar.gz
postgresql-472e29bf879ad4ed60cfb103b87130cd523d639b.zip
Fix STOP WAL LOCATION in backup history files no to return the next
segment of XLOG_BACKUP_END record even if the the record is placed at a segment boundary. Furthermore the previous implementation could return nonexistent segment file name when the boundary is in segments that has "FE" suffix; We never use segments with "FF" suffix. Backpatch to 8.0, where hot backup was introduced. Reported by Fujii Masao.
-rw-r--r--src/backend/access/transam/xlog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 5d18e1a3efa..d7aea24382d 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.345.2.6 2009/12/30 08:37:23 heikki Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.345.2.7 2010/02/19 01:04:39 itagaki Exp $
*
*-------------------------------------------------------------------------
*/
@@ -7488,7 +7488,7 @@ pg_stop_backup(PG_FUNCTION_ARGS)
*/
stoppoint = RequestXLogSwitch();
- XLByteToSeg(stoppoint, _logId, _logSeg);
+ XLByteToPrevSeg(stoppoint, _logId, _logSeg);
XLogFileName(stopxlogfilename, ThisTimeLineID, _logId, _logSeg);
/* Use the log timezone here, not the session timezone */