Thread: PosgreSQL Service does not Start In Vista

PosgreSQL Service does not Start In Vista

From
Inigo Barandiaran
Date:
Hi all.

We have included PostgreSQL 8.3(exe) installation in the installation
process of our software, and we are experimenting some errors, mainly
related with Windows Vista. The problem is that the installation of
PosgreSQL seems to be correct, but the service is not started afterwards. I
tried to start it manually but takes a lot of time and finally a windows
error appears telling that "the PostgreSQL Database server 8.3 service on
Local Computer Started and then stopped. Some services stop automatically if
they have no work to do"

I've read something in the forum related with the pg_hba.conf configuration
file. We distribute this file in the client machines with the follOwing
lines:

# IPv4 local connections:
host    all                             all         127.0.0.1/32
md5
host    DATABASE_NAME         all         0.0.0.0 0.0.0.0      md5
# IPv6 local connections:
#host    all         all         ::1/128               md5

Do you know where could be the problem?
Thanks in advance for any suggestion.
Best,
--
View this message in context: http://www.nabble.com/PosgreSQL-Service-does-not-Start-In-Vista-tp25255182p25255182.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: PosgreSQL Service does not Start In Vista

From
Raymond O'Donnell
Date:
On 02/09/2009 11:39, Inigo Barandiaran wrote:
> PosgreSQL seems to be correct, but the service is not started afterwards. I
> tried to start it manually but takes a lot of time and finally a windows
> error appears telling that "the PostgreSQL Database server 8.3 service on
> Local Computer Started and then stopped. Some services stop automatically if
> they have no work to do"

There should be more detail in the Postgres logs - have a look there and
see what it says.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

Re: PosgreSQL Service does not Start In Vista

From
Inigo Barandiaran
Date:
Thanks Raymond.

Where can I find that log?
I took a look in the bin folder where the service, and there is no log
there.

Thanks in advance!


Raymond O'Donnell wrote:
>
> On 02/09/2009 11:39, Inigo Barandiaran wrote:
>> PosgreSQL seems to be correct, but the service is not started afterwards.
>> I
>> tried to start it manually but takes a lot of time and finally a windows
>> error appears telling that "the PostgreSQL Database server 8.3 service on
>> Local Computer Started and then stopped. Some services stop automatically
>> if
>> they have no work to do"
>
> There should be more detail in the Postgres logs - have a look there and
> see what it says.
>
> Ray.
>
> ------------------------------------------------------------------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> rod@iol.ie
> Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
> ------------------------------------------------------------------
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>

--
View this message in context: http://www.nabble.com/PosgreSQL-Service-does-not-Start-In-Vista-tp25255182p25255298.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: PosgreSQL Service does not Start In Vista

From
Inigo Barandiaran
Date:
Sorry, I've just found it in: data\pg_log
I'm going to take a look.
Thanks again :)


Inigo Barandiaran wrote:
>
> Thanks Raymond.
>
> Where can I find that log?
> I took a look in the bin folder where the service, and there is no log
> there.
>
> Thanks in advance!
>
>
> Raymond O'Donnell wrote:
>>
>> On 02/09/2009 11:39, Inigo Barandiaran wrote:
>>> PosgreSQL seems to be correct, but the service is not started
>>> afterwards. I
>>> tried to start it manually but takes a lot of time and finally a windows
>>> error appears telling that "the PostgreSQL Database server 8.3 service
>>> on
>>> Local Computer Started and then stopped. Some services stop
>>> automatically if
>>> they have no work to do"
>>
>> There should be more detail in the Postgres logs - have a look there and
>> see what it says.
>>
>> Ray.
>>
>> ------------------------------------------------------------------
>> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
>> rod@iol.ie
>> Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
>> ------------------------------------------------------------------
>>
>> --
>> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-general
>>
>>
>
>

--
View this message in context: http://www.nabble.com/PosgreSQL-Service-does-not-Start-In-Vista-tp25255182p25255321.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: PosgreSQL Service does not Start In Vista

From
Iñigo Barandiaran
Date:
Thanks Raymond.<br /><br /> Where can I find that log?<br /> I took a look in the bin folder where the service, and
thereis no log there.<br /><br /> Thanks in advance!<br /><blockquote cite="mid:4A9E4C9E.20207@iol.ie" type="cite"><pre
wrap="">On02/09/2009 11:39, Inigo Barandiaran wrote: </pre><blockquote type="cite"><pre wrap="">PosgreSQL seems to be
correct,but the service is not started afterwards. I
 
tried to start it manually but takes a lot of time and finally a windows
error appears telling that "the PostgreSQL Database server 8.3 service on
Local Computer Started and then stopped. Some services stop automatically if
they have no work to do"   </pre></blockquote><pre wrap="">
There should be more detail in the Postgres logs - have a look there and
see what it says.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
<a class="moz-txt-link-abbreviated" href="mailto:rod@iol.ie">rod@iol.ie</a>
Galway Cathedral Recitals: <a class="moz-txt-link-freetext"
href="http://www.galwaycathedral.org/recitals">http://www.galwaycathedral.org/recitals</a>
------------------------------------------------------------------
 </pre></blockquote><br />

Re: PosgreSQL Service does not Start In Vista

From
Thomas Kellerer
Date:
Inigo Barandiaran, 02.09.2009 12:39:
> We have included PostgreSQL 8.3(exe) installation in the installation
> process of our software, and we are experimenting some errors, mainly
> related with Windows Vista. The problem is that the installation of
> PosgreSQL seems to be correct, but the service is not started afterwards. I
> tried to start it manually but takes a lot of time and finally a windows
> error appears telling that "the PostgreSQL Database server 8.3 service on
> Local Computer Started and then stopped. Some services stop automatically if
> they have no work to do"

Most probably it is a problem with the access privileges for the data directory. Make sure the postgres service account
hasfull write privileges on the data directory. 

If your data directory is located in "Program Files" this is not a surprise because that directory is write protected
forregular users (for a good reason) 

Thomas

Re: PosgreSQL Service does not Start In Vista

From
Inigo Barandiaran
Date:
Thanks Thomas!.
That sounds very interesting. How can I set privileges for writing in data
directory for the postgres  user account if it is located in "Program Files"
Directory?, Or is it better to directly install posgreSQL out of "Program
Files" Directory?

Thanks in advance!

I've check

Thomas Kellerer wrote:
>
> Inigo Barandiaran, 02.09.2009 12:39:
>> We have included PostgreSQL 8.3(exe) installation in the installation
>> process of our software, and we are experimenting some errors, mainly
>> related with Windows Vista. The problem is that the installation of
>> PosgreSQL seems to be correct, but the service is not started afterwards.
>> I
>> tried to start it manually but takes a lot of time and finally a windows
>> error appears telling that "the PostgreSQL Database server 8.3 service on
>> Local Computer Started and then stopped. Some services stop automatically
>> if
>> they have no work to do"
>
> Most probably it is a problem with the access privileges for the data
> directory. Make sure the postgres service account has full write
> privileges on the data directory.
>
> If your data directory is located in "Program Files" this is not a
> surprise because that directory is write protected for regular users (for
> a good reason)
>
> Thomas
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>

--
View this message in context: http://www.nabble.com/PosgreSQL-Service-does-not-Start-In-Vista-tp25255182p25256915.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: PosgreSQL Service does not Start In Vista

From
Thomas Kellerer
Date:
Inigo Barandiaran, 02.09.2009 14:53:
> Thanks Thomas!.
> That sounds very interesting. How can I set privileges for writing in data
> directory for the postgres  user account?.
Right click on the directory and choose "Security". Anything after that is off-topic in this list ;)


> Or is it very to directly install
> posgreSQL out of "Program Files" Directory?

Putting application data into "Program Files" is a very bad idea in general, not only for Postgres.
I'm not sure if the current installer still suggests this, but this was a major flaw in the installers I have used
before.The installer does offer the possibility to change this, but how many people really take the time to read the
wizardpages? 

Thomas

Re: PosgreSQL Service does not Start In Vista

From
Inigo Barandiaran
Date:
Thanks Thomas! Your help is very appreciated :)
I'm going to test what you suggest.

Thanks again!!!!!

Thomas Kellerer wrote:
>
> Inigo Barandiaran, 02.09.2009 14:53:
>> Thanks Thomas!.
>> That sounds very interesting. How can I set privileges for writing in
>> data
>> directory for the postgres  user account?.
> Right click on the directory and choose "Security". Anything after that is
> off-topic in this list ;)
>
>
>> Or is it very to directly install
>> posgreSQL out of "Program Files" Directory?
>
> Putting application data into "Program Files" is a very bad idea in
> general, not only for Postgres.
> I'm not sure if the current installer still suggests this, but this was a
> major flaw in the installers I have used before. The installer does offer
> the possibility to change this, but how many people really take the time
> to read the wizard pages?
>
> Thomas
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>

--
View this message in context: http://www.nabble.com/PosgreSQL-Service-does-not-Start-In-Vista-tp25255182p25260223.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: PosgreSQL Service does not Start In Vista

From
Inigo Barandiaran
Date:
Thanks Thomas!.
That sounds very interesting. How can I set privileges for writing in data
directory for the postgres  user account if it is located in "Program Files"
Directory?, Or is it better to directly install posgreSQL out of "Program
Files" Directory?

Thanks in advance!

I've check

Thomas Kellerer wrote:
>
> Inigo Barandiaran, 02.09.2009 12:39:
>> We have included PostgreSQL 8.3(exe) installation in the installation
>> process of our software, and we are experimenting some errors, mainly
>> related with Windows Vista. The problem is that the installation of
>> PosgreSQL seems to be correct, but the service is not started afterwards.
>> I
>> tried to start it manually but takes a lot of time and finally a windows
>> error appears telling that "the PostgreSQL Database server 8.3 service on
>> Local Computer Started and then stopped. Some services stop automatically
>> if
>> they have no work to do"
>
> Most probably it is a problem with the access privileges for the data
> directory. Make sure the postgres service account has full write
> privileges on the data directory.
>
> If your data directory is located in "Program Files" this is not a
> surprise because that directory is write protected for regular users (for
> a good reason)
>
> Thomas
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>

--
View this message in context: http://www.nabble.com/PosgreSQL-Service-does-not-Start-In-Vista-tp25255182p25256915.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: PosgreSQL Service does not Start In Vista

From
Inigo Barandiaran
Date:
Hi.

I've tried to install postgree in Vista in program files and the service
does not start. I gave manually full privileges to the posgre user to data
folder, and still the service does not start.

Finally, I installed posgre database out of "program Files" as Thomas
suggested and I gave full privileges to posgre user to data folder and
everything works correctly :)

Do you know how can I install posgre in "program Files" in Vista?. I might
some users of my application would like to install it  in "porgram Files"
folder :(. How can I Solve this problem?

Thanks in advance!!!


Thomas Kellerer wrote:
>
> Inigo Barandiaran, 02.09.2009 14:53:
>> Thanks Thomas!.
>> That sounds very interesting. How can I set privileges for writing in
>> data
>> directory for the postgres  user account?.
> Right click on the directory and choose "Security". Anything after that is
> off-topic in this list ;)
>
>
>> Or is it very to directly install
>> posgreSQL out of "Program Files" Directory?
>
> Putting application data into "Program Files" is a very bad idea in
> general, not only for Postgres.
> I'm not sure if the current installer still suggests this, but this was a
> major flaw in the installers I have used before. The installer does offer
> the possibility to change this, but how many people really take the time
> to read the wizard pages?
>
> Thomas
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>

--
View this message in context: http://www.nabble.com/PosgreSQL-Service-does-not-Start-In-Vista-tp25255182p25275277.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: PosgreSQL Service does not Start In Vista

From
Thomas Kellerer
Date:
Inigo Barandiaran, 03.09.2009 14:47:
> Finally, I installed posgre database out of "program Files" as Thomas
> suggested and I gave full privileges to posgre user to data folder and
> everything works correctly :)
>
> Do you know how can I install posgre in "program Files" in Vista?. I might
> some users of my application would like to install it  in "porgram Files"
> folder :(. How can I Solve this problem?
>

You _can_ install it into "Program Files", just don't put the *data directory* there.

I don't remember the individual steps of the installer wizard, but I'm sure there was a point where you could choose to
runinitdb and specify a location for the datadir. 

Thomas