Single-User Mode oid assignment

From: PetSerAl <petseral(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Single-User Mode oid assignment
Date: 2024-03-16 11:14:27
Message-ID: CAKygsHSOa6Z4FNLQydDbLLJHO34Zmy3YfeCaXb0uWNxo7MEj7A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have following script, which initialize two clusters:

echo CREATE ROLE new_user WITH LOGIN;>init_cluster.sql
echo CREATE DATABASE new_database WITH OWNER = new_user;>>init_cluster.sql
initdb -D case1 -U postgres
pg_ctl start -D case1 -w
psql "host=localhost dbname=postgres user=postgres"<init_cluster.sql
pg_ctl stop -D case1 -m smart -w
initdb -D case2 -U postgres
postgres --single -D case2 postgres<init_cluster.sql

In case1 I have following oid assigned:
new_user: 16384
new_database: 16385

In case2:
new_user: 15062
new_database: 15063
And pgAdmin does not show new_database in the server tree.
Documentation says following:
>OIDs assigned during normal database operation are constrained to be 16384 or higher. This ensures that the range 10000—16383 is free for OIDs assigned automatically by genbki.pl or during initdb.

Is such difference in oid assignment in Single-User Mode expected?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rajesh S 2024-03-18 07:05:27 Re: operator is only a shell - Error
Previous Message Greg Sabino Mullane 2024-03-15 18:36:44 Re: Query on Postgres SQL transaction