Re: Obsolete reference to pg_relation in comment

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Obsolete reference to pg_relation in comment
Date: 2023-07-26 20:50:31
Message-ID: 20230726205031.GD3310393@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Okay, now looking at the patch...

On Wed, Jul 26, 2023 at 06:48:51PM +0100, Dagfinn Ilmari Mannsåker wrote:
> * All accesses to pg_largeobject and its index make use of a single Relation
> - * reference, so that we only need to open pg_relation once per transaction.
> + * reference, so that we only need to open pg_class once per transaction.
> * To avoid problems when the first such reference occurs inside a
> * subtransaction, we execute a slightly klugy maneuver to assign ownership of
> * the Relation reference to TopTransactionResourceOwner.

Hm. Are you sure this is actually referring to pg_class? It seems
unlikely given pg_relation was renamed 14 years before this comment was
added, and the code appears to be ensuring that pg_largeobject and its
index are opened at most once per transaction. I couldn't find the
original thread for this comment, unfortunately, but ISTM we might want to
replace "pg_relation" with "them" instead.

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2023-07-26 20:56:45 Re: incremental-checkopints
Previous Message Tatsuo Ishii 2023-07-26 20:22:30 Re: Row pattern recognition