Re: relation OID in ReorderBufferToastReplace error message

Jeremy Schneider <schnjere@amazon.com>

From: "Schneider (AWS), Jeremy" <schnjere@amazon.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-07-02T02:12:01Z
Lists: pgsql-hackers
> On Jul 1, 2021, at 18:57, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> But I wonder why
> print the parent's OID, when we have access to its name.

Seems like a few people do schema-based multi-tenancy with similarly named relations in different namespaces, so I’d have a preference for OID over an unqualified relation name. Also the error message shows the OID for the toast relation so this is consistent.

Relation name could work too though, especially if the schema was included

-Jeremy


Sent from my TI-83

Commits

  1. Back-patch "Add parent table name in an error in reorderbuffer.c."

  2. Add parent table name in an error in reorderbuffer.c.

  3. Fix reorder buffer memory accounting for toast changes.

  4. Add logical change details to logical replication worker errcontext.

  5. Fix toast rewrites in logical decoding.

  6. Add error codes to some corruption log messages