Re: Postgres 15 upgrades and template1 public schema

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Thomas Kellerer <shammat(at)gmx(dot)net>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Postgres 15 upgrades and template1 public schema
Date: 2022-10-20 05:40:57
Message-ID: 20221020054057.GA29941@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 19, 2022 at 19:59:52 -0400,
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>The release notes could probably use some tweaking here. It looks to
>me like pg_dumpall (and hence pg_upgrade) will adjust the ownership and
>permissions of template1's public schema to match what was in the old
>installation, but it doesn't touch template0. Hence, whether a
>"newly-created database in an existing cluster" has the old or new
>properties of the public schema will depend on whether you clone it
>from template1 or template0. That definitely needs explained, and
>maybe we should recommend that DBAs consider manually changing
>what's in template1.

This answers my question about what is actually happening.

I think expanding the release notes section on this a bit could be
helpful for other people.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Johannes Münch 2022-10-20 06:46:06 Re: PG RPMS for RHEL 9 on aarch64?
Previous Message Tom Lane 2022-10-20 05:12:18 Re: pg_restore 12 "permission denied for schema" errors