Thread: How do I start postmaster with -i for tcp-ip

How do I start postmaster with -i for tcp-ip

From
Joe Moraca
Date:
I am using Mandrake 8.0 and have upgraded to postrgess 7.1 and need to have
the script that auto starts postgress use the -i so I can connect with jdbc
but it seems I am not able to find the correct spot to put the -i as I never
seem to get it to work....

Thanks for some help

Re: How do I start postmaster with -i for tcp-ip

From
harrold@sage.che.pitt.edu
Date:
On Wed, 6 Jun 2001, Joe Moraca wrote:

> I am using Mandrake 8.0 and have upgraded to postrgess 7.1 and need to have
> the script that auto starts postgress use the -i so I can connect with jdbc
> but it seems I am not able to find the correct spot to put the -i as I never
> seem to get it to work....
>
> Thanks for some help
>

i had a similar problem with php and pg7.1. i thought it was the -i
command but it was actually permissions. it was on the box at home and i
dont have access to it right now but it had something to do with the hba
files in postgres's home directory.

--
john


Re: How do I start postmaster with -i for tcp-ip

From
Nabil Sayegh
Date:
On 06 Jun 2001 09:32:21 -0400, Joe Moraca wrote:
> I am using Mandrake 8.0 and have upgraded to postrgess 7.1 and need to have
> the script that auto starts postgress use the -i so I can connect with jdbc
> but it seems I am not able to find the correct spot to put the -i as I never
> seem to get it to work....

This should really be a FAQ:

If you want to hardcode it into the rc script:

su -l postgres -c "PGDATESTYLE=GERMAN LANG=de_DE LANGUAGE=
LC_COLLATE=POSIX LC_CTYPE= LC_MESSAGES= LC_MONETARY= LC_NUMERIC=
LC_TIME= /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -o \"-D
/usr/local/pgsql/data -i\" start >/dev/null 2>&1"

Adjust paths etc. to your needs.

P.S.: Don't forget the \ characters

--
 Nabil Sayegh



Re: How do I start postmaster with -i for tcp-ip

From
Joe Moraca
Date:
Thanks for the help but I still can't get it to work..

This is what is in my startup file:

su -l -s /bin/sh postgres -c "LC_ALL=C /usr/bin/pg_ctl -D $PGDATA -p/
usr/bin/postmaster start >/dev/null 2>&1" < /dev/null

I have tried to put -i or -i\ in serveral places mostly after $PGDATA and it
fails to load.  w/out -i it works fine???

I just want to use JDBC and it says it needs to have the TCP/IP support.
Should I just give up and use MYSQL???

PS  I have no clue what the password for the user postgres is?

I also tried to add -i to my postmaster.opts file but that seems to
overwritten on each startup??

Joe Moraca


On Wednesday 06 June 2001 09:48 am, Nabil Sayegh wrote:
> On 06 Jun 2001 09:32:21 -0400, Joe Moraca wrote:
> > I am using Mandrake 8.0 and have upgraded to postrgess 7.1 and need to
> > have the script that auto starts postgress use the -i so I can connect
> > with jdbc but it seems I am not able to find the correct spot to put the
> > -i as I never seem to get it to work....
>
> This should really be a FAQ:
>
> If you want to hardcode it into the rc script:
>
> su -l postgres -c "PGDATESTYLE=GERMAN LANG=de_DE LANGUAGE=
> LC_COLLATE=POSIX LC_CTYPE= LC_MESSAGES= LC_MONETARY= LC_NUMERIC=
> LC_TIME= /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -o \"-D
> /usr/local/pgsql/data -i\" start >/dev/null 2>&1"
>
> Adjust paths etc. to your needs.
>
> P.S.: Don't forget the \ characters
>
> --
>  Nabil Sayegh
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl


Re: How do I start postmaster with -i for tcp-ip

From
"Nabil Sayegh"
Date:
> Thanks for the help but I still can't get it to work..
>
> This is what is in my startup file:
>
> su -l -s /bin/sh postgres -c "LC_ALL=C /usr/bin/pg_ctl -D $PGDATA -p/
> usr/bin/postmaster start >/dev/null 2>&1" < /dev/null
>
> I have tried to put -i or -i\ in serveral places mostly after $PGDATA and
it
> fails to load.  w/out -i it works fine???

The backslashes belong to the quotes.
The program you call is pg_ctl, but -i is a parameter for postmaster.
You pass parameters to postmaster by specifying them after the -o option.
To be able to put more than one parameter to the postmaster you should
enclose them
in quotes. But as the whole string already is in quotes (su "...") you have
to use backslashes for the inner quotes.

cu
--
 Nabil Sayegh