Problems between Mandrake and pg

Поиск
Список
Период
Сортировка
От Ryan Rohde Hansen
Тема Problems between Mandrake and pg
Дата
Msg-id 3BFBAFA4.541ED1C2@control.auc.dk
обсуждение исходный текст
Ответы Re: Problems between Mandrake and pg
Re: Problems between Mandrake and pg
Список pgsql-admin
Hi

We are a group studying at Aalborg University. We are at the moment
developing a postgresql-db (7.1.3) on Mandrake 8.0, which we intend to
access via libpq. But at the moment we can't even connect to the db.
The connection is refused and we are asked if the -i option has been set
in the startup of postmaster:

    [01gr551@ika dbkode]$ ./test1
    Connection to host=localhost dbname=01gr551 failed, PQconnectPoll()
-- connect()
     failed: Connection refused
            Is the postmaster running (with -i) at 'localhost'
            and accepting connections on TCP/IP port '5432'?

The program we are running:

    #include <stdlib.h>
    #include <stdio.h>
    #include </usr/local/pgsql/include/libpq-fe.h>

    int main()
    {

       PGconn *conn;
       const char *connection_str = "host=localhost dbname=01gr551";

       conn = PQconnectdb(connection_str);
       if (PQstatus(conn) == CONNECTION_BAD) {
          fprintf(stderr, "Connection to %s failed, %s", connection_str,

          PQerrorMessage(conn));
       } else {
          printf("Connected OK\n");
       }
       PQfinish(conn);
       return EXIT_SUCCESS;
    }

From the user it cannot be seen if postmaster is running (pg_ctl
status), but from root it is apparent that it does. It is true, that we
do not have the -i option on, but we haven't found a way to change it
that really works. We have tried changing the options in a file called
postmaster.opts but it didn't work.

Does anyone have a suggestion of what to do?

Yours in anticipation

Ryan Hansen, on behalf of group 01gr551 on AAU


В списке pgsql-admin по дате отправления:

Предыдущее
От: Andre Schubert
Дата:
Сообщение: Authentication Problem with Postgres
Следующее
От: Andre Schubert
Дата:
Сообщение: [Fwd: [Zope-dev] Authentication Problem with Postgres]