From: Itagaki Takahiro Date: Fri, 19 Feb 2010 01:07:57 +0000 (+0000) Subject: Fix STOP WAL LOCATION in backup history files no to return the next X-Git-Tag: REL8_2_16~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c0914be737f81c2d0c020bf44fb66d92281c3a6;p=thirdparty%2Fpostgresql.git 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. --- diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 9df864f8800..67081754c66 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.258.2.7 2009/09/13 18:32:34 heikki Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.258.2.8 2010/02/19 01:07:57 itagaki Exp $ * *------------------------------------------------------------------------- */ @@ -6382,7 +6382,7 @@ pg_stop_backup(PG_FUNCTION_ARGS) */ stoppoint = RequestXLogSwitch(); - XLByteToSeg(stoppoint, _logId, _logSeg); + XLByteToPrevSeg(stoppoint, _logId, _logSeg); XLogFileName(stopxlogfilename, ThisTimeLineID, _logId, _logSeg); /*