Re: [PATCH] improve the pg_upgrade error message

From: Suraj Kharage <suraj(dot)kharage(at)enterprisedb(dot)com>
To: Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] improve the pg_upgrade error message
Date: 2021-07-12 12:13:30
Message-ID: CAF1DzPWorPT7pkEMQHgmCjfXpE-VP46Gnzwt3to24Kth8bt-6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

+1 for the change. Patch looks good to me.

On Mon, Jul 12, 2021 at 4:59 PM Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>
wrote:

> While looking into one of the pg_upgrade issue, I found it
>
> challenging to find out the database that has the datallowconn set to
>
> 'false' that was throwing following error:
>
>
> *"All non-template0 databases must allow connections, i.e. their
> pg_database.datallowconn must be true"*
>
>
> edb=# create database mydb;
>
> CREATE DATABASE
>
> edb=# update pg_database set datallowconn='false' where datname like
> 'mydb';
>
> UPDATE 1
>
>
> Now, when I try to upgrade the server, without the patch we get above
>
> error, which leaves no clue behind about which database has datallowconn
>
> set to 'false'. It can be argued that we can query the pg_database
>
> catalog and find that out easily, but at times it is challenging to get
>
> that from the customer environment. But, anyways I feel we have scope to
>
> improve the error message here per the attached patch.
>
>
> With attached patch, now I get following error:
>
> *"All non-template0 databases must allow connections, i.e. their
> pg_database.datallowconn must be true; database "mydb" has datallowconn set
> to false."*
>
>
>
> Regards,
>
> Jeevan Ladhe
>

--
--

Thanks & Regards,
Suraj kharage,

edbpostgres.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2021-07-12 12:13:50 Re: ATTACH PARTITION locking documentation for DEFAULT partitions
Previous Message David Rowley 2021-07-12 12:06:32 Re: ATTACH PARTITION locking documentation for DEFAULT partitions