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

Поиск
Список
Период
Сортировка
От Sam Darwin
Тема Re: BUG #18383: creation of public schema is not consistent
Дата
Msg-id CANEqPjHVRDJef6_iKeq+T9ebwNsioY2PfP0atUOsbr_HPhnemg@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #18383: creation of public schema is not consistent  (PG Bug reporting form <noreply@postgresql.org>)
Список 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@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      18383
Logged by:          Sam Darwin
Email address:      samuel.d.darwin@gmail.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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18383: creation of public schema is not consistent
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18383: creation of public schema is not consistent