Low OIDs (< 16384) when creating databases in single user mode

From: Arnold Hendriks <unilynx(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Low OIDs (< 16384) when creating databases in single user mode
Date: 2025-06-06 09:16:15
Message-ID: CADZkmHUiBeSdm+HZfQ83KPpB2PJ6aBNARjZ-Z3O99-9DosFOUw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

When creating a new database using the following script:

PGBINDIR="/opt/homebrew/Cellar/postgresql(at)16/16.9/bin/"
rm -rf /tmp/db
"$PGBINDIR/initdb" -U postgres -D /tmp/db --auth-local=trust
--encoding 'UTF-8' --locale='C'
"$PGBINDIR/postgres" --single -D /tmp/db postgres <<HERE
CREATE DATABASE test;
select oid,datname from pg_database;
HERE

The id 14022 is assigned. This then confuses pgAdmin which expects
databases to have an ID >= 16384 (unless named postgres/edb)

Am I wrong in creating the database this way? Or is pgAdmin wrong in
assuming ids have to be >=16384 ?

Is there a way to ensure new IDs are in the usual range when starting
in in single user mode?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2025-06-06 12:57:02 Re: Regarding fillfactor use case for only delete ops
Previous Message Durgamahesh Manne 2025-06-06 08:40:46 Regarding fillfactor use case for only delete ops