Skip to content

Commit

Permalink
PG-978: Removed unneccessary memcpy from tuple slot
Browse files Browse the repository at this point in the history
  • Loading branch information
dutow committed Sep 2, 2024
1 parent 12fd224 commit 8a8c8e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/access/pg_tde_slot.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ slot_copytuple(void* buffer, HeapTuple tuple)
newTuple->t_self = tuple->t_self;
newTuple->t_tableOid = tuple->t_tableOid;
newTuple->t_data = (HeapTupleHeader) ((char *) newTuple + HEAPTUPLESIZE);
// TODO: no need for this memcpy, don't decrypt in place instead!
memcpy((char *) newTuple->t_data, (char *) tuple->t_data, tuple->t_len);
// We don't copy the data, it will be copied by the decryption code
memcpy((char *) newTuple->t_data, (char *) tuple->t_data, tuple->t_data->t_hoff);
return newTuple;
}

Expand Down

0 comments on commit 8a8c8e6

Please sign in to comment.