Re: regdatabase - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: regdatabase
Date
Msg-id aCuf5h_fMOxsHKY3@nathan
Whole thread Raw
In response to regdatabase  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
On Mon, May 19, 2025 at 10:37:29AM +0800, jian he wrote:
> I saw  REGROLEOID in foreign_expr_walker,
> I'm wondering whether REGDATABASEOID is reachable within foreign_expr_walker.
> 
> not familiar with this area, also there are no coverage tests for
> other reg*Const,
> per
> https://coverage.postgresql.org/contrib/postgres_fdw/deparse.c.gcov.html

Oh, good catch.  At first glance, it looks like we could just add another
case block for REGDATABASEOID, but looking closer at is_shippable(), I see
that it's just testing for objectId < FirstGenbkiObjectId.  That seems like
it might be a problem because we don't consider any databases to be pinned,
and template0, template1, and postgres start with OIDs of 4, 1, and 5,
respectively.  However, I'd expect that to also be a problem for the public
schema, but foreign_expr_walker() doesn't appear to have any special
handling for that.  Hm...

-- 
nathan



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: strange perf regression with data checksums
Next
From: Nathan Bossart
Date:
Subject: Re: Statistics Import and Export