Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPjb6-0003vp-IR for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Oct 2020 09:49:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kPjb5-0003mH-C0 for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Oct 2020 09:49:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPjWd-0002i6-A3 for pgsql-bugs@lists.postgresql.org; Tue, 06 Oct 2020 09:44:51 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kPjWa-0005Qd-Ui for pgsql-bugs@lists.postgresql.org; Tue, 06 Oct 2020 09:44:50 +0000 Received: by mail-pg1-x541.google.com with SMTP id x16so7703641pgj.3 for ; Tue, 06 Oct 2020 02:44:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=goodf-co-jp.20150623.gappssmtp.com; s=20150623; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:thread-index :content-language; bh=pD3l0ltUlJBVR+Q/QzAl8F8Fe0SxfJoYFWBrs72zfpU=; b=sRFUSeGjj8q95E9+e/t9CESFkdthdZWTKDlv7SzVNNhNQ+s59jjuvmjPDBu+Hs6GER Kml2NXLfWzTG11oOIfF0q6DyvpIn8WCKqinYRseFo3CJSTzXwFB6abStZCURBkPiqKOa fswEHLxliyhtqDE1vgJJyMkQs7tMHTHyzmmpiPjxBdUzp1U0yEudbKywsp1DjH9Dv67l I7jrtfQdxW61wdUBIAGPwF4UhcBHhSALDpA+mJe8gBx46qMw0/AehgWedxTksggEqEeo 3j1ubk3bPpyYjYAoG4BObRrFHyIkLkGQq2uD2LjO5FKcTLYO1yic26mS0Ztu1j+HBAdg L/PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:thread-index :content-language; bh=pD3l0ltUlJBVR+Q/QzAl8F8Fe0SxfJoYFWBrs72zfpU=; b=fxqUtkaCkuvwRHmtRHpgTEuPQkIrDzvkZJigPv/T6IRYIDo5ilNBflHqsdTXfMa2Zl /2QMVnhUuLGzgLQeuH0NQNpwtK3frHIUpu3UE2G/17WNeJPOQ9Lq29z30XzcXIb/LBRr rOKc7j6mFm5WcOnhl9zgiUMN5tnPM3zEWfwR1WBDlXesu83EbLMV8Ktxzdcl1e6xHL4J RBLQuhwHA9tc8pbAycpPpXkDqfoHu4/rGcooHgDsIsAeJcg5aAitPm+iw8efWol3F3aj uSlLuD39aqaUcANb+rdSmUgHdOjaXfRV/qjgNLU+SIooBxHeMYlSo49efzwhm6/AAz1E CbMA== X-Gm-Message-State: AOAM533LvD5EWR1yk0xivTkugtp4mmEfH0v3qf0SQqC9Sx03odZ5ojGY RBGqN+uBm/d5V614v7C8fnb4tSFa3s3LijeMbIQ= X-Google-Smtp-Source: ABdhPJxWz/2jgqs4NySo8+WYlpfWRHJA314jGfebxRtFM8bQanSZnbEFv+Ptc8qqJt7xMh9WF2npGQ== X-Received: by 2002:aa7:8515:0:b029:152:5e31:fc5f with SMTP id v21-20020aa785150000b02901525e31fc5fmr3985885pfn.56.1601977487050; Tue, 06 Oct 2020 02:44:47 -0700 (PDT) Received: from nakagawapc (fs76eeebe2.tkyc606.ap.nuro.jp. [118.238.235.226]) by smtp.gmail.com with ESMTPSA id m5sm2181259pjn.19.2020.10.06.02.44.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Oct 2020 02:44:46 -0700 (PDT) From: "Y. NAKAGAWA" To: "'Tom Lane'" Cc: References: <16645-54478f8719888f75@postgresql.org> <805341.1601433939@sss.pgh.pa.us> <029201d696df$c1542940$43fc7bc0$@goodf.co.jp> In-Reply-To: <029201d696df$c1542940$43fc7bc0$@goodf.co.jp> 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> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHs0qAEtk9udE4MsrHrs0gcmS+JZwF574pkAlFCT3+pP37BgA== Content-Language: ja List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 Sent: Wednesday, September 30, 2020 1:11 PM To: 'Tom Lane' 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 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 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