Обсуждение: Upgrade from 9.1 to 9.10
Hi All, I am relatively new to postgres and need to upgrade postgres 9.1.1 to 9.1.10. As I understood from the documentation that "Upgrading to a minor release does not require a dump and restore; merely stop the database server, install the updated binaries, and restart the server" Is there any step by step instructions available to do this kind of migration? We are currently running "PostgreSQL 9.1.1 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51), 64-bit" We have 3 servers in production. Primary Standby (replication using streaming) Archive (uses slony) Thanks in advance
View this message in context: Upgrade from 9.1 to 9.10
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
View this message in context: Upgrade from 9.1 to 9.10
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
On 10/21/2013 10:57 AM, ramistuni wrote: > Hi All, I am relatively new to postgres and need to upgrade postgres > 9.1.1 to 9.1.10. As I understood from the documentation that > "Upgrading to a minor release does not require a dump and restore; > merely stop the database server, install the updated binaries, and > restart the server" Is there any step by step instructions available > to do this kind of migration? We are currently running "PostgreSQL > 9.1.1 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.1.2 > 20080704 (Red Hat 4.1.2-51), 64-bit" We have 3 servers in production. > Primary Standby (replication using streaming) Archive (uses slony) > Thanks in advance were those postgres servers installed via yum? if so, then simply doing... yum update postgresql91 followed by.... service postgresql-9.1 restart on each machine should suffice. I believe the recommended order is to upgrade the streaming slave first, then the master. I don't know if Slony matters either way (I've never used it) when doing minor upgrades, you should always read ALL the release notes for the versions greater than your existing and up to the new one you'll be installing. Looking at http://www.postgresql.org/docs/9.1/static/release.html I see a couple of the updates require reindexing, also some modifications to citext stuff if you're using that. -- john r pierce 37N 122W somewhere on the middle of the left coast
ramistuni wrote > We are currently running "PostgreSQL 9.1.1 on x86_64-unknown-linux-gnu, > compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51), 64-bit" This is packaging (thus Linux Distro) concern and not that of PostgreSQL proper. As I use Ubuntu and you appear to be using a Red Hat variant I cannot help with specifics but assuming you (or someone) installed PostgreSQL from a (Yum?) package that same mechanism would be used to perform the upgrade. 0) Ensure you have working backups 1) Shut down PostgreSQL on all three servers 2) Run the relevant package upgrade command on each of the servers 3) Start PostgreSQL on all three servers. Not positive about the order but I would think: Shutdown Primary, Standby, Archive Startup Archive, Standby, Primary Suggest you practice in a development/staging/testing virtual environment (snapshot-update-revert) before performing on production machines. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Upgrade-from-9-1-to-9-10-tp5775290p5775296.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
Thanks so much David and John for your quick responses. These databases were recently transitioned to me from a team which are not part of our organization any more. Please bare with my knowledge, but is there any way to find if the past installations were done using YUM? We have been given VMs from some third party and we are responsible for maintaining and installing the database on them. Thanks for your help. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Upgrade-from-9-1-to-9-10-tp5775290p5775311.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
On 10/21/2013 12:00 PM, ramistuni wrote:
Please bare with my knowledge, but is there any way to find if the past installations were done using YUM?
This is all standard redhat installation/administration stuff...
# rpm -qf /usr/pgsql-9.2/bin/postgres(replace 9.2 with 9.1)... if its installed from the PGDG RPM like that, then it came from the postgres yum repository.
postgresql92-server-9.2.5-1PGDG.rhel6.x86_64
also verify they actually installed that repository, and didn't just manually jam the RPMs on there...
# rpm -qf /etc/yum.repos.d/pgdg-9*you should see the 91 version.
pgdg-centos90-9.0-5.noarch
pgdg-centos92-9.2-6.noarch
-- john r pierce 37N 122W somewhere on the middle of the left coast
On 10/21/2013 12:15 PM, John R Pierce wrote:
# rpm -qf /etc/yum.repos.d/pgdg-9*you should see the 91 version.
pgdg-centos90-9.0-5.noarch
pgdg-centos92-9.2-6.noarch
oh, to clarify something. the version of that pgdg-****.noarch repository file is NOT directly related to the subversion of the minor release of postgres, just the version of the yum.repos.d repo file.
-- john r pierce 37N 122W somewhere on the middle of the left coast
Thanks much. It is of great help. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Upgrade-from-9-1-to-9-10-tp5775290p5775534.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.