Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitae293d3

Browse files
committed
Make sure ControlFile logId/logSeg don't go backwards (barely possible given a
slow backend, if we update unconditionally as the code did before).
1 parent4bcb80a commitae293d3

File tree

1 file changed

+4
-3
lines changed
  • src/backend/access/transam

1 file changed

+4
-3
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.60 2001/03/17 20:54:13 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.61 2001/03/18 00:30:27 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1003,8 +1003,9 @@ XLogWrite(XLogwrtRqst WriteRqst)
10031003

10041004
/* update pg_control, unless someone else already did */
10051005
SpinAcquire(ControlFileLockId);
1006-
if (ControlFile->logId!=openLogId||
1007-
ControlFile->logSeg!=openLogSeg+1)
1006+
if (ControlFile->logId<openLogId||
1007+
(ControlFile->logId==openLogId&&
1008+
ControlFile->logSeg<openLogSeg+1))
10081009
{
10091010
ControlFile->logId=openLogId;
10101011
ControlFile->logSeg=openLogSeg+1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp