[PATCH] pg_convert improvement
Yurii Rashkovskii <yrashk@gmail.com>
From: Yurii Rashkovskii <yrashk@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2023-11-24T14:05:29Z
Lists: pgsql-hackers
Attachments
- v1-0001-Don-t-copy-bytea-text-in-convert_from-to-unless-conv.patch (application/octet-stream) patch v1-0001
Hi, I propose a patch that ensures `pg_convert` doesn't allocate and copy data when no conversion is done. It is an unnecessary overhead, especially when such conversions are done frequently and for large values. I've tried measuring the performance impact, and the patched version has a small but non-zero gain. The patch builds against `master` and `make check` succeeds. Happy to hear any feedback! -- Y.
Commits
-
Teach convert() and friends to avoid copying when possible.
- b14b1eb4da4c 17.0 landed