pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PetSerAl <petseral@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Single-User Mode oid assignment
Date: Sat, 16 Mar 2024 14:14:27 +0300
Message-ID: <CAKygsHSOa6Z4FNLQydDbLLJHO34Zmy3YfeCaXb0uWNxo7MEj7A@mail.gmail.com> (raw)

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?





view thread (2+ messages)  latest in thread

Message-ID: <CAKygsHSOa6Z4FNLQydDbLLJHO34Zmy3YfeCaXb0uWNxo7MEj7A@mail.gmail.com>
Permalink:  ../CAKygsHSOa6Z4FNLQydDbLLJHO34Zmy3YfeCaXb0uWNxo7MEj7A@mail.gmail.com/
Also on:    postgresql.org/message-id/CAKygsHSOa6Z4FNLQydDbLLJHO34Zmy3YfeCaXb0uWNxo7MEj7A@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: petseral@gmail.com
  Subject: Re: Single-User Mode oid assignment
  In-Reply-To: <CAKygsHSOa6Z4FNLQydDbLLJHO34Zmy3YfeCaXb0uWNxo7MEj7A@mail.gmail.com>
  References: <CAKygsHSOa6Z4FNLQydDbLLJHO34Zmy3YfeCaXb0uWNxo7MEj7A@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox