So I'm coming to this bug with fresh eyes.

Inspecting your attachments, it looks like you had postgresql-12
installed, from 20.04 (focal)?

Example:

Start-Date: 2024-09-21  12:36:44
Commandline: /usr/sbin/synaptic
Requested-By: mbm (1000)
Purge: postgresql-12:amd64 (12.11-0ubuntu0.20.04.1), postgresql-client-12:amd64 
(12.11-0ubuntu0.20.04.1)
End-Date: 2024-09-21  12:37:25


And

Purging configuration files for postgresql-12 (12.11-0ubuntu0.20.04.1) ...^M
Dropping cluster main...^M
Log ended: 2024-09-21  12:37:25

I presume this was just a left over, and not really owning any database
that you were using?


I'm also testing a quick release upgrade from jammy to noble with postgresql 14 
installed and a live database, with a manually created role.

Mid upgrade I got this debconf prompt:


 │ Obsolete major version 14                                                    
                                                                            │  
 │                                                                              
                                                                            │  
 │ The PostgreSQL version 14 is obsolete, but the server or client packages are 
still installed. Please install the latest packages (postgresql-16 and      │  
 │ postgresql-client-16) and upgrade the existing  clusters with 
pg_upgradecluster (see manpage).                                                
           │  
 │                                                                              
                                                                            │  
 │ Please be aware that the installation of postgresql-16 will automatically 
create a default cluster 16/main. If you want to upgrade the 14/main cluster,  
│  
 │ you need to remove the already existing 16 cluster (pg_dropcluster --stop 16 
main, see manpage for details).                                             │  
 │                                                                              
                                                                            │  
 │ The old server and client packages are no longer supported. After the 
existing clusters are upgraded, the postgresql-14 and postgresql-client-14      
   │  
 │ packages should be removed.                                                  
                                                                            │  
 │                                                                              
                                                                            │  
 │ Please see /usr/share/doc/postgresql-common/README.Debian.gz for details


All good so far.

I dropped the new, empty, 16 main cluster, as recommended.

I then performed the cluster upgrade with:

sudo pg_upgradecluster 14 main

When that finished, I had:
$ pg_lsclusters 
Ver Cluster Port Status Owner    Data directory              Log file
14  main    5433 down   postgres /var/lib/postgresql/14/main 
/var/log/postgresql/postgresql-14-main.log
16  main    5432 online postgres /var/lib/postgresql/16/main 
/var/log/postgresql/postgresql-16-main.log

Note that the new 16 main cluster is on the default port 5432. And psql
confirms that that is the upgraded db I had before in v14:

$ psql -l
                                                   List of databases
   Name    |  Owner   | Encoding | Locale Provider | Collate |  Ctype  | ICU 
Locale | ICU Rules |   Access privileges   
-----------+----------+----------+-----------------+---------+---------+------------+-----------+-----------------------
 kea_db    | postgres | UTF8     | libc            | C.UTF-8 | C.UTF-8 |        
    |           | =Tc/postgres         +
           |          |          |                 |         |         |        
    |           | postgres=CTc/postgres+
           |          |          |                 |         |         |        
    |           | kea_user=CTc/postgres
 postgres  | postgres | UTF8     | libc            | C.UTF-8 | C.UTF-8 |        
    |           | 
 template0 | postgres | UTF8     | libc            | C.UTF-8 | C.UTF-8 |        
    |           | =c/postgres          +
           |          |          |                 |         |         |        
    |           | postgres=CTc/postgres
 template1 | postgres | UTF8     | libc            | C.UTF-8 | C.UTF-8 |        
    |           | =c/postgres          +
           |          |          |                 |         |         |        
    |           | postgres=CTc/postgres
(4 rows)


$ psql -U kea_user -h 127.0.0.1 kea_db
Password for user kea_user: 
psql (16.6 (Ubuntu 16.6-0ubuntu0.24.04.1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: 
off)
Type "help" for help.

kea_db=>

The upgrade log went fine.


I really don't think we can troubleshoot this further, unless you can reproduce 
this at will from scratch.

Things that come to mind that could have interfered with the upgrade are, in no 
particular order:
- extensions? Packaged in ubuntu or otherwise manually installed perhaps?
- well, that's it actually. The rest should have transferred, like pg_hba.conf 
customizations, postgresql.conf, etc.
- upgrade run as a user without privileges? But you said you used sudo.

The system from
https://bugs.launchpad.net/ubuntu/+source/postgresql-16/+bug/2078494 was
xenial to begin with, and looks like it performed release upgrades since
then. Maybe this could be related.

So I really don't know. I'm sorry this happened to your systems, but
this is beyond a bug report now I think.

I'll mark it as incomplete one more time because there isn't much more
we can try here. If you have more information, please add it and switch
the bug back to "new" and we will catch it in our triage.


** Changed in: postgresql-16 (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2081996

Title:
  After upgrade to 24.04.1 LTS pg_upgradecluster fails to upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postgresql-16/+bug/2081996/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to