Re: Make printtup a bit faster
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Andy Fan <zhihuifan1213@163.com>, David Rowley <dgrowleyml@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-05-04T13:09:44Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > FWIW, I've experimented fixing this overhead before, and what I did was to > pass an optional context via the fcinfo, and output / send functions could use > memory allocated via that optional context object, rather than doing it > allocating in CurrentMemoryContext. For the send functions that looks > reasonably clean, given that it already deals with a stringinfo. For out > functions it's a bit uglier, but still somewhat acceptable. Hmm, yeah, that could be a route to building a new optional API without causing compatibility problems everywhere. regards, tom lane