pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Y. NAKAGAWA <nakagawa@goodf.co.jp>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Subject: RE: BUG #16645: pg_upgrade does not mark template1 as a system database
Date: Tue, 6 Oct 2020 18:44:43 +0900
Message-ID: <03c101d69bc5$53380090$f9a801b0$@goodf.co.jp> (raw)
In-Reply-To: <029201d696df$c1542940$43fc7bc0$@goodf.co.jp>
References: <16645-54478f8719888f75@postgresql.org>
	<805341.1601433939@sss.pgh.pa.us>
	<029201d696df$c1542940$43fc7bc0$@goodf.co.jp>

I had created a ticket #5875 on pgAdmin 4 redmine.

However, after some grep-ing on pgAdmin4 source tree, I found that [System
Database?] shows pg_database.oid <= pg_database.datlastsysoid.

pg_database:
on initdb-ed 12.4:
oid     datname       datlastsysoid
1	template1	13317
13317	template0	13317
13318	postgres	13317

on pg_upgrade-d 13.0:
oid     datname       datlastsysoid
13441	template0	13441
16400	template1	13441
16401	postgres	13441

Are these differences by design?

Regards,
--
Y. Nakagawa

-----Original Message-----
From: Y. NAKAGAWA <nakagawa@goodf.co.jp> 
Sent: Wednesday, September 30, 2020 1:11 PM
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Subject: RE: BUG #16645: pg_upgrade does not mark template1 as a system
database

Thank you for your suggestion.
According to pgAdmin4, [System database?] is [No] and [Template?] is [Yes].
I will post this to the pgadmin lists later.

Regards,

--
Nakagawa, Y.

-----Original Message-----
From: Tom Lane <tgl@sss.pgh.pa.us>
Sent: Wednesday, September 30, 2020 11:46 AM
To: nakagawa@goodf.co.jp
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16645: pg_upgrade does not mark template1 as a system
database

PG Bug reporting form <noreply@postgresql.org> writes:
> 4. Open pgAdmin 4, connect to the PostgreSQL 13.0 server and expand 
> the Databases node.
> Expected result:
> The node has [postgres].
> Actual result:
> The node has [postgres] and [template1].

There's no particular concept of a "system database" in Postgres, so I don't
know what pgadmin is doing to decide which databases to show or not show,
but evidently it's not too well thought out.

(The closest concept I can think of is whether a DB is marked datistemplate,
but a test confirms that pg_upgrade successfully preserves that property on
template0 and template1.)

I'd suggest you file this complaint on the pgadmin lists.

			regards, tom lane







view thread (5+ messages)  latest in thread

Message-ID: <03c101d69bc5$53380090$f9a801b0$@goodf.co.jp>
Permalink:  ../03c101d69bc5$53380090$f9a801b0$@goodf.co.jp/
Also on:    postgresql.org/message-id/03c101d69bc5$53380090$f9a801b0$@goodf.co.jp

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: nakagawa@goodf.co.jp, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
  Subject: RE: BUG #16645: pg_upgrade does not mark template1 as a system database
  In-Reply-To: <03c101d69bc5$53380090$f9a801b0$@goodf.co.jp>

* 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