The officially official Devuan Forum!

You are not logged in.

#1 2018-04-01 14:44:38

Geoff 42
Member
Registered: 2016-12-15
Posts: 176  

PostgreSQL in upgrade - Jessie to Ascii

During the upgrade from Jessie to Ascii, PostgreSQl produces the following message :-

Obsolete major version 9.4

The PostgreSQL version 9.4 is obsolete, but the server or client packages are still installed. Please install the latest packages (postgresql-9.6 and postgresql-client-9.6) and upgrade the existing  clusters with pg_upgradecluster (see manpage).
 
Please be aware that the installation of postgresql-9.6 will automatically create a default cluster 9.6/main. If you want to upgrade the 9.4/main cluster, you need to remove the already existing 9.6 cluster (pg_dropcluster --stop 9.6 main, see manpage for details).

The old server and client packages are no longer supported. After the existing clusters are upgraded, the postgresql-9.4 and postgresql-client-9.4 packages should be removed.                                                                                                   

Please see /usr/share/doc/postgresql-common/README.Debian.gz for details.

PostgreSQL is not currently running as I had it under runit.

so, as myself :-

$ pg_lsclusters 
Ver Cluster Port Status Owner    Data directory               Log file
9.4 main    5432 down   postgres /var/lib/postgresql/9.4/main /var/log/postgresql/postgresql-9.4-main.log
9.6 main    5433 down   postgres /var/lib/postgresql/9.6/main /var/log/postgresql/postgresql-9.6-main.log

as root :-

# pg_dropcluster --stop 9.6 main
$ pg_lsclusters 
Ver Cluster Port Status Owner    Data directory               Log file
9.4 main    5432 down   postgres /var/lib/postgresql/9.4/main /var/log/postgresql/postgresql-9.4-main.log
# pg_upgradecluster 9.4 main
Disabling connections to the old cluster during upgrade...
Restarting old cluster with restricted connections...
Creating new cluster 9.6/main ...
  config /etc/postgresql/9.6/main
  data   /var/lib/postgresql/9.6/main
  locale en_GB.UTF-8
  socket /var/run/postgresql
  port   5433
Disabling connections to the new cluster during upgrade...
Roles, databases, schemas, ACLs...
Fixing hardcoded library paths for stored procedures...
Upgrading database postgres...
Analyzing database postgres...
Fixing hardcoded library paths for stored procedures...
Upgrading database user1...
Analyzing database user1...
Fixing hardcoded library paths for stored procedures...
Upgrading database template1...
Analyzing database template1...
Re-enabling connections to the old cluster...
Re-enabling connections to the new cluster...
Copying old configuration files...
Copying old start.conf...
Copying old pg_ctl.conf...
Stopping target cluster...
Stopping old cluster...
Disabling automatic startup of old cluster...
Configuring old cluster to use a different port (5433)...
Starting target cluster on the original port...
Success. Please check that the upgraded cluster works. If it does,
you can remove the old cluster with

  pg_dropcluster 9.4 main

From ps I can see that postgresql/9.6 is now running, but is the data all set up?

$ pg_dump -f 2018-04-01-dump.sql
pg_dump: server version: 9.6.7; pg_dump version: 9.4.15
pg_dump: aborting because of server version mismatch
$ which pg_dump
/usr/lib/postgresql/9.4/bin/pg_dump
$ /usr/lib/postgresql/9.6/bin/pg_dump -f 2018-04-01-dump.sql
$ v 2018-04-01-dump.sql 
-rw-r--r-- 1 user1 user1 79630 Apr  1 14:15 2018-04-01-dump.sql
$ xxdiff 2017-12-15-dump.sql 2018-04-01-dump.sql

There are minor differences in the settings for tables, such as the removal of Tablespace:,
which look as though they are caused by the new version. The actual data looks good. I had the postgresql path in my .profile, so I have now updated that.

$ psql --no-align --pset=footer=off --file=events_view.sql

produces the correct data.

But does LibreOffice Base still work with PostgreSQL?

While I extract the data with psql and reformat it into HTML with a bit of Perl, I use LibreOffice Base for data input, with a form for the main entry and using its simple tables for the subsidiary tables. This still works, although I have not actually tried entering any data yet! This uses UCanAccess :-

https://askubuntu.com/questions/187389/ … 571#519571

So everything appears to be running correctly.

Geoff

Offline

#2 2018-04-01 15:08:28

Geoff 42
Member
Registered: 2016-12-15
Posts: 176  

Re: PostgreSQL in upgrade - Jessie to Ascii

I did spot the following during the dist-upgrade :-

Processing triggers for postgresql-common (165+deb8u3) ...
supported-versions: WARNING! Unknown distribution: devuan
/usr/share/postgresql-common/supported-versions: 64: /usr/share/postgresql-common/supported-versions: ID_LIKE: parameter not set
/usr/share/postgresql-common/supported-versions: 67: /usr/share/postgresql-common/supported-versions: ID_LIKE: parameter not set
Please submit this as a bug report to your distribution.

Geoff

Offline

Board footer