Re: Don't overwrite scan key in systable_beginscan()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Don't overwrite scan key in systable_beginscan()
Date: 2024-08-08 19:28:04
Message-ID: 2440855.1723145284@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, Aug 8, 2024 at 2:46 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>> I propose to fix that by making a copy of the scan keys passed by the
>> caller and make the modifications there.

> This does have the disadvantage of adding more palloc overhead.

It seems hard to believe that one more palloc + memcpy is going to be
noticeable in the context of an index scan.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-08-08 19:28:31 Re: Proposal for Updating CRC32C with AVX-512 Algorithm.
Previous Message Jeff Davis 2024-08-08 19:24:28 [18] Fix a few issues with the collation cache