Migration Postgresql 11 à 13 - Tables OIDS

Bonjour à tous,

Je cherche à résoudre les problèmes que je rencontre depuis la migration à la version Bullseye

Mon serveur YunoHost

Matériel: Brique Internet avec VPN Lime1
Version de YunoHost:

# yunohost --version
yunohost: 
  repo: stable
  version: 11.0.9.12
yunohost-admin: 
  repo: stable
  version: 11.0.10
moulinette: 
  repo: stable
  version: 11.0.9
ssowat: 
  repo: stable
  version: 11.0.9

J’ai accès à mon serveur : En SSH | Par la webadmin

Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : oui
Si oui, expliquer:

Migration vers Bullseye

Description du problème

Toute la migration est passée sauf pour postgresql 11 à 13 qui reste en attente.

Tout se passe au mieux. la connection à la base avec la nouvelle version de postgres, sauf une histoire de tables OIDS qui n’est plus supportée. Le processus se met alors en erreur.

Voici le log de la commande # LC_ALL=C pg_upgradecluster -m upgrade 11 main

Stopping old cluster...
Creating new PostgreSQL cluster 13/main ...
/usr/lib/postgresql/13/bin/initdb -D /var/lib/postgresql/13/main --auth-local peer --auth-host md5 --encoding UTF8 --lc-collate en_US.UTF-8 --lc-ctype en_US.UTF-8
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/13/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 13 main start

Ver Cluster Port Status Owner    Data directory              Log file
13  main    5433 down   postgres /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log

/usr/lib/postgresql/13/bin/pg_upgrade -b /usr/lib/postgresql/11/bin -B /usr/lib/postgresql/13/bin -p 5432 -P 5433 -d /etc/postgresql/11/main -D /etc/postgresql/13/main
Finding the real data directory for the source cluster      ok
Finding the real data directory for the target cluster      ok
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
Checking for tables WITH OIDS                               fatal

Your installation contains tables declared WITH OIDS, which is not
supported anymore.  Consider removing the oid column using
    ALTER TABLE ... SET WITHOUT OIDS;
A list of tables with the problem is in the file:
    tables_with_oids.txt

Failure, exiting
Error: pg_upgrade run failed. Logfiles are in /var/log/postgresql/pg_upgradecluster-11-13-main.vsz8
Error during cluster dumping, removing new cluster
Cluster is not running.
Error: could not stop old cluster, please do that manually

Quand je regarde le contenu de ./var/log/postgresql/pg_upgradecluster-11-13-main.RJPk/tables_with_oids.txt l y a effectivement plein de tables concernées.
Je ne sais pas véritablement comment enlever la colonne oid en utilisant “Alter tab”

Your installation contains tables declared WITH OIDS, which is not
supported anymore.  Consider removing the oid column using
    ALTER TABLE ... SET WITHOUT OIDS;

Quelqu’un a-t-il déjà rencontré ce problème et pourrait m’aider à passer outre?

Merci beaucoup !

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.