summaryrefslogtreecommitdiff
path: root/src/backend/replication/logical
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/replication/logical')
-rw-r--r--src/backend/replication/logical/reorderbuffer.c6
-rw-r--r--src/backend/replication/logical/worker.c5
2 files changed, 4 insertions, 7 deletions
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index a54434151de..b57aef9916d 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -5134,7 +5134,7 @@ ReorderBufferToastReplace(ReorderBuffer *rb, ReorderBufferTXN *txn,
for (natt = 0; natt < desc->natts; natt++)
{
- Form_pg_attribute attr = TupleDescAttr(desc, natt);
+ CompactAttribute *attr = TupleDescCompactAttr(desc, natt);
ReorderBufferToastEnt *ent;
struct varlena *varlena;
@@ -5146,10 +5146,6 @@ ReorderBufferToastReplace(ReorderBuffer *rb, ReorderBufferTXN *txn,
dlist_iter it;
Size data_done = 0;
- /* system columns aren't toasted */
- if (attr->attnum < 0)
- continue;
-
if (attr->attisdropped)
continue;
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 3c58ad88476..ec65a385f2d 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -975,9 +975,10 @@ slot_fill_defaults(LogicalRepRelMapEntry *rel, EState *estate,
Assert(rel->attrmap->maplen == num_phys_attrs);
for (attnum = 0; attnum < num_phys_attrs; attnum++)
{
+ CompactAttribute *cattr = TupleDescCompactAttr(desc, attnum);
Expr *defexpr;
- if (TupleDescAttr(desc, attnum)->attisdropped || TupleDescAttr(desc, attnum)->attgenerated)
+ if (cattr->attisdropped || cattr->attgenerated)
continue;
if (rel->attrmap->attnums[attnum] >= 0)
@@ -2833,7 +2834,7 @@ apply_handle_update(StringInfo s)
target_perminfo = list_nth(estate->es_rteperminfos, 0);
for (int i = 0; i < remoteslot->tts_tupleDescriptor->natts; i++)
{
- Form_pg_attribute att = TupleDescAttr(remoteslot->tts_tupleDescriptor, i);
+ CompactAttribute *att = TupleDescCompactAttr(remoteslot->tts_tupleDescriptor, i);
int remoteattnum = rel->attrmap->attnums[i];
if (!att->attisdropped && remoteattnum >= 0)