aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/logical.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/replication/logical/logical.c')
-rw-r--r--src/backend/replication/logical/logical.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c
index 875b89a6288..8c318cd4b51 100644
--- a/src/backend/replication/logical/logical.c
+++ b/src/backend/replication/logical/logical.c
@@ -34,6 +34,7 @@
#include "miscadmin.h"
#include "access/xact.h"
+#include "access/xlog_internal.h"
#include "replication/decode.h"
#include "replication/logical.h"
@@ -455,12 +456,12 @@ DecodingContextFindStartpoint(LogicalDecodingContext *ctx)
record = XLogReadRecord(ctx->reader, startptr, &err);
if (err)
elog(ERROR, "%s", err);
-
- Assert(record);
+ if (!record)
+ elog(ERROR, "no record found"); /* shouldn't happen */
startptr = InvalidXLogRecPtr;
- LogicalDecodingProcessRecord(ctx, record);
+ LogicalDecodingProcessRecord(ctx, ctx->reader);
/* only continue till we found a consistent spot */
if (DecodingContextReady(ctx))