Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 85B77632C56 for ; Mon, 19 Apr 2010 12:44:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 29493-05 for ; Mon, 19 Apr 2010 15:44:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f176.google.com (mail-pz0-f176.google.com [209.85.222.176]) by mail.postgresql.org (Postfix) with ESMTP id 9FCA7632C2E for ; Mon, 19 Apr 2010 12:44:17 -0300 (ADT) Received: by pzk6 with SMTP id 6so602321pzk.1 for ; Mon, 19 Apr 2010 08:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=sE38jLLl4P9U1UqpcBErBIC4ft8wAk+7/Wje60xB6Ww=; b=VnytXbeq9BSxGf+fsTiFsKH5O1olwPuufem+PYcDaFIOyjzWC7rxxVQKwVZjTvNoFv RMXc46pUHX0eYb9976YJM5Kp8sSoOzDehkundLL5Y2pfXpKcVAZeq4I+09I6ud6ZOdDr 6ZXizOdF064JVmOYs5Ir9LTbNVxBwpeV39KxA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Pz6y7ngtQDPTJypDI53n0Y3ptbQwIOOj0ixSAPTtwHD2ep/fzAYExiMPhxwxF6Q6Hi ss0hX3Gwew407smMX4R/wHnWKf1oQWRnvv1Z1/vlzjDeDYES0OY2X9vCMfST3V7hrlb2 0lzfmPG8/se63nxOLLExymeQY1ocMmW569LVk= MIME-Version: 1.0 Received: by 10.231.146.14 with HTTP; Mon, 19 Apr 2010 08:44:16 -0700 (PDT) Date: Mon, 19 Apr 2010 12:44:16 -0300 Received: by 10.141.100.20 with SMTP id c20mr4347416rvm.249.1271691856198; Mon, 19 Apr 2010 08:44:16 -0700 (PDT) Message-ID: Subject: register a service in Windows From: "Josi Perez (3T Systems)" To: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd13a825a3e35048498d53b X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.888 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201004/257 X-Sequence-Number: 34351 --000e0cd13a825a3e35048498d53b Content-Type: text/plain; charset=ISO-8859-1 Hi, I'm trying to start automatically 3 postgresql services in Windows without success. What I already do: 1) Install postgres8.4.2 binaries for Windows - ok, this service installs automatically without any action mine; 2) Created 2 new clusters: C:\Program Files\PostgreSQL\8.4>bin\initdb --pgdata "C:\data5" --encoding 'UTF8' --locale 'pt_BR.UTF-8' --username postgres C:\Program Files\PostgreSQL\8.4>bin\initdb --pgdata "C:\data7" --encoding 'UTF8' --locale 'pt_BR.UTF-8' --username postgres and changed the postgres.conf contained in each of these directories: in C:\data5: port=5430 in C:\data7: port=5434 3) Started pg_ctl manually and worked with the clusters/databases inside pgAdminIII, including port 5432: C:\data5>"C:\Program Files\PostgreSQL\8.4\bin\pg_ctl" -D "C:\data5" -N postgres842w5430 -l logfile5430 start C:\data7>"C:\Program Files\PostgreSQL\8.4\bin\pg_ctl" -D "C:\data7" -N postgres842w5434 -l logfile5434 start But, I want to start each cluster automatically. 1) If I try to register C:\data5>"C:\Program Files\PostgreSQL\8.4\bin\pg_ctl" register -N "postgres842w5430" -D "C:\data5" -U postgres -P postgres comes the message: can not open the service manager 2) In regedit I can see: HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-8.4 HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Services\pgsql-8.4 but, how can I add a new service? In Installations there is a key "Data Directory" - then, to start another cluster I needed to install binary PostgreSQL again with new parameters? 3) I tried to left these commands at autoexec.nt without success. 4) I tried to use batchrun to add these commands at startup and worked, but I needed an icon to stop the processes. Help. How can I start these 3 data base areas as a service in Windows? Thanks in advance. Josi Perez --000e0cd13a825a3e35048498d53b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

I'm trying to start= automatically 3 postgresql services in Windows without success.

What I already do:
1) Insta= ll postgres8.4.2 binaries for Windows - ok, this service installs automatic= ally without any action mine;

2) Created 2 new clusters:
= C:\Program=20 Files\PostgreSQL\8.4>bin\initdb=20 --pgdata "C:\data5"=A0 --encoding 'UTF8' --locale 'pt= _BR.UTF-8' --username postgres
C:\Program=20 Files\PostgreSQL\8.4>bin\initdb=20 --pgdata "C:\data7"=A0 --encoding 'UTF8' --locale 'pt= _BR.UTF-8' --username postgres

and changed the postgres.conf contained in each of the= se directories:
in C:\data5:=A0 port=3D5430
in C:\data7:=A0 port=3D543= 4

3) Started pg_ctl manually and worked with the clusters/databases inside p= gAdminIII, including port 5432:
C:\data5>"C:\Progr= am=20 Files\PostgreSQL\8.4\bin\pg_ctl"=A0 -D "C:\data5" -N postgre= s842w5430=A0=20 -l logfile5430=A0 start
C:\data7>"C:\Program=20 Files\PostgreSQL\8.4\bin\pg_ctl"=A0 -D "C:\data7" -N postgre= s842w5434=A0=20 -l logfile5434=A0 start


But, I want to start each cluster aut= omatically.
1) If I try to register
C:\data5>"C:\Program File= s\PostgreSQL\8.4\bin\pg_ctl" register -N "postgres842w5430" = -D "C:\data5" -U postgres -P postgres

comes the message:
can not open the service manager

2) In reg= edit I can see:
HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\pos= tgresql-8.4
HKEY_LOCAL_MACHIN= E\SOFTWARE\PostgreSQL\Services\pgsql-8.4

but, how can I add a new service?
In Installations there is a key &q= uot;Data Directory" - then, to start another cluster I needed to insta= ll binary PostgreSQL again with new parameters?

3) I tried to left these commands at autoexec.nt without success.
4)= I tried to use batchrun to add these commands at startup and worked, but I= needed an icon to stop the processes.

Help.
How can I start thes= e 3 data base areas as a service in Windows?

Thanks in advance.
Josi Perez
--000e0cd13a825a3e35048498d53b--