Re: Optimizing ResouceOwner to speed up COPY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tomas Vondra <tomas(at)vondra(dot)me>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Optimizing ResouceOwner to speed up COPY
Date: 2025-10-16 19:28:01
Message-ID: 1542634.1760642881@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tomas Vondra <tomas(at)vondra(dot)me> writes:
> On 10/16/25 20:12, Tom Lane wrote:
>> Can you find evidence of this change being helpful for anything
>> except this specific scenario in COPY?

> I went through the ResourceOwnerRemember() calls, looking for other
> cases that might create a lot of duplicates, similar to the tuple
> descriptors, but I haven't found anything obvious. Other resources seem
> to be either naturally unique or limited to very few duplicates.

I was thinking of adding some temporary instrumentation, like
just elog'ing whenever the count goes above 1, and seeing where
you get hits during the regression tests. I'm prepared to believe
this is worth doing, but it'd be nice to have more examples
in mind.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-10-16 19:57:44 Re: using index to speedup add not null constraints to a table
Previous Message Tomas Vondra 2025-10-16 19:22:29 Re: Optimizing ResouceOwner to speed up COPY