Re: cant connect to the database, even after doing start

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: "surabhi(dot)ahuja" <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: cant connect to the database, even after doing start
Date: 2006-07-14 16:14:19
Message-ID: 1152893659.2744.21.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2006-07-14 at 02:48, surabhi.ahuja wrote:
> this is what is happening
>
> stop(){
> echo "Stopping ${NAME} service: "
> if [ "`uname`" = "Linux" ]; then
> /bin/sh -c "$PGCTL stop -D $PGDATA -s -m fast" > /dev/null
> 2>&1
> fi
> ret=$?
> if [ $ret -eq 0 ]
> then
> echo_success
> else
> echo_failure
> if [ "`uname`" = "Linux" ]; then
> /bin/sh -c "$PGCTL stop -D $PGDATA -s -m immediate"
> > /dev/null 2>&1
> fi
> fi
> echo
> }
>
> u mean to say that /bin/sh -c "$PGCTL stop -D $PGDATA -s -m
> immediate" > /dev/null 2>&1
> is causing problem
>
> what shd be done, shd it be removed?

It's not how I'd do it, certainly. Which branch gets run most the
time? Have you tested to make sure that the -m fast really runs and
gets a chance to work? What script is this from? Is it a stock one
that came with your distribution, or home grown?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Q 2006-07-14 16:30:00 Re: I need help creating a query
Previous Message Sergio Duran 2006-07-14 16:07:40 Re: I need help creating a query