The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.

 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 can't access PostGreSQL?
Author: Serge Olivier Canizares 
Date:   28-10-01 19:04

(posted by Dan Langille)

I read your article on installing postgreSQL from the ports collection, and noted that you indicated you were looking for a windows frontend to the db because you couldn't get the ipgsql.exe client from Zeos to connect with the db.

There are 2 probable reasons for this:

1. You didn't start postmaster with the "-i" flag, which allows for socket connexions. Here's what I put in /usr/local/etc/rc.d/


[-x /usr/local/pgsql/bin/postmaster ] && {
su -l postgres -c 'exec /usr/local/pgsql/bin/postmaster -i \
-D/home/postgres/data \
-S -o -F > /home/postgres/errlog' &
echo -n ' postgres'

This starts the postmaster looking at the default port. Note: I use "postgres" as the db superuser, probably because I compile from the tarball rather than the port. Yes, I am using FreeBSD, but I'm used to different unices.

2. You may not have set up the "pg_hba.conf" file properly in the db data directory--the directory that you specify to the postmaster process with the -D flag.

Suppose you have two machines: the db server on
and an NT box on

Put this in the pg_hba.conf (make sure you add write permission first):

host all password

This allows ALL machines on the 192.168.4 subnet to access the server, and specifies that clients send their user name and password to verify the user identity to the machine. If you read the docs, you can get fancy with authentication--use encryption, kerberos, etc. But if you have a small network like I do (3
machines at home protected by a firewall using ipfilter) it may be more trouble than it is worth. So I use the simple command above.

By the way, this lets me use perl DBI from my apache with mod_perl server, and lets my wife, who still uses 98 on her notebook, use ipsql.exe to work with the db. You can even get M$ Access to interface to postgres this way, if you compile in ODBC support.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 

 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Remember my login:
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum