Upgrade from 1.7.0 beta 5 to beta 7 failed. Postgresql error


(Daniela) #1

It seems that we have postgresql 9.3 instead 9.5.

Removing postgresql-contrib-9.5 (9.5.5-1.pgdg16.04+1) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/share/postgresql/9.5/man/man1/postmaster.1.gz because link group postmaster.1.gz is broken
update-alternatives: error: error creating symbolic link '/usr/share/man/man1/postmaster.1.gz.dpkg-tmp': No such file or directory
dpkg: error processing package postgresql-contrib-9.5 (--remove):
 subprocess installed pre-removal script returned error exit status 2
dpkg: postgresql-9.5: dependency problems, but removing anyway as you requested:
 postgresql-contrib-9.5 depends on postgresql-9.5 (= 9.5.5-1.pgdg16.04+1).

Removing postgresql-9.5 (9.5.5-1.pgdg16.04+1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
Removing postgresql-client-9.5 (9.5.5-1.pgdg16.04+1) ...
Processing triggers for postgresql-common (177.pgdg16.04+1) ...
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
Errors were encountered while processing:
 postgresql-contrib-9.5



FAILED
--------------------
Pups::ExecError: apt-get remove -y postgresql-9.5 postgresql-client-9.5 postgresql-contrib-9.5 failed with return #<Process::Status: pid 16 exit 100>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params "apt-get remove -y postgresql-9.5 postgresql-client-9.5 postgresql-contrib-9.5"
6608265d4e514f4433369a755976e57faee4fc16d73eb82241baed926f4dd310
 FAILED TO BOOTSTRAP  please scroll up and look for earlier error messages, there may be more than one

I read other topics with this error:


and

So, just to be sure, I need to build a new container with postgresql 9.5 and, after, a new fresh installation of Discourse importing my last backup?
Is this the correct way or I have something else to do before (or after)?

Thanks


Trouble while upgrading docker
(Ralf Jung) #2

I also seem to be in for this. I have to say this is highly disappointing. I never before encountered an application that was unable to do proper upgrades, and instead forced admins to go through a lot of manual hoops for what should be a simple database upgrade. Even worse, we are told this after the normal upgrade procedure fails with obscure errors. I’m not looking forward to see what else I’ll have to do just to install some updates…


(Sam Saffron) #3

Oh my, there is nothing “simple” about a database upgrade, especially a postgres database upgrade that has incompatible binary formats between major versions.

We do a best effort, if that fails you have to get your hands dirty a bit.

@Trash how was your issue resolved?


(Daniela) #4

It’s not resolved for now.

We also have other problems with some activation emails not sent (probably for some dns problem), so we decided to reinstall all to fix everything (we’re waiting the return of our founder, the only one who can redirect the dns).

@RalfJung we are using discourse from the beginning, so our installation is very old. Whereas discourse is in constant development and we are not on stable branch, some problems can happen.

BTW we are constantly online from 4 or 5 years.
Sometimes happens that some plugin broken the site, but we just comment them on the yaml file to resolve the issue and wait for the fix needed.
IMO it’s a small price to pay to have a forum with many (free) features implemented on each update.


(Sam Saffron) #5

I would recommend doing a full backup, then spinning a new instance and restoring to it.


(Daniela) #6

Yes, we are planning exactly this.


(Daniela) #7

Today (finally) we migrated to the new server restoring the last backup. :tada: :confetti_ball:
The problem is definitely solved and this topic can be closed.
Thanks


(Jeff Atwood) #8