pgsql: List offending databases in pg_upgrade datallowconn check

From: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: List offending databases in pg_upgrade datallowconn check
Date: 2022-03-24 21:44:02
Message-ID: E1nXVFR-001E3I-JX@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

List offending databases in pg_upgrade datallowconn check

The check for datallowconn being properly set on all databases in the
old cluster errored out on the first instance, rather than report the
set of problematic databases. This adds reporting to a textfile like
how many other checks are performed. While there, also add a comment
to the function as per how other checks are commented.

This check won't catch if template1 isn't allowing connections, since
that's used for connecting in the first place. That error remains as
it is today:

connection to server on socket ".." failed: FATAL: database "template1" is not currently accepting connections

Author: Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>
Reviewed-by: Suraj Kharage <suraj(dot)kharage(at)enterprisedb(dot)com>
Reviewed-by: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Discussion: https://postgr.es/m/CAOgcT0McABqF_iFFQuuRf9is+gmYMsmUu_SWNikyr=2VGyP9Jw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/26ebb0e28032283f99bf985fb47ea3d19fbaf91a

Modified Files
--------------
src/bin/pg_upgrade/check.c | 41 ++++++++++++++++++++++++++++++++++++++---
1 file changed, 38 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2022-03-25 00:22:03 pgsql: Add retries for further investigation of 019_replslot_limit.pl f
Previous Message Tom Lane 2022-03-24 20:33:19 pgsql: Fix pg_statio_all_tables view for multiple TOAST indexes.