X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0D3759FB0D1 for ; Wed, 26 Jul 2006 14:42:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 39700-06 for ; Wed, 26 Jul 2006 14:42:08 -0300 (ADT) X-Greylist: delayed 00:15:02.312266 by SQLgrey- Received: from mail1.giacom.net (mail1.giacom.net [194.131.240.50]) by postgresql.org (Postfix) with ESMTP id CAC339FAD5A for ; Wed, 26 Jul 2006 14:42:07 -0300 (ADT) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----_SmarterMail_NextPart_3212372524166861 Date: Wed, 26 Jul 2006 18:26:28 +0100 Subject: Starting PostgreSQL from a windows application From: Hovik Avedian Reply-To: havedian@ebasetech.com To: CC: Message-ID: X-Declude-Sender: havedian@ebasetech.com [127.0.0.1] X-Spam-Tests-Failed: None [0] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.63 tagged_above=0 required=5 tests=HTML_10_20, HTML_MESSAGE, MIME_BOUND_NEXTPART X-Spam-Level: * X-Archive-Number: 200607/222 X-Sequence-Number: 22468 This is a multi-part message in MIME format. ------_SmarterMail_NextPart_3212372524166861 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello,=0D=0A=0D=0AI have installed Postures on a Windows server and it star= ts as a service and all is OK.=0D=0A=0D=0AI have 2 questions:=0D=0A=0D=0A1.= I need to be able to wrap PostgreSQL as part of my application and, theref= ore, start it as part of my app. start-up. I know that pg_ctl start is the = command, but as your documentation clearly states, PostgreSQL can only be s= tarted by a non-privileged user. Here lies my problem.=0D=0AMost software n= eeds a privileged user to start it. So how can I start PostgreSQL as a diff= erent user from the one which needs to be logged in to start the other soft= ware?=0D=0A=0D=0A2. How do I give my users a totally new database. Is backu= p/restore the only mechanism?=0D=0ACan I copy (parts of) the data directory= , from one installation of PostgreSQL to another?=0D=0A=0D=0AThanks in adva= nce for your support,=0D=0A=0D=0AHovik Avedian=0D=0ASenior Consultant=0D=0A= Ebase Technology Ltd.=0D=0A=0D=0A ------_SmarterMail_NextPart_3212372524166861 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

I have installed Postures= on a Windows server and it starts as a service and all is OK.

I= have 2 questions:

1. I need to be able to wrap PostgreSQL as pa= rt of my application and, therefore, start it as part of my app. start-up. = I know that pg_ctl start is the command, but as your documentation clearly = states, PostgreSQL can only be started by a non-privileged user. Here lies = my problem.
Most software needs a privileged user to start it. So how = can I start PostgreSQL as a different user from the one which needs to be l= ogged in to start the other software?

2. How do I give my users = a totally new database. Is backup/restore the only mechanism?
Can I co= py (parts of) the data directory, from one installation of PostgreSQL to an= other?

Thanks in advance for your support,

Hovik Aved= ian
Senior Consultant
Ebase Technology Ltd.


------_SmarterMail_NextPart_3212372524166861--