pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Obsolete reference to pg_relation in comment
Date: Wed, 26 Jul 2023 13:50:31 -0700
Message-ID: <20230726205031.GD3310393@nathanxps13> (raw)
In-Reply-To: <87sf9apnr0.fsf@wibble.ilmari.org>
References: <87sf9apnr0.fsf@wibble.ilmari.org>

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





view thread (9+ messages)  latest in thread

Message-ID: <20230726205031.GD3310393@nathanxps13>
Permalink:  ../20230726205031.GD3310393@nathanxps13/
Also on:    postgresql.org/message-id/20230726205031.GD3310393@nathanxps13

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, ilmari@ilmari.org
  Subject: Re: Obsolete reference to pg_relation in comment
  In-Reply-To: <20230726205031.GD3310393@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox