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

Commit2e0cc1f

Browse files
committed
Fix inappropriate error messages for Hot Standby misconfiguration errors.
Give the correct name of the GUC parameter being complained of.Also, emit a more suitable SQLSTATE (INVALID_PARAMETER_VALUE,not the default INTERNAL_ERROR).Gurjeet Singh, errcode adjustment by me
1 parent185b744 commit2e0cc1f

File tree

1 file changed

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

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5989,9 +5989,10 @@ GetXLogReceiptTime(TimestampTz *rtime, bool *fromStream)
59895989
*/
59905990
#defineRecoveryRequiresIntParameter(param_name,currValue,minValue) \
59915991
do { \
5992-
if (currValue < minValue) \
5992+
if ((currValue) <(minValue)) \
59935993
ereport(ERROR, \
5994-
(errmsg("hot standby is not possible because " \
5994+
(errcode(ERRCODE_INVALID_PARAMETER_VALUE), \
5995+
errmsg("hot standby is not possible because " \
59955996
"%s = %d is a lower setting than on the master server " \
59965997
"(its value was %d)", \
59975998
param_name, \
@@ -6032,10 +6033,10 @@ CheckRequiredParameterValues(void)
60326033
RecoveryRequiresIntParameter("max_connections",
60336034
MaxConnections,
60346035
ControlFile->MaxConnections);
6035-
RecoveryRequiresIntParameter("max_prepared_xacts",
6036+
RecoveryRequiresIntParameter("max_prepared_transactions",
60366037
max_prepared_xacts,
60376038
ControlFile->max_prepared_xacts);
6038-
RecoveryRequiresIntParameter("max_locks_per_xact",
6039+
RecoveryRequiresIntParameter("max_locks_per_transaction",
60396040
max_locks_per_xact,
60406041
ControlFile->max_locks_per_xact);
60416042
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp