Обсуждение: Problems with postgresql and Win NT

Поиск
Список
Период
Сортировка

Problems with postgresql and Win NT

От
"Rüdiger Martin"
Дата:
Hello!

I've compiled the current version postgresql 6.5 under Win NT 4.0
after having read a document - which described how to compile it
under Win NT and which I found here - carefully. In my opinion
everything went all right - there were only some minor warnings
such as warnings about redifinitions and so on. And finally I was
told, that postgresql had been compiled successfully. Then I started
initdb as a normal user, this was all right, too. After starting ipc-
deamon and the postmaster I tried to run the tests. But there were
only errors - on after the other. So I treid to connect to the database
typing psql template1. And this is what I got as error message:

Connection to database 'template1' failed.
connectDB() -- socket() faild: errno=106
Adresses in the specified family cannot be used with this socket

Might anybody help me with this problem? I guess it's a problem
concering port numbers and similar things. I would be very grateful
for every hint.

Sincerly

Ruediger A. Martin

P.S.: I attached the output of the configure-script - maybe this might
show one of you what is missing on my system.

loading cache ./config.cache
checking host system type... i586-pc-cygwin
checking echo setting...
checking setting template to... cygwin32
checking setting USE_LOCALE... disabled
checking setting CYR_RECODE... disabled
checking setting MULTIBYTE... disabled
checking setting DEF_PGPORT... 5432
checking setting DEF_MAXBACKENDS... 32
checking setting USE_TCL... disabled
checking setting USE_PERL... disabled
checking setting USE_ODBC... disabled
checking setting ASSERT CHECKING... disabled
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking how to run the C preprocessor... (cached) gcc -E
checking whether gcc needs -traditional... (cached) no
- setting CPPFLAGS=
- setting LDFLAGS=
checking for c++... (cached) c++
checking whether the C++ compiler (c++   ) works... yes
checking whether the C++ compiler (c++   ) is a cross-compiler... no
checking whether we are using GNU C++... (cached) yes
checking whether c++ accepts -g... (cached) yes
checking for a BSD compatible install... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/install -c
checking for flex... (cached) flex
checking for yywrap in -lfl... (cached) yes
checking whether ln -s works... (cached) yes
checking whether make sets ${MAKE}... (cached) yes
checking for ranlib... (cached) ranlib
checking for find... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/find
checking for tar... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/tar
checking for split... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/split
checking for etags... no
checking for xargs... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/xargs
checking for ipcs... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/ipcs
checking for ipcrm... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/ipcrm
checking for trbsd... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/tr
checking for gzcat... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/zcat
checking for bison... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/bison
- Using /cygnus/CYGWIN~1/H-I586~1/bin/bison -y -d -L //e/cygnus/cygwin-b20/share/
checking for main in -lsfio... (cached) no
checking for main in -lncurses... (cached) yes
checking for main in -ltermcap... (cached) yes
checking for main in -lhistory... (cached) no
checking for main in -lreadline... (cached) yes
checking for write_history in -lreadline... (cached) yes
checking for main in -lbsd... (cached) no
checking for main in -lm... (cached) yes
checking for main in -ldl... (cached) no
checking for main in -lsocket... (cached) no
checking for main in -lnsl... (cached) no
checking for main in -lipc... (cached) no
checking for main in -lIPC... (cached) no
checking for main in -llc... (cached) no
checking for main in -ldld... (cached) no
checking for main in -lln... (cached) no
checking for main in -lld... (cached) no
checking for main in -lcompat... (cached) no
checking for main in -lBSD... (cached) no
checking for main in -lcrypt... (cached) yes
checking for main in -lgen... (cached) no
checking for main in -lPW... (cached) no
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... (cached) yes
checking for limits.h... (cached) yes
checking for unistd.h... (cached) yes
checking for termios.h... (cached) yes
checking for values.h... (cached) no
checking for sys/select.h... (cached) yes
checking for sys/resource.h... (cached) yes
checking for netdb.h... (cached) yes
checking for arpa/inet.h... (cached) yes
checking for getopt.h... (cached) yes
checking for readline.h... (cached) no
checking for history.h... (cached) no
checking for dld.h... (cached) no
checking for crypt.h... (cached) no
checking for endian.h... (cached) yes
checking for float.h... (cached) yes
checking for readline/readline.h... (cached) yes
checking for readline/history.h... (cached) no
checking for ieeefp.h... (cached) yes
checking for fp_class.h... (cached) no
checking for netinet/in.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for pwd.h... (cached) yes
checking for working const... (cached) yes
checking for inline... (cached) inline
checking for preprocessor stringizing operator... (cached) yes
checking for uid_t in sys/types.h... (cached) yes
checking for mode_t... (cached) yes
checking for off_t... (cached) yes
checking for size_t... (cached) yes
checking whether time.h and sys/time.h may both be included... (cached) yes
checking whether struct tm is in sys/time.h or time.h... (cached) time.h
checking for tm_zone in struct tm... (cached) no
checking for tzname... (cached) no
checking for signed types... yes
checking for volatile... yes
checking for type of last arg to accept... size_t
checking for int timezone... no
checking for gettimeofday args... 2 args
checking for union semun... yes
checking for fcntl(F_SETLK)... no
checking for good DBL_MIN... yes
checking for 8-bit clean memcmp... (cached) yes
checking return type of signal handlers... (cached) void
checking for vprintf... (cached) yes
checking for tzset... (cached) yes
checking for memmove... (cached) yes
checking for sigsetjmp... (cached) no
checking for kill... (cached) yes
checking for sysconf... (cached) yes
checking for fpclass... (cached) no
checking for fp_class... (cached) no
checking for fp_class_d... (cached) no
checking for class... (cached) no
checking for sigprocmask... (cached) yes
checking for waitpid... (cached) yes
checking for setsid... (cached) yes
checking for fcvt... (cached) yes
checking for snprintf... (cached) no
checking for vsnprintf... (cached) no
checking for isinf... (cached) yes
checking for getrusage... (cached) yes
checking for srandom... (cached) yes
checking for gethostname... (cached) yes
checking for random... (cached) yes
checking for inet_aton... (cached) no
checking for strerror... (cached) yes
checking for strdup... (cached) yes
checking for strtol... (cached) yes
checking for strtoul... (cached) yes
checking for strcasecmp... (cached) yes
checking for cbrt... (cached) yes
checking for rint... (cached) yes
checking whether 'long int' is 64 bits... no
checking whether 'long long int' is 64 bits... yes
checking alignment of short... (cached) 2
checking alignment of int... (cached) 4
checking alignment of long... (cached) 4
checking alignment of long long int... (cached) 8
checking alignment of double... (cached) 8
checking for POSIX signal interface... no
checking for tclsh... /cygnus/CYGWIN~1/H-I586~1/bin/tclsh
updating cache ./config.cache
creating ./config.status
creating GNUmakefile
creating Makefile.global
creating backend/port/Makefile
creating backend/catalog/genbki.sh
creating backend/utils/Gen_fmgrtab.sh
creating bin/pg_dump/Makefile
creating bin/pg_version/Makefile
creating bin/psql/Makefile
creating bin/pgtclsh/mkMakefile.tcldefs.sh
creating bin/pgtclsh/mkMakefile.tkdefs.sh
creating include/version.h
creating interfaces/libpq/Makefile
creating interfaces/ecpg/lib/Makefile
creating interfaces/libpq++/Makefile
creating interfaces/libpgtcl/Makefile
creating interfaces/odbc/GNUmakefile
creating interfaces/odbc/Makefile.global
creating pl/plpgsql/src/Makefile
creating pl/plpgsql/src/mklang.sql
creating pl/tcl/mkMakefile.tcldefs.sh
creating include/config.h
include/config.h is unchanged
linking ./backend/port/tas/dummy.s to backend/port/tas.s
linking ./backend/port/dynloader/win.c to backend/port/dynloader.c
linking ./backend/port/dynloader/win.h to include/dynloader.h
linking ./include/port/win.h to include/os.h
linking ./makefiles/Makefile.win to Makefile.port
linking ./include/port to interfaces/odbc/port
linking ./makefiles to interfaces/odbc/makefiles
linking ./template to interfaces/odbc/template
linking ./include/config.h to interfaces/odbc/config.h

Re: [PORTS] Problems with postgresql and Win NT

От
Bruce Momjian
Дата:
> Connection to database 'template1' failed.
> connectDB() -- socket() faild: errno=106
> Adresses in the specified family cannot be used with this socket
>

Only a guess.  Try doing psql and specify port 5432 and host localhost
and see if that works.  Maybe unix domain sockets don't work on NT.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: [PORTS] Problems with postgresql and Win NT

От
"Sam O'Connor"
Дата:
Did you try setting -i on postmaster, and psql -h 127.0.0.1?
I don't think unix domain sockets work under NT.
I have PG (semi) successfully running on NT.

Sam


Rüdiger Martin wrote:
>
> Hello!
>
> I've compiled the current version postgresql 6.5 under Win NT 4.0
> after having read a document - which described how to compile it
> under Win NT and which I found here - carefully. In my opinion
> everything went all right - there were only some minor warnings
> such as warnings about redifinitions and so on. And finally I was
> told, that postgresql had been compiled successfully. Then I started
> initdb as a normal user, this was all right, too. After starting ipc-
> deamon and the postmaster I tried to run the tests. But there were
> only errors - on after the other. So I treid to connect to the database
> typing psql template1. And this is what I got as error message:
>
> Connection to database 'template1' failed.
> connectDB() -- socket() faild: errno=106
> Adresses in the specified family cannot be used with this socket
>
> Might anybody help me with this problem? I guess it's a problem
> concering port numbers and similar things. I would be very grateful
> for every hint.
>
> Sincerly
>
> Ruediger A. Martin
>
> P.S.: I attached the output of the configure-script - maybe this might
> show one of you what is missing on my system.
>
>   ------------------------------------------------------------------------
> loading cache ./config.cache
> checking host system type... i586-pc-cygwin
> checking echo setting...
> checking setting template to... cygwin32
> checking setting USE_LOCALE... disabled
> checking setting CYR_RECODE... disabled
> checking setting MULTIBYTE... disabled
> checking setting DEF_PGPORT... 5432
> checking setting DEF_MAXBACKENDS... 32
> checking setting USE_TCL... disabled
> checking setting USE_PERL... disabled
> checking setting USE_ODBC... disabled
> checking setting ASSERT CHECKING... disabled
> checking for gcc... (cached) gcc
> checking whether the C compiler (gcc  ) works... yes
> checking whether the C compiler (gcc  ) is a cross-compiler... no
> checking whether we are using GNU C... (cached) yes
> checking whether gcc accepts -g... (cached) yes
> checking how to run the C preprocessor... (cached) gcc -E
> checking whether gcc needs -traditional... (cached) no
> - setting CPPFLAGS=
> - setting LDFLAGS=
> checking for c++... (cached) c++
> checking whether the C++ compiler (c++   ) works... yes
> checking whether the C++ compiler (c++   ) is a cross-compiler... no
> checking whether we are using GNU C++... (cached) yes
> checking whether c++ accepts -g... (cached) yes
> checking for a BSD compatible install... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/install -c
> checking for flex... (cached) flex
> checking for yywrap in -lfl... (cached) yes
> checking whether ln -s works... (cached) yes
> checking whether make sets ${MAKE}... (cached) yes
> checking for ranlib... (cached) ranlib
> checking for find... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/find
> checking for tar... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/tar
> checking for split... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/split
> checking for etags... no
> checking for xargs... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/xargs
> checking for ipcs... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/ipcs
> checking for ipcrm... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/ipcrm
> checking for trbsd... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/tr
> checking for gzcat... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/zcat
> checking for bison... (cached) /cygnus/CYGWIN~1/H-I586~1/bin/bison
> - Using /cygnus/CYGWIN~1/H-I586~1/bin/bison -y -d -L //e/cygnus/cygwin-b20/share/
> checking for main in -lsfio... (cached) no
> checking for main in -lncurses... (cached) yes
> checking for main in -ltermcap... (cached) yes
> checking for main in -lhistory... (cached) no
> checking for main in -lreadline... (cached) yes
> checking for write_history in -lreadline... (cached) yes
> checking for main in -lbsd... (cached) no
> checking for main in -lm... (cached) yes
> checking for main in -ldl... (cached) no
> checking for main in -lsocket... (cached) no
> checking for main in -lnsl... (cached) no
> checking for main in -lipc... (cached) no
> checking for main in -lIPC... (cached) no
> checking for main in -llc... (cached) no
> checking for main in -ldld... (cached) no
> checking for main in -lln... (cached) no
> checking for main in -lld... (cached) no
> checking for main in -lcompat... (cached) no
> checking for main in -lBSD... (cached) no
> checking for main in -lcrypt... (cached) yes
> checking for main in -lgen... (cached) no
> checking for main in -lPW... (cached) no
> checking for ANSI C header files... (cached) yes
> checking for sys/wait.h that is POSIX.1 compatible... (cached) yes
> checking for limits.h... (cached) yes
> checking for unistd.h... (cached) yes
> checking for termios.h... (cached) yes
> checking for values.h... (cached) no
> checking for sys/select.h... (cached) yes
> checking for sys/resource.h... (cached) yes
> checking for netdb.h... (cached) yes
> checking for arpa/inet.h... (cached) yes
> checking for getopt.h... (cached) yes
> checking for readline.h... (cached) no
> checking for history.h... (cached) no
> checking for dld.h... (cached) no
> checking for crypt.h... (cached) no
> checking for endian.h... (cached) yes
> checking for float.h... (cached) yes
> checking for readline/readline.h... (cached) yes
> checking for readline/history.h... (cached) no
> checking for ieeefp.h... (cached) yes
> checking for fp_class.h... (cached) no
> checking for netinet/in.h... (cached) yes
> checking for string.h... (cached) yes
> checking for strings.h... (cached) yes
> checking for sys/param.h... (cached) yes
> checking for pwd.h... (cached) yes
> checking for working const... (cached) yes
> checking for inline... (cached) inline
> checking for preprocessor stringizing operator... (cached) yes
> checking for uid_t in sys/types.h... (cached) yes
> checking for mode_t... (cached) yes
> checking for off_t... (cached) yes
> checking for size_t... (cached) yes
> checking whether time.h and sys/time.h may both be included... (cached) yes
> checking whether struct tm is in sys/time.h or time.h... (cached) time.h
> checking for tm_zone in struct tm... (cached) no
> checking for tzname... (cached) no
> checking for signed types... yes
> checking for volatile... yes
> checking for type of last arg to accept... size_t
> checking for int timezone... no
> checking for gettimeofday args... 2 args
> checking for union semun... yes
> checking for fcntl(F_SETLK)... no
> checking for good DBL_MIN... yes
> checking for 8-bit clean memcmp... (cached) yes
> checking return type of signal handlers... (cached) void
> checking for vprintf... (cached) yes
> checking for tzset... (cached) yes
> checking for memmove... (cached) yes
> checking for sigsetjmp... (cached) no
> checking for kill... (cached) yes
> checking for sysconf... (cached) yes
> checking for fpclass... (cached) no
> checking for fp_class... (cached) no
> checking for fp_class_d... (cached) no
> checking for class... (cached) no
> checking for sigprocmask... (cached) yes
> checking for waitpid... (cached) yes
> checking for setsid... (cached) yes
> checking for fcvt... (cached) yes
> checking for snprintf... (cached) no
> checking for vsnprintf... (cached) no
> checking for isinf... (cached) yes
> checking for getrusage... (cached) yes
> checking for srandom... (cached) yes
> checking for gethostname... (cached) yes
> checking for random... (cached) yes
> checking for inet_aton... (cached) no
> checking for strerror... (cached) yes
> checking for strdup... (cached) yes
> checking for strtol... (cached) yes
> checking for strtoul... (cached) yes
> checking for strcasecmp... (cached) yes
> checking for cbrt... (cached) yes
> checking for rint... (cached) yes
> checking whether 'long int' is 64 bits... no
> checking whether 'long long int' is 64 bits... yes
> checking alignment of short... (cached) 2
> checking alignment of int... (cached) 4
> checking alignment of long... (cached) 4
> checking alignment of long long int... (cached) 8
> checking alignment of double... (cached) 8
> checking for POSIX signal interface... no
> checking for tclsh... /cygnus/CYGWIN~1/H-I586~1/bin/tclsh
> updating cache ./config.cache
> creating ./config.status
> creating GNUmakefile
> creating Makefile.global
> creating backend/port/Makefile
> creating backend/catalog/genbki.sh
> creating backend/utils/Gen_fmgrtab.sh
> creating bin/pg_dump/Makefile
> creating bin/pg_version/Makefile
> creating bin/psql/Makefile
> creating bin/pgtclsh/mkMakefile.tcldefs.sh
> creating bin/pgtclsh/mkMakefile.tkdefs.sh
> creating include/version.h
> creating interfaces/libpq/Makefile
> creating interfaces/ecpg/lib/Makefile
> creating interfaces/libpq++/Makefile
> creating interfaces/libpgtcl/Makefile
> creating interfaces/odbc/GNUmakefile
> creating interfaces/odbc/Makefile.global
> creating pl/plpgsql/src/Makefile
> creating pl/plpgsql/src/mklang.sql
> creating pl/tcl/mkMakefile.tcldefs.sh
> creating include/config.h
> include/config.h is unchanged
> linking ./backend/port/tas/dummy.s to backend/port/tas.s
> linking ./backend/port/dynloader/win.c to backend/port/dynloader.c
> linking ./backend/port/dynloader/win.h to include/dynloader.h
> linking ./include/port/win.h to include/os.h
> linking ./makefiles/Makefile.win to Makefile.port
> linking ./include/port to interfaces/odbc/port
> linking ./makefiles to interfaces/odbc/makefiles
> linking ./template to interfaces/odbc/template
> linking ./include/config.h to interfaces/odbc/config.h

--
Sam O'Connor, Melbourne Australia
mail: Sam@OConnor.net
web: Sam.OConnor.net
--

Re: [PORTS] Problems with postgresql and Win NT

От
Ted Nolan SRI Augusta GA
Дата:
In message <199907092106.RAA27253@hub.org>you write:
>
>--Message-Boundary-14676
>Content-type: text/plain; charset=US-ASCII
>Content-transfer-encoding: 7BIT
>Content-description: Mail message body
>
>Hello!
>
>I've compiled the current version postgresql 6.5 under Win NT 4.0
>after having read a document - which described how to compile it
>under Win NT and which I found here - carefully. In my opinion
>everything went all right - there were only some minor warnings
>such as warnings about redifinitions and so on. And finally I was
>told, that postgresql had been compiled successfully. Then I started
>initdb as a normal user, this was all right, too. After starting ipc-
>deamon and the postmaster I tried to run the tests. But there were
>only errors - on after the other. So I treid to connect to the database
>typing psql template1. And this is what I got as error message:
>
>Connection to database 'template1' failed.
>connectDB() -- socket() faild: errno=106
>Adresses in the specified family cannot be used with this socket
>
>Might anybody help me with this problem? I guess it's a problem
>concering port numbers and similar things. I would be very grateful
>for every hint.
>
>Sincerly
>
>Ruediger A. Martin
>
>P.S.: I attached the output of the configure-script - maybe this might
>show one of you what is missing on my system.
>

I think that by default the access libraries try to contact the postmaster
via Unix sockets, which are not supported under Cygnus.

What I have found is that you need to make sure to run the postmaster with
the -i flag, and then set the PGHOST environment variable to "localhost".
(I think the default pg_hba.conf allows localhost to connect).  This will
make the clients use a TCP socket rather than a Unix socket to connect
to the backend.

When using the DB on NT, I always get messages spit from the postmaster about
semaphore != 0 -- as far as I can tell, this isn't hurting things,
but if anyone knows otherwise -- speak up!

As I recall, the regression test for NT had a lot of problems with date
information.  I'm mainly ignoring that.

I know there's nobody who wants to do it (certainly I haven't the time
right now), but the NT port practically screams for a binary dist and a
more detailed compile/install doc.


                Ted

Re: [PORTS] Problems with postgresql and Win NT

От
Bruce Momjian
Дата:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Did you try setting -i on postmaster, and psql -h 127.0.0.1?
> I don't think unix domain sockets work under NT.
> I have PG (semi) successfully running on NT.
>

Added to the bottom of README.NT:

[Added by bjm]

By default, PostgreSQL clients like psql communicate by default using
unix domain sockets, which don't work on NT.  Start the postmaster with
-i, and supply the hostname when connecting to the database.



--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: [PORTS] Problems with postgresql and Win NT

От
Bruce Momjian
Дата:
> As I recall, the regression test for NT had a lot of problems with date
> information.  I'm mainly ignoring that.
>
> I know there's nobody who wants to do it (certainly I haven't the time
> right now), but the NT port practically screams for a binary dist and a
> more detailed compile/install doc.

Yes, I hear you.


New README.NT info:

[Added by bjm]

By default, PostgreSQL clients like psql communicate by default using
unix domain sockets, which don't work on NT.  Start the postmaster with
-i, and when connecting to the database from a client, set the PGHOST
environment variable to 'localhost' or supply the hostname on the
command line.




--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026