Skip to content

Commit f241a1a

Browse files
[postgres] classify replication slot in other database (#3543)
Co-authored-by: Copilot <[email protected]>
1 parent 8c1234d commit f241a1a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

flow/alerting/classifier.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,12 @@ func GetErrorClass(ctx context.Context, err error) (ErrorClass, ErrorInfo) {
497497
return ErrorRetryRecoverable, pgErrorInfo
498498
}
499499

500+
// this can't happen for slots we created
501+
// from our perspective, the slot is missing
502+
if strings.Contains(pgErr.Message, "was not created in this database") {
503+
return ErrorNotifyReplicationSlotMissing, pgErrorInfo
504+
}
505+
500506
case pgerrcode.InvalidParameterValue:
501507
if strings.Contains(pgErr.Message, "invalid snapshot identifier") {
502508
return ErrorNotifyInvalidSnapshotIdentifier, pgErrorInfo

0 commit comments

Comments
 (0)