Re: Fix outdated comments in catcache.h

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: cca5507 <cca5507(at)qq(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix outdated comments in catcache.h
Date: 2026-01-05 09:16:28
Message-ID: CAApHDvpwLOuhy9Mz64Y+NbVYxCqmg-gJT1-MhakspeDTeDhdUA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 18 Dec 2025 at 19:29, cca5507 <cca5507(at)qq(dot)com> wrote:
> 473182c9523afad10e9507145690d902a0bc7f04 add a hash table for CatCList, this has
> made some comments outdated.
>
> Attach a small patch to fix it.

I agree that the comment about not dividing them into hash buckets
seems outdated now.

> - dlist_node cache_elem; /* list member of per-catcache list */
> + dlist_node cache_elem; /* list member of per-bucket list */

I'm not sure this is more informative. How about?

dlist_node cache_elem; /* member for CatCache.cc_lbucket[] dlist */

I also really wonder what the fascination with having lower-case
struct names with camelCased typedef names in this file... It's not
really clear if that comment should say "CatCache.cc_lbucket[]" or
"catcache.cc_lbucket[]". I find the latter clearer so used that.

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2026-01-05 09:30:47 Re: Newly created replication slot may be invalidated by checkpoint
Previous Message Andrey Borodin 2026-01-05 09:04:54 Re: REASSIGN OWNED BY alters objects in other database.