Re: Some clean-up work in get_cheapest_group_keys_order()

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
Subject: Re: Some clean-up work in get_cheapest_group_keys_order()
Date: 2022-07-13 00:50:52
Message-ID: CAApHDvpct9sJA7Rc28AOR2vyqbzJLyFRaVXeeT+9S6h2NOR4tg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 13 Jul 2022 at 11:02, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> > * I think list_truncate(list_copy(list), n) is a pretty bad way to
> > copy the first n elements of a list, especially when n is likely to be
> > 0 most of the time. I think we should just add a function called
> > list_copy_head(). We already have list_copy_tail().
>
> Agreed, but I think there are other instances of that idiom that
> should be cleaned up while you're at it.

Agreed. I imagine we should just do the remaining cleanup in master
only. Do you agree?

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-07-13 01:02:27 Re: test_oat_hooks bug (was: Re: pgsql: Add copy/equal support for XID lists)
Previous Message Masahiko Sawada 2022-07-13 00:36:15 Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns