public inbox for [email protected]
help / color / mirror / Atom feedLow OIDs (< 16384) when creating databases in single user mode
2+ messages / 2 participants
[nested] [flat]
* Low OIDs (< 16384) when creating databases in single user mode
@ 2025-06-06 09:16 Arnold Hendriks <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Arnold Hendriks @ 2025-06-06 09:16 UTC (permalink / raw)
To: [email protected]
When creating a new database using the following script:
PGBINDIR="/opt/homebrew/Cellar/postgresql@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?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Low OIDs (< 16384) when creating databases in single user mode
@ 2025-06-06 14:32 Tom Lane <[email protected]>
parent: Arnold Hendriks <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2025-06-06 14:32 UTC (permalink / raw)
To: Arnold Hendriks <[email protected]>; +Cc: [email protected]
Arnold Hendriks <[email protected]> writes:
> Is there a way to ensure new IDs are in the usual range when starting
> in in single user mode?
No. Start the DB in normal mode, then create objects that you
want to be considered user-defined.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-06-06 14:32 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-06-06 09:16 Low OIDs (< 16384) when creating databases in single user mode Arnold Hendriks <[email protected]>
2025-06-06 14:32 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox