Hi,
In <ZeFoOprWyKU6gpkP@paquier.xyz>
"Re: Make COPY format extendable: Extract COPY TO format implementations" on Fri, 1 Mar 2024 14:31:38 +0900,
Michael Paquier <michael@paquier.xyz> wrote:
> I guess so. It does not make much of a difference, though. The thing
> is that the dispatch caused by the custom callbacks called for each
> row is noticeable in any profiles I'm taking (not that much in the
> worst-case scenarios, still a few percents), meaning that this impacts
> the performance for all the in-core formats (text, csv, binary) as
> long as we refactor text/csv/binary to use the routines of copyapi.h.
> I don't really see a way forward, except if we don't dispatch the
> in-core formats to not impact the default cases. That makes the code
> a bit less elegant, but equally efficient for the existing formats.
It's an option based on your profile result but your
execution result also shows that v15 is faster than HEAD [1]:
> I am getting faster runtimes with v15 (6232ms in average)
> vs HEAD (6550ms) at 5M rows with COPY TO
[1] https://www.postgresql.org/message-id/flat/ZdbtQJ-p5H1_EDwE%40paquier.xyz#6439e6ad574f2d47cd7220e9bfed3889
I think that faster runtime is beneficial than mysterious
profile for users. So I think that we can merge v15 to
master.
Thanks,
--
kou