Problema con l'aggiornamento di postgres

Sto cercando di aiutare qualcuno che ha rifiutato l’aggiornamento a PG13 e ora ha un certificato SSL scaduto.

Potrebbe essere reso più difficile a causa di Apt-get update fails inside container yarn repo not signed - #5 by pfaffman, ma ho modificato i template pg12 e pg13 in modo che dovrebbero funzionare, ma non riesco a farlo aggiornare e non riesco a ricostruirlo con il template pg12.

Ecco cosa succede quando ho provato a fare l’aggiornamento:

                                     
fixing permissions on existing directory /var/lib/postgresql/12/main ... ok          
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100                                                                                                              
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC                              
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
                                     
Success. You can now start the database server using:
                                                                                                                                                       
    pg_ctlcluster 12 main start                                                                                                                        
                                                                           
update-alternatives: warning: forcing reinstallation of alternative /usr/share/postgresql/13/man/man1/postmaster.1.gz because link group postmaster.1.g
nz is broken                                                                                                                                            
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.             
Processing triggers for postgresql-common (246.pgdg110+1) ...
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:                                                                                                                    
Stopping PostgreSQL 12 database server: main.                                                                                                          
Stopping PostgreSQL 13 database server: main.                                                                                                          
Performing Consistency Checks               -----------------------------                                                                                                                          
Checking cluster versions                                   ok                                                                                         
Checking database user is the install user                  ok                                                                                         
Checking database connection settings                       ok                                                                                         
Checking for prepared transactions                          ok                                                                                         
Checking for system-defined composite types in user tables  ok                                                                                         
Checking for reg* data types in user tables                 ok                                                                                         
Checking for contrib/isn with bigint-passing mismatch       ok                                                                                         
Creating dump of global objects                             ok                                                                                         
Creating dump of database schemas                                                                                                                      
  discourse                                                                                                                                            
                                                                                                                                                       
*failure*                                                                                                                                              
                                                                                                                                                       
Consult the last few lines of "pg_upgrade_dump_16566.log" for
the probable cause of the failure.
Failure, exiting
-------------------------------------------------------------------------------------
UPGRADE OF POSTGRES FAILED
                                                                                                                                                       
Please visit https://meta.discourse.org/t/postgresql-13-update/172563 for support.
                                                                                                                                                       
You can run ./launcher start app to restart your app in the meanwhile

Provare a ricostruire senza l’aggiornamento ha cose come quelle sottostanti quando tenta di migrare il database:

PG::InsufficientPrivilege: ERROR:  permission denied to create extension "unaccent"                                                                    

Penso che dovrò tornare a un’installazione pulita e al backup più recente, che ha diversi giorni.

Non puoi aggiungere quanto segue a hooks per creare l’estensione unaccent se manca?

after_postgres:
    - exec: su postgres -c 'psql discourse -c "create extension if not exists unaccent;"'
3 Mi Piace

Sembra un piano! Ci darò un’occhiata domattina. Grazie

1 Mi Piace

Sembra che abbia funzionato! Ho dovuto aggiungerlo a pg12 e postgres.

Beh, ha funzionato abbastanza da farlo ripartire con PG12, ma non sono mai riuscito a far funzionare l’aggiornamento a PG13. Ho fatto un backup, spostato le cose di postgres in una directory di backup, ricostruito e ripristinato il backup.

1 Mi Piace

Questo argomento è stato chiuso automaticamente 30 giorni dopo l’ultima risposta. Non sono più consentite nuove risposte.