diff options
author | Itagaki Takahiro <itagaki.takahiro@gmail.com> | 2010-02-19 01:08:27 +0000 |
---|---|---|
committer | Itagaki Takahiro <itagaki.takahiro@gmail.com> | 2010-02-19 01:08:27 +0000 |
commit | 26662b73ae5eca884c23c386b79e1f507c4c8d9d (patch) | |
tree | 3ad971b099928543539d58c1f53965d29036ff34 /src/backend/access/transam/xlog.c | |
parent | 8005df3c200c5a83f4c8cc18c7746915c5743913 (diff) |
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.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 6ba56a58ca3..45e9b74bd17 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.222.2.7 2008/05/13 20:53:58 mha Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.222.2.8 2010/02/19 01:08:27 itagaki Exp $ * *------------------------------------------------------------------------- */ @@ -5757,7 +5757,7 @@ pg_stop_backup(PG_FUNCTION_ARGS) INSERT_RECPTR(stoppoint, Insert, Insert->curridx); LWLockRelease(WALInsertLock); - XLByteToSeg(stoppoint, _logId, _logSeg); + XLByteToPrevSeg(stoppoint, _logId, _logSeg); XLogFileName(stopxlogfilename, ThisTimeLineID, _logId, _logSeg); /* |