Thread: running multiple versions
Hi
Is it possible to run more than one instance of Postgresql on Windows?
Can you run different versions simultaneously?
If so can you run different minor versions or only different major versions?
If possible how do you do this?
Thanks
H.F.
Is it possible to run more than one instance of Postgresql on Windows?
Can you run different versions simultaneously?
If so can you run different minor versions or only different major versions?
If possible how do you do this?
Thanks
H.F.
On 02/16/12 2:11 PM, Heine Ferreira wrote: > Is it possible to run more than one instance of Postgresql on Windows? > Can you run different versions simultaneously? > If so can you run different minor versions or only different major > versions? > If possible how do you do this? install to different directories, configure to use different port numbers. -- john r pierce N 37, W 122 santa cruz ca mid-left coast
Hi, On Fri, 2012-02-17 at 00:11 +0200, Heine Ferreira wrote: > [...] > Is it possible to run more than one instance of Postgresql on Windows? Yes. > Can you run different versions simultaneously? Yes > If so can you run different minor versions or only different major versions? Only major versions. > If possible how do you do this? You need to have a data directory per version, and you need to set a different port number. Which is mostly what you'll have using the PostgreSQL Windows installer. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
On Thursday, February 16, 2012 2:17:33 pm Guillaume Lelarge wrote: > Hi, > > > If so can you run different minor versions or only different major > > versions? > > Only major versions. This is a limitation of the Postgres Windows Installer? Compiling from source would allow running different minor versions. -- Adrian Klaver adrian.klaver@gmail.com
On Thu, 2012-02-16 at 15:00 -0800, Adrian Klaver wrote: > On Thursday, February 16, 2012 2:17:33 pm Guillaume Lelarge wrote: > > Hi, > > > > > > If so can you run different minor versions or only different major > > > versions? > > > > Only major versions. > > This is a limitation of the Postgres Windows Installer? Compiling from source > would allow running different minor versions. > Yes, that's right, except that I wouldn't call that a limitation. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
On 02/16/12 3:00 PM, Adrian Klaver wrote: > This is a limitation of the Postgres Windows Installer? Compiling from source > would allow running different minor versions. probably the windows service names is the sticking point. you'd need to create a custom service, which could be done with the 'sc' command (windows built in utility). E:\>sc qc postgresql-8.4 [SC] GetServiceConfig SUCCESS SERVICE_NAME: postgresql-8.4 TYPE : 10 WIN32_OWN_PROCESS START_TYPE : 2 AUTO_START ERROR_CONTROL : 1 NORMAL BINARY_PATH_NAME : D:/postgres/8.4/bin/pg_ctl.exe runservice -N "postgresql-8.4" -D "D:/postgres/8.4/data" -w LOAD_ORDER_GROUP : TAG : 0 DISPLAY_NAME : postgresql-8.4 - PostgreSQL Server 8.4 DEPENDENCIES : RPCSS SERVICE_START_NAME : .\postgres so, if I was to install 8.4.somethignelse into a different directory, I'd need to create a seperate service for it, like... sc create postgres-8.4.5 binPath="D:/postgres/8.4.5/bin/pg_ctl.exe runservice -N postgresql-8.4.5 -D D:/postgres/8.4.5/data -w" type=own start=auto error=normal DisplayName="postgresql-8.4.5 - PostgreSQL Server 8.4.5" depend=RPCSS obj=.\postgres (thats all one gnarly command line) then sc start postgres-8.4.5 -- john r pierce N 37, W 122 santa cruz ca mid-left coast
On Thursday, February 16, 2012 3:03:45 pm Guillaume Lelarge wrote: > On Thu, 2012-02-16 at 15:00 -0800, Adrian Klaver wrote: > > On Thursday, February 16, 2012 2:17:33 pm Guillaume Lelarge wrote: > > > Hi, > > > > > > > If so can you run different minor versions or only different major > > > > versions? > > > > > > Only major versions. > > > > This is a limitation of the Postgres Windows Installer? Compiling from > > source would allow running different minor versions. > > Yes, that's right, except that I wouldn't call that a limitation. Well from a purely functional standpoint: 1) A user asked if it could be done. 2) The Postgres program allows it to be done. 3) The Windows Installer does not. That looks like a limit to me:) I am not saying it is good or bad just that it is a option that does not exist. -- Adrian Klaver adrian.klaver@gmail.com
Run them in different locations with different addresses (5432 & 5433 for example) see this thread:http://archives.postgresql.org/pgsql-admin/2008-02/msg00084.php Brent Wood GIS/DBA consultant NIWA +64 (4) 4 386-0300 ________________________________________ From: pgsql-general-owner@postgresql.org [pgsql-general-owner@postgresql.org] on behalf of Heine Ferreira [heine.ferreira@gmail.com] Sent: Friday, February 17, 2012 11:11 AM To: pgsql-general@postgresql.org Subject: [GENERAL] running multiple versions Hi Is it possible to run more than one instance of Postgresql on Windows? Can you run different versions simultaneously? If so can you run different minor versions or only different major versions? If possible how do you do this? Thanks H.F. -- Please consider the environment before printing this email. NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.
On 02/16/12 3:10 PM, John R Pierce wrote: > so, if I was to install 8.4.somethignelse into a different directory, > I'd need to create a seperate service for it, like... > > sc create postgres-8.4.5 binPath="D:/postgres/8.4.5/bin/pg_ctl.exe > runservice -N postgresql-8.4.5 -D D:/postgres/8.4.5/data -w" > type=own start=auto error=normal > DisplayName="postgresql-8.4.5 - PostgreSQL Server 8.4.5" depend=RPCSS > obj=.\postgres let me also point out here, I was careful to avoid spaces in the postgres path. I don't know how or even if you can quote the paths properly in the binPath= argument to 'sc create' the obj= is the username that the service runs as, .\ meaning local as opposed to domain. -- john r pierce N 37, W 122 santa cruz ca mid-left coast