Deduplicate logicalrep_read_tuple()

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Deduplicate logicalrep_read_tuple()
Date: 2023-01-18 07:26:06
Message-ID: CALj2ACXdbq7kW_+bRrSGMsR6nefCvwbHBJ5J51mr3gFf7QysTA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

logicalrep_read_tuple() duplicates code for LOGICALREP_COLUMN_TEXT and
LOGICALREP_COLUMN_BINARY introduced by commit 9de77b5. While it
doesn't hurt anyone, deduplication makes code a bit leaner by 57 bytes
[1]. I've attached a patch for $SUBJECT.

Thoughts?

[1] size ./src/backend/replication/logical/proto.o
PATCHED:
text data bss dec hex filename
15558 0 0 15558 3cc6
./src/backend/replication/logical/proto.o

HEAD:
text data bss dec hex filename
15615 0 0 15615 3cff
./src/backend/replication/logical/proto.o

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v1-0001-Deduplicate-logicalrep_read_tuple.patch application/x-patch 1.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nitin Jadhav 2023-01-18 07:51:05 Improve GetConfigOptionValues function
Previous Message Bharath Rupireddy 2023-01-18 07:16:49 Re: Allow logical replication to copy tables in binary format