Re: BUG #18383: creation of public schema is not consistent

From: Sam Darwin <samuel(dot)d(dot)darwin(at)gmail(dot)com>
To: samuel(dot)d(dot)darwin(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18383: creation of public schema is not consistent
Date: 2024-03-07 19:47:14
Message-ID: CANEqPjHVRDJef6_iKeq+T9ebwNsioY2PfP0atUOsbr_HPhnemg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

To add a little more about this topic, after you understand the issue it's
not overly difficult. Hindsight is 20/20. When you first encounter it,
there is an error with these words: description schema public standard, and
those are all very generic words. It doesn't click in your mind what that
string of common, general words is really referring to. It's like seeing
the words "system" or "matrix" or something. They could mean anything.

Therefore another solution to the problem is to enhance the error message.
For example: "You have hit schema description problem 5938. See this link
for an explanation about 5938". Add a hyperlink to an article, specifically
about this issue.

On Thu, Mar 7, 2024 at 10:59 AM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 18383
> Logged by: Sam Darwin
> Email address: samuel(dot)d(dot)darwin(at)gmail(dot)com
> PostgreSQL version: 15.2
> Operating system: Ubuntu 22.04
> Description:
>
> Hi,
>
> This is somewhere in-between a feature request and a bug.
>
> When you create a database, the public schema has a description "standard
> public schema", by default.
>
> If you drop and re-create the public schema, it has an empty description.
>
> These two activities are pretty similar. Creating a database. Creating a
> public schema. But the results are different. You might imagine, that's
> not particularly important. It doesn't affect anything. However, the
> absence of that description "standard public schema" can cause errors
> during
> a backup and restore procedures. Why? Because re-setting the schema
> description during a restoration, requires that you must be the "owner" of
> the schema. It's not enough to have full permissions. The restoring user
> account might have all permissions, except not be the "owner" of the public
> schema, and that will cause the restore to have an error.
>
> What is a solution? Either always set the description of the public schema
> to ""standard public schema", or never set the description of the public
> schema to "standard public schema". Or allow restoration of the
> "description" from a backup.
> Or, leave it as is, so that a person encountering the error must do a lot
> of
> investigation. :-) Ok.
>
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2024-03-07 20:11:41 Re: BUG #18383: creation of public schema is not consistent
Previous Message PG Bug reporting form 2024-03-07 17:58:05 BUG #18383: creation of public schema is not consistent