Re: Is template1 intended to have oid 1 ?

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is template1 intended to have oid 1 ?
Date: 2021-05-09 23:01:11
Message-ID: 609869B7.1050903@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05/09/21 18:40, Tom Lane wrote:
> template1 does have OID 1 in a fresh-from-initdb cluster, but it's
> just a database; you can drop it and recreate it if you choose.
> I believe that pg_upgrade does so.

I guess it wouldn't even have made me curious, if I hadn't noticed
the TemplateDbOid symbol being defined for it, which could end up being
wrong after a pg_upgrade.

I suppose if it is only ever referred to during bootstrap, no harm's done.

Ironically, it might be the most prominently advertised oid_symbol there is,
as that entry in pg_database.dat is what's used as the example of .dat-file
format in bki.sgml.

Regards,
-Chap

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-05-09 23:36:16 Re: Non-reproducible valgrind failure on HEAD
Previous Message Osahon Oduware 2021-05-09 22:55:47 Fwd: DOCS.zip - Request for access