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

Commit491d1ea

Browse files
Previous patch revoked following objections.
1 parent6ca23b1 commit491d1ea

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

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

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.402 2010/04/2319:57:18 sriggs Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.403 2010/04/2320:21:31 sriggs Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -5568,12 +5568,7 @@ CheckRequiredParameterValues(CheckPoint checkPoint)
55685568
RecoveryRequiresIntParameter("max_locks_per_xact",
55695569
max_locks_per_xact,checkPoint.max_locks_per_xact);
55705570

5571-
/*
5572-
* Hot Standby currently only depends upon the presence of WAL
5573-
* records as indicated by XLOG_MODE_HOT_STANDBY. There is no current
5574-
* dependency on whether archiving or streaming are enabled, if either.
5575-
*/
5576-
if (!(checkPoint.XLogModeFlags&XLOG_MODE_HOT_STANDBY))
5571+
if (!checkPoint.XLogStandbyInfoMode)
55775572
ereport(ERROR,
55785573
(errmsg("recovery connections cannot start because the recovery_connections "
55795574
"parameter is disabled on the WAL source server")));
@@ -7007,13 +7002,7 @@ CreateCheckPoint(int flags)
70077002
checkPoint.MaxConnections=MaxConnections;
70087003
checkPoint.max_prepared_xacts=max_prepared_xacts;
70097004
checkPoint.max_locks_per_xact=max_locks_per_xact;
7010-
7011-
if (XLogArchivingActive())
7012-
checkPoint.XLogModeFlags |=XLOG_MODE_ARCHIVING;
7013-
if (max_wal_senders>0)
7014-
checkPoint.XLogModeFlags |=XLOG_MODE_STREAMING;
7015-
if (XLogRequestRecoveryConnections)
7016-
checkPoint.XLogModeFlags |=XLOG_MODE_HOT_STANDBY;
7005+
checkPoint.XLogStandbyInfoMode=XLogStandbyInfoActive();
70177006

70187007
/*
70197008
* We must hold WALInsertLock while examining insert state to determine

‎src/include/catalog/pg_control.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.52 2010/04/2319:57:19 sriggs Exp $
11+
* $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.53 2010/04/2320:21:31 sriggs Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -45,7 +45,7 @@ typedef struct CheckPoint
4545
intMaxConnections;
4646
intmax_prepared_xacts;
4747
intmax_locks_per_xact;
48-
intXLogModeFlags;
48+
boolXLogStandbyInfoMode;
4949

5050
/*
5151
* Oldest XID still running. This is only needed to initialize hot standby
@@ -65,10 +65,6 @@ typedef struct CheckPoint
6565
#defineXLOG_BACKUP_END0x50
6666
#defineXLOG_UNLOGGED0x60
6767

68-
/* XLogModeFlags */
69-
#defineXLOG_MODE_ARCHIVING(1 << 0)
70-
#defineXLOG_MODE_STREAMING(1 << 1)
71-
#defineXLOG_MODE_HOT_STANDBY(1 << 2)
7268

7369
/* System status indicator */
7470
typedefenumDBState

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp