Thread: Postgres 7.0.3 on SCO OpenServer Enterprise not working with UDP

Postgres 7.0.3 on SCO OpenServer Enterprise not working with UDP

From
Carlos Antonio Ruiz Gómez
Date:
Hello, I have a problem using postgres 7.0.3 in SCO OpenServer Enterprise.

Postgres 7.0.3 is working fine with TCP port 5432.

The problem is that I need to use postgres with SCO OpenServer Host System,
and this system doesn't have TCP/IP.

Postgres is not working with local UDP.

It's giving a strange result on the variable errno in function
connectDBStart, source fe-connect.c, line 868.

When the program executes line 868
    if (connect(conn->sock, &conn->raddr.sa, ...
the variable errno is fixed with a strange value of -2147023356

I think maybe is a problem linking libc.a, but I have couldn't resolve the
problem yet.

Your help will be very appreciated.  Please answer to c_ruiz@tutopia.com

Transcript of session follows:
------------------------------
$ pg_ctl status
pg_ctl: postmaster is running (pid: 777)
options are:
/usr/local/pgsql/bin/postmaster
-p 5432
-D /u/postgres/data
-B 64
-b /usr/local/pgsql/bin/postgres
-N 32

$ tail -6 pg_hba.conf
# By default, allow anything over UNIX domain sockets and localhost.
host         all         127.0.0.0     255.255.255.0       trust
local        all                                           trust
host dbsuc00 192.168.16.1 255.255.255.0 trust
host dbsuc00 192.168.16.2 255.255.255.0 trust
host template1 192.168.16.2 255.255.255.0 trust

$ l /tmp/.s.*
prwxrwxrwx   1 postgres group          0 May  7 13:16 /tmp/.s.PGSQL.5432

$ PGDATA=/u/postgres/data
$ export PGDATA
$ psql
psql: connectDBStart() -- connect() failed: Unknown error
        Is the postmaster running at 'localhost'
        and accepting connections on Unix socket '5432'?

$ gdb /usr/local/pgsql/bin/psql
GNU gdb 5.0
This GDB was configured as "i386-pc-sco3.2v5.0.5"...
(gdb) break fe-connect.c:868
Breakpoint 2 at 0x80065c28: file fe-connect.c, line 868.
(gdb) cont
Continuing.

Breakpoint 2, connectDBStart (conn=0x8085440) at fe-connect.c:868
868  if (connect(conn->sock, &conn->raddr.sa, conn->raddr_len) < 0)
(gdb) print conn->sock
$2 = 7
(gdb) print conn->raddr.sa
$3 = {sa_family = 1, sa_data = "/tmp/.s.PGSQL."}
(gdb) print conn->raddr_len
$4 = 20
(gdb) print conn->raddr.un
$5 = {sun_family = 1,
  sun_path = "/tmp/.s.PGSQL.5432", '\000' <repeats 89 times>}
(gdb) print errno
$6 = 0
(gdb) next
871   if (errno == EINPROGRESS || errno == 0)
(gdb) print errno
$7 = -2147023356
(gdb) cont
Continuing.
psql: connectDBStart() -- connect() failed: Unknown error
 Is the postmaster running at 'localhost'
 and accepting connections on Unix socket '5432'?

Program exited with code 02.
(gdb)
------------------------------

Thanks in advance.

Carlos Antonio Ruiz Gómez
c_ruiz@tutopia.com
http://globalqss.com




Re: Postgres 7.0.3 on SCO OpenServer Enterprise not working with UDP

From
"Craig Orsinger"
Date:
In article <002801c0d728$91de42e0$0110a8c0@qss>, "Carlos Antonio Ruiz
Gómez" <c_ruiz@tutopia.com> wrote:

    The alternative to TCP sockets for PostgreSQL is Unix sockets,
not UDP sockets.

    Unless things have changed in the last couple of years, I think
your problem is that SCO doesn't support Unix sockets. It didn't
back when I was using it, which was several years ago, and I
never heard any plans to add this ability. If that's true, you'll need
to add TCP/IP to your OpenServer system and use TCP sockets.

> Hello, I have a problem using postgres 7.0.3 in SCO OpenServer
> Enterprise.
>
> Postgres 7.0.3 is working fine with TCP port 5432.
>
> The problem is that I need to use postgres with SCO OpenServer Host
> System, and this system doesn't have TCP/IP.
>
> Postgres is not working with local UDP.

[mucho snippage]