- The versions are not binary compatible, so I have had to dump and restore all databases that I wanted to see after upgrade (no need to dump system templates like template0 and template1) Replace gis1 gis2 gis3 with a space-delimited list of the databases which you want to preserve after the upgrade. This command will result in a set of binary dump files, one file per database. The file names will containing the name of the database and the date of the dump. You will also need a list of database users. You can get the list with \du command in psql.
- Remove old packages (this is likely optional, postgresql versions can co-exist but I did not try)
- Install new postgresql version following these instructions: https://wiki.postgresql.org/wiki/Apt (automatic install of 9.3, may need to specify version explicitly)
- By this time you should have postgreql server up and running but not responding to external connections. This is a great time to restore dumped databases. Typical cycle for restoring a database includes:
- Recreate all database users
- Create the database
- Recreate extensions, PostGIS 2.0 uses extension mechanism and there is no need to use scripts restore all other extensions that are needed by the database
- Restore the database from the dump file
- Now check the content of the err.txt file, it should be empty
- However, if you see errors because of any users or extensions missing, drop the database, repeat all the previous steps and also create the missing users and extensions.
- If you see an error like 'invalid command \N', first fix all other problems with the databases and repeat the import again, this error will be likely gone.
- Reclaim space and update statistics:
- modify hba file to your need (details), enable listening on external address in postgresql.conf and finally do
Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts
Saturday, November 2, 2013
Upgrading PostgreSQL 9.1/PostGIS 1.5 to PostgreSQL 9.3/PostGIS 2.1 on Ubuntu 12.04 (precise)
Newer versions of PostgreSQL and PostGIS (9.3 and 2.1) have some nice features like materialized view and raster support respectively. My experience of upgrading both packages from version 9.3 and 1.5 was rather painless and is outlined below.
Sunday, January 31, 2010
ORF images in FC12 and Karmic
I have an Olympus 500 camera and I want to be able to preview Olympus raw files (ORF extension) in Nautilus. It did not work out of the box neither in FC12 nor in Karmic. On Fedora 12 I have installed ufraw and ufraw-gimp packages. On Karmic I have installed gimp-dcraw and gnome-raw-thumbnailer packages. This also installs ORF support in GIMP.
Sunday, January 10, 2010
Maemo SDK on 64-bit Karmic
Instructions are here: http://wiki.maemo.org/Documentation/Maemo5_Final_Installation
- First go to section x86-64 kernel and disable VDSO in kernel
- add abi.vsyscall32 = 0 to /etc/sysctl.conf to make the change permanent
- Then follow instructions in Installation Of X86-64 Debian Based Distributions section
Friday, December 25, 2009
Bug in Chromium
Chromium on Ubuntu has a really stupid bug: the window becomes extremely long, meters below the bottom of the screen.
Update 1: in Google bug tracking system http://code.google.com/p/chromium/issues/detail?id=30995
Update 2: problem fixed
Update 1: in Google bug tracking system http://code.google.com/p/chromium/issues/detail?id=30995
Update 2: problem fixed
Wednesday, December 23, 2009
LaTeX+Emacs on Ubuntu Karmic
I am used to LaTeX + Aquamacs for writing papers. I tried to reproduce the same environment on Ubuntu Karmic. The easiest way to do that:
This is a hell of a download (~500MB) so wait.
To enable Reftex and Flyspell in emacs add the folowing to ~/.emacs file:
and this is pretty much it. Now when you open a .tex in Emacs file you will see LaTeX and Ref menu.
BTW, gedit is not bad for editing LaTeX files too but not as many features as Emacs has and no in-text preview of the formulas.
This is a hell of a download (~500MB) so wait.
To enable Reftex and Flyspell in emacs add the folowing to ~/.emacs file:
and this is pretty much it. Now when you open a .tex in Emacs file you will see LaTeX and Ref menu.
BTW, gedit is not bad for editing LaTeX files too but not as many features as Emacs has and no in-text preview of the formulas.
Labels:
Emacs,
Emacs Lisp,
Languages,
Latex,
Lisp,
Programming,
TeX,
Ubuntu
Subscribe to:
Posts (Atom)