Skip site navigation (1) Skip section navigation (2)

start postgresql8 with -o "-i" option

From: 王晓华 <jacob(dot)xiaohua(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: start postgresql8 with -o "-i" option
Date: 2005-07-29 06:06:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
hi,i want to start database which can accept tcp/ip connecttions,now
there is a question:
i start database with the command:
/usr/local/pgsql/bin/postmaster -o "-i" -D /usr/local/pgsql/data 
and edit pg_hba.conf with adding the line :
host all all trust
host rftDatabase globus trust

and after that i cant use psql to connect the database,here is the message:
psql: FATAL: invalid command-line arguments for server process 
HINT: Try "postgres --help" for more information. 

but if i start with : /usr/local/pgsql/bin/postmaster -o -i -D
then i can connet database psql command,
in two situation i cat connect database with the file:
String url="jdbc:postgresql://xiaohua/rftDatabase";
String user = "globus";
String password = "globus";
catch(Exception ex)
System.out.println("Sub ------------: " + ex);

the error message is that:
Unable to connect======================
org.postgresql.util.PSQLException: 连接尝试失败。
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(
at org.postgresql.core.ConnectionFactory.openConnection(
at org.postgresql.jdbc2.AbstractJdbc2Connection.(
at org.postgresql.jdbc3.AbstractJdbc3Connection.(
at org.postgresql.jdbc3.Jdbc3Connection.(
at org.postgresql.Driver.connect(
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(
at TableDisplay.(
at TableDisplay.main(
Caused by: Invalid argument or cannot assign
requested address
at Method)
at org.postgresql.core.PGStream.(
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(
... 9 more
Exception in thread "main" java.lang.NullPointerException
at TableDisplay.getTable(
at TableDisplay.(
at TableDisplay.main(

the jdbc driver is rightly confirmed and the classpath is right. 
this question exists for few days and how should do next?thaks for
your attention!


pgsql-admin by date

Next:From: ararantDate: 2005-07-29 06:30:23
Subject: PostgreSQL Installation
Previous:From: Gregory ZelesnikDate: 2005-07-28 18:53:39
Subject: Re: compatability problem still there for 8.0.3 installs

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group