aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/slot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index 033b4ce0971..0f173f63a28 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -2327,6 +2327,7 @@ ReplicationSlotInvalidationCause
GetSlotInvalidationCause(const char *conflict_reason)
{
ReplicationSlotInvalidationCause cause;
+ ReplicationSlotInvalidationCause result = RS_INVAL_NONE;
bool found PG_USED_FOR_ASSERTS_ONLY = false;
Assert(conflict_reason);
@@ -2336,10 +2337,11 @@ GetSlotInvalidationCause(const char *conflict_reason)
if (strcmp(SlotInvalidationCauses[cause], conflict_reason) == 0)
{
found = true;
+ result = cause;
break;
}
}
Assert(found);
- return cause;
+ return result;
}