mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
Improve error messages introduced in be87200efd9 and 0fdab27ad68
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Discussion: https://postgr.es/m/20230411.120301.93333867350615278.horikyota.ntt@gmail.com Discussion: https://postgr.es/m/20230412174244.6njadz4uoiez3l74@awork3.anarazel.de
This commit is contained in:
parent
9ce04b50e1
commit
5ec69b71f1
@ -177,7 +177,7 @@ xlog_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
|
|||||||
Assert(RecoveryInProgress());
|
Assert(RecoveryInProgress());
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||||
errmsg("logical decoding on a standby requires wal_level to be at least logical on the primary")));
|
errmsg("logical decoding on standby requires wal_level >= logical on the primary")));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ CheckLogicalDecodingRequirements(void)
|
|||||||
if (GetActiveWalLevelOnStandby() < WAL_LEVEL_LOGICAL)
|
if (GetActiveWalLevelOnStandby() < WAL_LEVEL_LOGICAL)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||||
errmsg("logical decoding on a standby requires wal_level to be at least logical on the primary")));
|
errmsg("logical decoding on standby requires wal_level >= logical on the primary")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1274,7 +1274,7 @@ ReportSlotInvalidation(ReplicationSlotInvalidationCause cause,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RS_INVAL_WAL_LEVEL:
|
case RS_INVAL_WAL_LEVEL:
|
||||||
appendStringInfo(&err_detail, _("Logical decoding on standby requires wal_level to be at least logical on the primary server"));
|
appendStringInfo(&err_detail, _("Logical decoding on standby requires wal_level >= logical on the primary server."));
|
||||||
break;
|
break;
|
||||||
case RS_INVAL_NONE:
|
case RS_INVAL_NONE:
|
||||||
pg_unreachable();
|
pg_unreachable();
|
||||||
|
@ -596,8 +596,8 @@ check_for_invalidation('wal_level_', $logstart, 'due to wal_level');
|
|||||||
check_slots_conflicting_status(1);
|
check_slots_conflicting_status(1);
|
||||||
|
|
||||||
$handle = make_slot_active($node_standby, 'wal_level_', 0, \$stdout, \$stderr);
|
$handle = make_slot_active($node_standby, 'wal_level_', 0, \$stdout, \$stderr);
|
||||||
# We are not able to read from the slot as it requires wal_level at least logical on the primary server
|
# We are not able to read from the slot as it requires wal_level >= logical on the primary server
|
||||||
check_pg_recvlogical_stderr($handle, "logical decoding on a standby requires wal_level to be at least logical on the primary");
|
check_pg_recvlogical_stderr($handle, "logical decoding on standby requires wal_level >= logical on the primary");
|
||||||
|
|
||||||
# Restore primary wal_level
|
# Restore primary wal_level
|
||||||
$node_primary->append_conf('postgresql.conf',q[
|
$node_primary->append_conf('postgresql.conf',q[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user