PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID16131
PG Version11.6
OSCentOS Linux release 7.7.1908 (Core)
Opened2019-11-21 19:01:07+00
Reported byJed Walker
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      16131
Logged by:          Jed Walker
Email address:      (redacted)
PostgreSQL version: 11.6
Operating system:   CentOS Linux release 7.7.1908 (Core)
Description:        

I did an upgrade of two matching servers, one from 9.2 -> 11.5 and had no
problems, but yesterday I did the other 9.2 -> 11.6 and a database and user
were missing from the upgraded database.

I saw no errors, other than the unix_socket_directories issue, but one of
our databases is not in the new 11 server. We had a similar system with the
same databases that I upgraded a week ago and all databases came across.
There is no reference to this database in the upgrade logs. 
The key difference between the system that I did previously that worked and
this is that the one that worked was 9.2 -> 11.5, and this was 9.2 -> 11.6

Upgrade process:
yum install -y
https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install -y postgresql11
yum install -y postgresql11-server
shutdown -r now
systemctl stop postgresql
/usr/pgsql-11/bin/postgresql-11-setup initdb
/usr/pgsql-11/bin/pg_upgrade -v -r -d /var/lib/pgsql/data -D
/var/lib/pgsql/11/data -b "/usr/bin" -B "/usr/pgsql-11/bin"
systemctl disable postgresql
systemctl enable postgresql-11
systemctl start postgresql-11
~/analyze_new_cluster.sh

These are the databases, after upgrade database wasp and user wasp_user were
missing.
postgres=# \l
                                   List of databases
   Name    |   Owner   | Encoding |   Collate   |    Ctype    |    Access
privileges    
-----------+-----------+----------+-------------+-------------+-------------------------
 nasdb     | nasuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 postgres  | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0 | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres 
          +
           |           |          |             |             |
postgres=CTc/postgres
 template1 | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
postgres=CTc/postgres  +
           |           |          |             |             |
=c/postgres
 wasp      | wasp_user | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
=Tc/wasp_user          +
           |           |          |             |             |
wasp_user=CTc/wasp_user

The users are using the system, but I'd be happy to send logs etc.

Messages

DateAuthorSubject
2019-11-21 19:01:07+00PG Bug reporting formBUG #16131: pg_upgrade 9 -> 11.6 and a database is missing
2019-12-17 23:54:11+00Bruce MomjianRe: BUG #16131: pg_upgrade 9 -> 11.6 and a database is missing
2019-12-17 23:58:28+00RE: BUG #16131: pg_upgrade 9 -> 11.6 and a database is missing
2019-12-18 00:18:00+00'Bruce Momjian'Re: BUG #16131: pg_upgrade 9 -> 11.6 and a database is missing
2020-01-30 16:21:29+00"Walker, Jared (Contractor)"RE: [EXTERNAL] Re: BUG #16131: pg_upgrade 9 -> 11.6 and a database is missing