Skip to content

Databases with oids < 16384 not visible #8833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
unilynx opened this issue Jun 5, 2025 · 3 comments
Closed

Databases with oids < 16384 not visible #8833

unilynx opened this issue Jun 5, 2025 · 3 comments

Comments

@unilynx
Copy link

unilynx commented Jun 5, 2025

I have a database with an OID of 14022 (I don't know why yet) and I can't see it in PGAdmin because its database query ends with

 	WHERE   
 	    db.oid > 16383::OID OR db.datname IN ('postgres', 'edb')

I think I was able to see the database in an older pgadmin version (now tried with 9.3 and 94.). Is there a way/option to lift this restriction - or change the 'datname' filter applied here ?

@unilynx
Copy link
Author

unilynx commented Jun 5, 2025

background - I think I've found the reason why i'm seeing low OIDs:

  OIDs 12000-16383 are reserved for unpinned objects created by initdb's
  post-bootstrap processing.  initdb forces the OID generator up to
  12000 as soon as it's made the pinned objects it's responsible for.

  OIDs beginning at 16384 are assigned from the OID generator
  during normal multiuser operation.  (We force the generator up to
  16384 as soon as we are in normal operation.)

https://doxygen.postgresql.org/transam_8h_source.html

And I'm creating my database immediately after initdb by piping CREATE DATABASE into postgres --single (and later on a create user etc..) as I'm trying to avoid having a database up in listening mode which doesn't yet have its users configured. I haven't noticed this side effect before and I'm not sure if I'm actually not supposed to do this to PG.

So the question is.. is there a way to get pgadmin4 to accept lower oids, or would it be possible to have pgadmin4 set a lower OID range for this specific query ?

PS: Asked this on the Postgres side now - https://www.postgresql.org/message-id/CADZkmHUiBeSdm%2BHZfQ83KPpB2PJ6aBNARjZ-Z3O99-9DosFOUw%40mail.gmail.com

@adityatoshniwal
Copy link
Contributor

Hi @unilynx,

The objects below OID 16383 are considered as system objects. You can change preferences to show system objects from Browser -> Display -> Show system object?. By default it is disabled.

This doesn't look like an issue, so closing it.

@adityatoshniwal adityatoshniwal closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2025
@unilynx
Copy link
Author

unilynx commented Jun 6, 2025

Hi @unilynx,

The objects below OID 16383 are considered as system objects. You can change preferences to show system objects from Browser -> Display -> Show system object?. By default it is disabled.

This doesn't look like an issue, so closing it.

'Show system objects' doesn't show them

'Show template databases?' however, does show the database (even though it's not a template). That might still be unexpected ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants