From: | Thomas Kellerer <spam_eater(at)gmx(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: new instance of postgres on windows |
Date: | 2013-07-18 19:03:56 |
Message-ID: | ks9e61$l0g$1@ger.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Arvind Singh wrote on 18.07.2013 12:22:
> I want to install postgresql for use as the backend to a Windows application.
>
> This seems to be no problem if postgresql is NOT already installed on the system. which is not in this case.
>
> postgresql is already installed and unless the command line parameters contain the superpassword etc of the
>existing installation , the install fails. As I will likely never know the superpassword
>or other account details of any pre-existing postgresql instances and the machine owners may not either.
>
> How to then proceed and install a new instance that can be used by our application.
It's unclear to me if you want to re-use the existing installation and create a new cluser (aka "data directory" by running initdb
or if you want to install a completely new version along the original one (with it's own server and data directory)
If you want to install a completely new instance, just put it into a different directory, and given the service a different name.
Newer Postgres versions don't need a dedicated Windows user account any more.
I usually don't use the installer any more, but I simply unzip the binary distribution, then run initdb with a directory of my choice (making sure the privileges are correctly setup) and then use pg_ctl to register the service. The only thing you need to make sure is to change the port in postgresql.conf before starting the service.
Something like this (batch file commands):
echo superuserpassword> pwfile.txt
unzip postgresql-9.2.4-1-windows-binaries.zip -d c:\MyApp\Postgres
mkdir c:\MyApp\Data
c:\MyApp\Postgres\bin\initdb -D c:\MyApp\Data -U postgres -pwfile=pwfile.txt -E UTF8 -A md5
c:\MyApp\Postgres\bin\pg_ctl register -N my-app-postgres -S auto
Again: you have to make sure that the data directory has all the right privileges!
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2013-07-18 19:12:53 | Re: new instance of postgres on windows |
Previous Message | Eduardo Morras | 2013-07-18 18:48:28 | Re: new instance of postgres on windows |