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

Commit308d4ec

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 parent8a66a37 commit308d4ec

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
@@ -5990,9 +5990,10 @@ GetXLogReceiptTime(TimestampTz *rtime, bool *fromStream)
59905990
*/
59915991
#defineRecoveryRequiresIntParameter(param_name,currValue,minValue) \
59925992
do { \
5993-
if (currValue < minValue) \
5993+
if ((currValue) <(minValue)) \
59945994
ereport(ERROR, \
5995-
(errmsg("hot standby is not possible because " \
5995+
(errcode(ERRCODE_INVALID_PARAMETER_VALUE), \
5996+
errmsg("hot standby is not possible because " \
59965997
"%s = %d is a lower setting than on the master server " \
59975998
"(its value was %d)", \
59985999
param_name, \
@@ -6033,10 +6034,10 @@ CheckRequiredParameterValues(void)
60336034
RecoveryRequiresIntParameter("max_connections",
60346035
MaxConnections,
60356036
ControlFile->MaxConnections);
6036-
RecoveryRequiresIntParameter("max_prepared_xacts",
6037+
RecoveryRequiresIntParameter("max_prepared_transactions",
60376038
max_prepared_xacts,
60386039
ControlFile->max_prepared_xacts);
6039-
RecoveryRequiresIntParameter("max_locks_per_xact",
6040+
RecoveryRequiresIntParameter("max_locks_per_transaction",
60406041
max_locks_per_xact,
60416042
ControlFile->max_locks_per_xact);
60426043
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp