summaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/worker.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/replication/logical/worker.c')
-rw-r--r--src/backend/replication/logical/worker.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index a46f8e0644b..fc64476a9ef 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -875,7 +875,7 @@ create_edata_for_relation(LogicalRepRelMapEntry *rel)
List *perminfos = NIL;
ResultRelInfo *resultRelInfo;
- edata = (ApplyExecutionData *) palloc0(sizeof(ApplyExecutionData));
+ edata = palloc0_object(ApplyExecutionData);
edata->targetRel = rel;
edata->estate = estate = CreateExecutorState();
@@ -1702,7 +1702,7 @@ stream_start_internal(TransactionId xid, bool first_segment)
oldctx = MemoryContextSwitchTo(ApplyContext);
- MyLogicalRepWorker->stream_fileset = palloc(sizeof(FileSet));
+ MyLogicalRepWorker->stream_fileset = palloc_object(FileSet);
FileSetInit(MyLogicalRepWorker->stream_fileset);
MemoryContextSwitchTo(oldctx);
@@ -3951,7 +3951,7 @@ store_flush_position(XLogRecPtr remote_lsn, XLogRecPtr local_lsn)
MemoryContextSwitchTo(ApplyContext);
/* Track commit lsn */
- flushpos = (FlushPosition *) palloc(sizeof(FlushPosition));
+ flushpos = palloc_object(FlushPosition);
flushpos->local_end = local_lsn;
flushpos->remote_end = remote_lsn;