You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cache TupleDesc per composite column in copy_dest_receive
For INSERT..SELECT involving composite-type columns, each row called
lookup_rowtype_tupdesc (via StructOutForPGDuck) triggering the expensive
insert_rel_type_cache_if_needed path on every row.
Add a composite_tupdescs cache array (one slot per physical attribute) to
CopyToStateData. In CopyOneRowTo, validate and reuse the cached TupleDesc
for composite columns, falling back to lookup_rowtype_tupdesc only on the
first row or a type change. The pin is held for the duration of the COPY
and released in EndCopy.
PGDuckSerialize and StructOutForPGDuck gain a cachedTupleDesc parameter;
when non-NULL the tupdesc is used directly, skipping both the lookup and
the matching ReleaseTupleDesc. All other call sites pass NULL.
Signed-off-by: David Christensen <david.christensen@snowflake.com>
0 commit comments