pg_upgradecluster 8.2 main

February 12, 2009 by pedro mota

PostgreSQL 8.3 is here. After apt-get’ing it, the upgrade didn’t move the 8.2 cluster up. Having 8.2 running in a custom port, made 8.3 go use the standard 5432 port.\r\n8.3 created a main cluster.\r\n\r\nCheck ports:\r\n$ sudo netstat -anput | grep postgres\r\n\r\nCheck wich configuration files and wich versions are running:\r\n$ ps -Af | grep postgres\r\n\r\npg_upgradecluster when upgrading the existing PostgreSQL cluster, will check ports of the new and old version (check both 8.2 and /etc/postgresql/8.3/main$ grep 'port' postgresql.conf), and make the newer version use the older version’s port number. Then the older version will use an available port number. This keeps the original Port # in use.\r\n\r\nStop and drop the newly created 8.3 main cluster:\r\n$ sudo pg_dropcluster --stop 8.3 main\r\n\r\nTime to upgrade the 8.2 main cluster to 8.3\r\n$ sudo pg_upgradecluster 8.2 main\r\n\r\nAfter checking everything is ok we could remove the older cluster:\r\n$ sudo pg_dropcluster --stop 8.2 main\r\n\r\nand \“apt-get remove\” the 8.2 version.\r\n\r\ndocs:\r\n$ man pg_dropcluster\r\n$ man pg_upgradecluster

© 2018 | Follow on Twitter | pedro mg & Hugo