[NCLUG] postgres help (7.2.4)

Patrick S. Riedel priedel at asllc.net
Thu Feb 20 20:42:54 MST 2003


On Thu, 2003-02-20 at 20:26, Erich wrote:
> Hello - I am brand new to postgres, and have been asked to
> administer it.  I will be ordering a book, but am stuck
> with online / man right now.  
> 
> Here is the situation:  I have users on machines running
> that other OS trying to reach a server (over the network)
> running 8.0 using psql.  They are getting the std error, no
> server running on port 5432, blah blah.
> 
> Now I have postmaster config'd to start on boot, and a
> simple ps -ef | grep post shows that it is running. 
> However, a netstat -p does not show a postmaster bound to
> any port.
> 
> Do I need to specify an external port at the postgres
> startup, like postgres -D -i -p <somePort> /usr/local/... 
> ?
> 

Yes.  Your postgresql.conf (/var/lib/pgsql/data) should have at least
the following:

	tcpip_socket = true
	port = 5432

You also need a valid host entry in the pg_hba.conf file
(/var/lib/pgsql/data):

	host    all       0.0.0.0   0.0.0.0     md5   admins

See the file for all the possible options.


> additionally, it appears I can create seperate users for
> the dbase.  Is this mandatory, or can I just create users
> locally on the machine, and configure to recognize these
> unames/pswd's ?

No, postgreSQL has it's own users, which don't have to exist in the
system.

---
testdb=# \h create user
Command:     CREATE USER
Description: define a new database user account
Syntax:
CREATE USER username [ [ WITH ] option [ ... ] ]

where option can be:

          SYSID uid
        | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password'
        | CREATEDB | NOCREATEDB
        | CREATEUSER | NOCREATEUSER
        | IN GROUP groupname [, ...]
        | VALID UNTIL 'abstime'




-- 
Patrick S. Riedel
ANALYTICAL SERVICES, LLC
970.481.1963




More information about the NCLUG mailing list