- #Postgresql 9.2 install dblink update
- #Postgresql 9.2 install dblink upgrade
- #Postgresql 9.2 install dblink full
# if you have further postgis extensions installes, also update them:ĪLTER EXTENSION postgis_tiger_geocoder UPDATE Īfter this, check the postgis version with # first drop the cluster which was created when upgradeing to buster
#Postgresql 9.2 install dblink upgrade
Use the Debian script pg_upgradecluster with method "-upgrade" to upgrade PostgreSQL without dumping and restoring (on filesystem level). Use pg_upgradecluster to upgrade your databases e.g a PL/v8 compiled against PostgreSQL 9.6 will not work against PostgreSQL 11. That goes for every other PostgreSQL extension in existence. They may have the same name, but they are incompatible with each other. An extension compiled for PostgreSQL 9.5 will not work for PostgreSQL 9.6. A PostGIS compiled against say PostgreSQL 9.6 will not work with any other PostgreSQL Minor version or Major version. Important: "Don't ever copy an extension lib from an older major PostgreSQL to a newer major PostgreSQL (for 9 series it's minor version, for 10 and on it's major version). This info is taken from, see this link for further details.Ĭp /usr/lib/postgresql/11/lib/postgis-2.5.so /usr/lib/postgresql/11/lib/postgis-2.3.soĬp /usr/lib/postgresql/11/lib/rtpostgis-2.5.so /usr/lib/postgresql/11/lib/rtpostgis-2.3.so
Suggested command: sudo -u postgres reindexdb -allĬopy or Link the new postgis lib to the old name Important: Due to a change in the glibc locale data in Buster, PostgreSQL indexes need to be reindexed immediately after upgrading the locales or locales-all packages, before putting back the database into production (info taken from ). You may also find more concise instructions using you favorite search machine. See the information at for details on the upgrade procedure. # you may also use the -verbose option to make this a bit more entertaining # usually the main PostgreSQL database runs on port 5432, so set accordingly Refer to for details on taking PostgreSQL backups. You may skip this step if feel safe to do so.
#Postgresql 9.2 install dblink full
To be safe, make a full dump and perhaps a file system level backup of all your databases before beginning with the upgrade. If you want to avoid this, you can follow this procedure for doing a soft-upgrade from Debian Stretch to Buster. As this may be OK for small databases, many systems run huge databases with terabytes of data and the whole dump/restore process can take a lot of time during which you have to keep your database in read-only for consistency. Theoretically, for upgrading PostgreSQL together with PostGIS, you have to do a "hard" upgrade which means dumping the old database in Stretch, upgrading to Buster, and then restoring the database from the dump.
Fortunately though, Debian Buster preserves the required libraries from postgresl-9.6-postgis when upgrading from Debian Stretch, making this task a lot easier than it was for the Jessie to Stretch upgrade (which is documented below). Unfortunately, doing so in Debian usually fails, because each PostgreSQL version comes with its own postgis library, and library versions use to change between different Debian versions. In theory, upgrading PostgreSQL with PostGIS should be straightforward with the ALTER EXTENSION postgis UPDATE TO and pg_upgradecluster commands by hand. From PostGIS 2.3 to PostGIS 2.5 (Debian Stretch to Buster with PostgreSQL 9.6 to PostgreSQL 11)