|
|
@ -1,34 +1,41 @@ |
|
|
|
==================================================== |
|
|
|
===================================================== |
|
|
|
Frequently Asked Questions (FAQ) for Postgres95 |
|
|
|
Frequently Asked Questions (FAQ) for PostgresSQL V6.0 |
|
|
|
Linux Specific |
|
|
|
Linux Specific |
|
|
|
TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ |
|
|
|
TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ |
|
|
|
==================================================== |
|
|
|
===================================================== |
|
|
|
last updated: Mon Oct 28 10:25:00 BST 1996 |
|
|
|
last updated: Wed Jan 29 20:16:00 GMT 1997 |
|
|
|
|
|
|
|
|
|
|
|
current maintainer: Andrew C.R. Martin (martin@biochem.ucl.ac.uk) |
|
|
|
current maintainer: Andrew C.R. Martin (martin@biochem.ucl.ac.uk) |
|
|
|
original author: Andrew C.R. Martin (martin@biochem.ucl.ac.uk) |
|
|
|
original author: Andrew C.R. Martin (martin@biochem.ucl.ac.uk) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Changes in this version (* = modified, + = new, - = removed): |
|
|
|
Changes in this version (* = modified, + = new, - = removed): |
|
|
|
-0.*) Bugs in Postgres95 V1.08 |
|
|
|
*1.1) What changes do I need to make to src/Makefile.global or |
|
|
|
*1.3) [REDHAT] Why do I get problems with missing libdl and dlfcn.h? |
|
|
|
src/Makefile.custom? |
|
|
|
*1.4) [SLACKWARE 3.1] Why do I get problems with missing libdl and dlfcn.h? |
|
|
|
*1.2) Why do I get problems with missing libreadline? |
|
|
|
*1.5) My compile of the backend dies complaining about the include file |
|
|
|
*1.6) GCC complains about an ignored option -fpic |
|
|
|
dlfcn.h missing |
|
|
|
*1.7) I get warnings of the form |
|
|
|
*1.9) Why do I get problems with ld.so? |
|
|
|
warning: cast from pointer to integer of different size |
|
|
|
*1.13) What are the references in X11_LIB to libsocket and libnsl in |
|
|
|
*1.8) [SuSE-Linux 4.2] Where is curses and termcap? |
|
|
|
src/Makefile.global? |
|
|
|
*1.11) How do I compile PostgreSQL on an a.out system? |
|
|
|
|
|
|
|
*1.12) Why does make fail with: |
|
|
|
|
|
|
|
yacc -d /disk2/PostgreSQL/src/backend/parser/gram.y |
|
|
|
|
|
|
|
make: /usr/bin/make: cannot execute binary file |
|
|
|
|
|
|
|
*1.14) [DEBIAN] Where is libtermcap? |
|
|
|
|
|
|
|
*2.1) The linker fails to find libX11 when compiling pgtclsh |
|
|
|
|
|
|
|
+3.6) Why does psql fail with: |
|
|
|
|
|
|
|
psql: can't load library 'libpq.so.1' |
|
|
|
|
|
|
|
-4.*) Spurious problems |
|
|
|
|
|
|
|
|
|
|
|
This file is divided approximately as follows: |
|
|
|
This file is divided approximately as follows: |
|
|
|
1.*) Installing Postgres95 |
|
|
|
1.*) Installing PostgreSQL |
|
|
|
2.*) Compiling accessory programs |
|
|
|
2.*) Compiling accessory programs |
|
|
|
3.*) Runtime Problems |
|
|
|
3.*) Runtime Problems |
|
|
|
4.*) Spurious Problems in Need of Verification |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Questions answered: |
|
|
|
Questions answered: |
|
|
|
1.1) What changes do I need to make to src/Makefile.global |
|
|
|
1.1) What changes do I need to make to src/Makefile.global or |
|
|
|
|
|
|
|
src/Makefile.custom? |
|
|
|
1.2) Why do I get problems with missing libreadline? |
|
|
|
1.2) Why do I get problems with missing libreadline? |
|
|
|
1.3) [REDHAT] Why do I get problems with missing libdl and dlfcn.h? |
|
|
|
1.3) [REDHAT] Why do I get problems with missing libdl and dlfcn.h? |
|
|
|
1.4) [SLACKWARE 3.1] Why do I get problems with missing libdl and dlfcn.h? |
|
|
|
1.4) [SLACKWARE 3.1] Why do I get problems with missing libdl and dlfcn.h? |
|
|
@ -40,9 +47,9 @@ Questions answered: |
|
|
|
1.8) [SuSE-Linux 4.2] Where is curses and termcap? |
|
|
|
1.8) [SuSE-Linux 4.2] Where is curses and termcap? |
|
|
|
1.9) Why do I get problems with ld.so? |
|
|
|
1.9) Why do I get problems with ld.so? |
|
|
|
1.10) Why do I get `yy_flush_buffer undefined' errors? |
|
|
|
1.10) Why do I get `yy_flush_buffer undefined' errors? |
|
|
|
1.11) How do I compile Postgres95 on an a.out system? |
|
|
|
1.11) How do I compile PostgreSQL on an a.out system? |
|
|
|
1.12) Why does make fail with: |
|
|
|
1.12) Why does make fail with: |
|
|
|
yacc -d /disk2/postgres95/src/backend/parser/gram.y |
|
|
|
yacc -d /disk2/PostgreSQL/src/backend/parser/gram.y |
|
|
|
make: /usr/bin/make: cannot execute binary file |
|
|
|
make: /usr/bin/make: cannot execute binary file |
|
|
|
1.13) What are the references in X11_LIB to libsocket and libnsl in |
|
|
|
1.13) What are the references in X11_LIB to libsocket and libnsl in |
|
|
|
src/Makefile.global? |
|
|
|
src/Makefile.global? |
|
|
@ -54,7 +61,7 @@ Questions answered: |
|
|
|
dumped)' |
|
|
|
dumped)' |
|
|
|
3.3) When I try to start the Postmaster, why do I get an error of the form |
|
|
|
3.3) When I try to start the Postmaster, why do I get an error of the form |
|
|
|
Failed Assertion("!(file != 0):(null)", File: |
|
|
|
Failed Assertion("!(file != 0):(null)", File: |
|
|
|
"/usr/local/postgres95/src/backend/storage/file/fd.c", Line: 257) |
|
|
|
"/usr/local/PostgreSQL/src/backend/storage/file/fd.c", Line: 257) |
|
|
|
!(file != 0) (0) |
|
|
|
!(file != 0) (0) |
|
|
|
initdb: could not create template database |
|
|
|
initdb: could not create template database |
|
|
|
initdb: cleaning up. |
|
|
|
initdb: cleaning up. |
|
|
@ -63,20 +70,26 @@ Questions answered: |
|
|
|
IpcMemoryCreate: memKey=155356396 , size=760632 , |
|
|
|
IpcMemoryCreate: memKey=155356396 , size=760632 , |
|
|
|
permission=384IpcMemoryCreate: shmget(..., create, ...) |
|
|
|
permission=384IpcMemoryCreate: shmget(..., create, ...) |
|
|
|
failed: Invalid argument |
|
|
|
failed: Invalid argument |
|
|
|
|
|
|
|
3.6) Why does psql fail with: |
|
|
|
|
|
|
|
psql: can't load library 'libpq.so.1' |
|
|
|
4.1) Why doesn't the postmaster start the first time? |
|
|
|
4.1) Why doesn't the postmaster start the first time? |
|
|
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------- |
|
|
|
---------------------------------------------------------------------- |
|
|
|
Section 1: Compiling Postgres95 |
|
|
|
Section 1: Compiling PostgreSQL |
|
|
|
---------------------------------------------------------------------- |
|
|
|
---------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
1.1) What changes do I need to make to src/Makefile.global |
|
|
|
1.1) What changes do I need to make to src/Makefile.global or |
|
|
|
|
|
|
|
src/Makefile.custom? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These changes are most easily made by running the customize |
|
|
|
|
|
|
|
shell script in the src directory which will write a |
|
|
|
|
|
|
|
Makefile.custom for you. |
|
|
|
|
|
|
|
|
|
|
|
You *must* set the following variables: |
|
|
|
If you do it by hand, you *must* set the following variable: |
|
|
|
PORTNAME= linux |
|
|
|
PORTNAME= linux |
|
|
|
|
|
|
|
|
|
|
|
You will also need to change the following to match your own |
|
|
|
You will also need to change the following to match your own |
|
|
|
installation: |
|
|
|
installation: |
|
|
|
SRCDIR |
|
|
|
|
|
|
|
POSTGRESDIR |
|
|
|
POSTGRESDIR |
|
|
|
|
|
|
|
|
|
|
|
If you switch on the USE_TCL option, you will need to set these: |
|
|
|
If you switch on the USE_TCL option, you will need to set these: |
|
|
@ -108,8 +121,9 @@ Section 1: Compiling Postgres95 |
|
|
|
1.2) Why do I get problems with missing libreadline? |
|
|
|
1.2) Why do I get problems with missing libreadline? |
|
|
|
|
|
|
|
|
|
|
|
Linux systems generally don't come with the GNU readline library |
|
|
|
Linux systems generally don't come with the GNU readline library |
|
|
|
installed. Either comment out the USE_READLINE variable in |
|
|
|
installed. Either ensure you do not activate the readline options |
|
|
|
src/Makefile.global or install the GNU readline library. |
|
|
|
in src/Makefile.global or src/Makefile.custom or install the GNU |
|
|
|
|
|
|
|
readline library. |
|
|
|
|
|
|
|
|
|
|
|
Note that Debian Linux (like FreeBSD) does come with readline |
|
|
|
Note that Debian Linux (like FreeBSD) does come with readline |
|
|
|
installed. |
|
|
|
installed. |
|
|
@ -210,39 +224,39 @@ Section 1: Compiling Postgres95 |
|
|
|
If you are using an ELF version of Linux, this can safely be |
|
|
|
If you are using an ELF version of Linux, this can safely be |
|
|
|
ignored as -fPIC is the default. |
|
|
|
ignored as -fPIC is the default. |
|
|
|
|
|
|
|
|
|
|
|
You can correct this by editing |
|
|
|
You can correct this by editing src/Makefile.global and |
|
|
|
src/mk/port/postgres.mk.linux |
|
|
|
changing CFLAGS_SL |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.7) I get warnings of the form |
|
|
|
1.7) I get warnings of the form |
|
|
|
warning: cast from pointer to integer of different size |
|
|
|
warning: cast from pointer to integer of different size |
|
|
|
|
|
|
|
|
|
|
|
These can safely be ignored |
|
|
|
These were seen in earlier versions of Postgres95 and could |
|
|
|
|
|
|
|
safely be ignored. PostgreSQL V6.0 should compile with no warnings |
|
|
|
|
|
|
|
except those related to system header files (which can also |
|
|
|
|
|
|
|
be safely ignored). |
|
|
|
|
|
|
|
|
|
|
|
1.8) [SuSE-Linux 4.2] Where is curses and termcap? |
|
|
|
1.8) [SuSE-Linux 4.2] Where is curses and termcap? |
|
|
|
|
|
|
|
|
|
|
|
SuSE-Linux has ncurses but not curses. Edit src/bin/psql/Makefile and |
|
|
|
SuSE-Linux has ncurses but not curses. Set the value of CURSES_LIB |
|
|
|
Change |
|
|
|
in src/Makefile.custom to -lncurses (or do this through the |
|
|
|
LIBCURSES= -lcurses |
|
|
|
customize script). |
|
|
|
to |
|
|
|
|
|
|
|
LIBCURSES= -lncurses |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SuSE-Linux has the termcap library is in /usr/lib/termcap instead of |
|
|
|
SuSE-Linux has the termcap library is in /usr/lib/termcap instead of |
|
|
|
in /usr/lib |
|
|
|
in /usr/lib. If you have a problem, you need to add the following |
|
|
|
Edit src/bin/psql/Makefile and |
|
|
|
line to src/Makefile.custom: |
|
|
|
Change |
|
|
|
|
|
|
|
|
|
|
|
LDADD_BE+= -L/usr/lib/termcap |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You may need to edit src/bin/psql/Makefile and comment out the |
|
|
|
|
|
|
|
change: |
|
|
|
ifeq ($(PORTNAME), linux) |
|
|
|
ifeq ($(PORTNAME), linux) |
|
|
|
LD_ADD += -ltermcap |
|
|
|
LD_ADD+= -ltermcap |
|
|
|
else |
|
|
|
to: |
|
|
|
to |
|
|
|
|
|
|
|
ifeq ($(PORTNAME), linux) |
|
|
|
ifeq ($(PORTNAME), linux) |
|
|
|
LD_ADD += -L/usr/lib/termcap -ltermcap |
|
|
|
LD_ADD+= |
|
|
|
else |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In fact, since ncurses uses terminfo rather than termcap, it should |
|
|
|
|
|
|
|
be possible to change this line to |
|
|
|
|
|
|
|
LD_ADD += |
|
|
|
|
|
|
|
since you shouldn't need the termcap library. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.9) Why do I get problems with ld.so? |
|
|
|
1.9) Why do I get problems with ld.so? |
|
|
|
|
|
|
|
|
|
|
@ -260,21 +274,26 @@ Section 1: Compiling Postgres95 |
|
|
|
|
|
|
|
|
|
|
|
This isn't really Linux specific, but is common on older Linux |
|
|
|
This isn't really Linux specific, but is common on older Linux |
|
|
|
installations. You must have a recent version of flex (2.5.2 or later) |
|
|
|
installations. You must have a recent version of flex (2.5.2 or later) |
|
|
|
to compile Postgres95. Note that flex 2.5.3 has a bug: see |
|
|
|
to compile PostgreSQL. Note that flex 2.5.3 has a bug: see |
|
|
|
Question 3.4. |
|
|
|
Question 3.4. |
|
|
|
|
|
|
|
|
|
|
|
1.11) How do I compile Postgres95 on an a.out system? |
|
|
|
1.11) How do I compile PostgreSQL on an a.out system? |
|
|
|
|
|
|
|
|
|
|
|
First, you must install the dld library. This may be obtained |
|
|
|
First, you must install the dld library. This may be obtained |
|
|
|
from Sunsite as: |
|
|
|
from Sunsite as: |
|
|
|
Linux/libs/dld.3.2.7.tar.gz |
|
|
|
Linux/libs/dld.3.2.7.tar.gz |
|
|
|
|
|
|
|
|
|
|
|
Second, comment out the LINUX_ELF line in src/mk/port/postgres.mk.linux |
|
|
|
Second, add the following line to src/Makefile.custom: |
|
|
|
|
|
|
|
LINUX_ELF= |
|
|
|
|
|
|
|
(or use the customize script) |
|
|
|
|
|
|
|
|
|
|
|
1.12) Why does make fail with: |
|
|
|
1.12) Why does make fail with: |
|
|
|
yacc -d /disk2/postgres95/src/backend/parser/gram.y |
|
|
|
yacc -d /disk2/PostgreSQL/src/backend/parser/gram.y |
|
|
|
make: /usr/bin/make: cannot execute binary file |
|
|
|
make: /usr/bin/make: cannot execute binary file |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This was a problem in earlier versions of Postgres95. The default |
|
|
|
|
|
|
|
for PostgreSQL is to use bison -y rather than yacc. |
|
|
|
|
|
|
|
|
|
|
|
yacc is generally implemented as a script which invokes bison -y |
|
|
|
yacc is generally implemented as a script which invokes bison -y |
|
|
|
For some reason (certain versions of make? certain versions of |
|
|
|
For some reason (certain versions of make? certain versions of |
|
|
|
bash?) make is unable to execute this script file. |
|
|
|
bash?) make is unable to execute this script file. |
|
|
@ -289,29 +308,23 @@ Section 1: Compiling Postgres95 |
|
|
|
src/Makefile.global? |
|
|
|
src/Makefile.global? |
|
|
|
|
|
|
|
|
|
|
|
This was a problem in 1.08 (they are Sun Solaris specific). |
|
|
|
This was a problem in 1.08 (they are Sun Solaris specific). |
|
|
|
It is fixed in 1.09. |
|
|
|
It is fixed in 1.09 and 6.0 |
|
|
|
|
|
|
|
|
|
|
|
1.14) [DEBIAN] Where is libtermcap? |
|
|
|
1.14) [DEBIAN] Where is libtermcap? |
|
|
|
|
|
|
|
|
|
|
|
Debian Linux comes without the termcap library and uses ncurses |
|
|
|
Debian Linux comes without the termcap library and uses ncurses |
|
|
|
(which uses terminfo instead). There is no need to change the |
|
|
|
(which uses terminfo instead). There is no need to change the |
|
|
|
LIBCURSES variable in src/bin/psql/Makefile since Debian provides |
|
|
|
CURSES_LIB variable in src/bin/psql/Makefile since Debian provides |
|
|
|
a link from libncurses to libcurses (unlike SuSE-Linux --- see |
|
|
|
a link from libncurses to libcurses (unlike SuSE-Linux --- see |
|
|
|
Question 1.8). |
|
|
|
Question 1.8). |
|
|
|
|
|
|
|
|
|
|
|
Edit src/bin/psql/Makefile and change: |
|
|
|
You may need to edit src/bin/psql/Makefile and comment out the |
|
|
|
|
|
|
|
change: |
|
|
|
ifeq ($(PORTNAME), linux) |
|
|
|
ifeq ($(PORTNAME), linux) |
|
|
|
LD_ADD += -ltermcap |
|
|
|
LD_ADD+= -ltermcap |
|
|
|
else |
|
|
|
to: |
|
|
|
|
|
|
|
|
|
|
|
to |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(PORTNAME), linux) |
|
|
|
ifeq ($(PORTNAME), linux) |
|
|
|
CFLAGS += |
|
|
|
LD_ADD+= |
|
|
|
else |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------- |
|
|
|
---------------------------------------------------------------------- |
|
|
@ -320,9 +333,7 @@ Section 2: Compiling accessory programs |
|
|
|
|
|
|
|
|
|
|
|
2.1) The linker fails to find libX11 when compiling pgtclsh |
|
|
|
2.1) The linker fails to find libX11 when compiling pgtclsh |
|
|
|
|
|
|
|
|
|
|
|
Modify the src/Makefile.global to change |
|
|
|
Add the following to src/Makefile.custom |
|
|
|
X11_LIBDIR = /usr/lib |
|
|
|
|
|
|
|
to |
|
|
|
|
|
|
|
X11_LIBDIR = /usr/X11R6/lib |
|
|
|
X11_LIBDIR = /usr/X11R6/lib |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -334,18 +345,19 @@ Section 3: Runtime Problems |
|
|
|
running scripts like createuser |
|
|
|
running scripts like createuser |
|
|
|
|
|
|
|
|
|
|
|
This is a bug in V1.06-V1.07 of Postgres and is fixed in V1.08 |
|
|
|
This is a bug in V1.06-V1.07 of Postgres and is fixed in V1.08 |
|
|
|
|
|
|
|
and above. |
|
|
|
|
|
|
|
|
|
|
|
3.2) I run postmaster and after that system says 'Bad system call(Core |
|
|
|
3.2) I run postmaster and after that system says 'Bad system call(Core |
|
|
|
dumped)' |
|
|
|
dumped)' |
|
|
|
|
|
|
|
|
|
|
|
This indicates that you have no compiled shared memory support |
|
|
|
This indicates that you have not compiled shared memory support |
|
|
|
into your kernel. You need to recompile the Linux kernel to add this |
|
|
|
into your kernel. You need to recompile the Linux kernel to add this |
|
|
|
feature. |
|
|
|
feature. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3.3) When I try to start the Postmaster, why do I get an error of the form |
|
|
|
3.3) When I try to start the Postmaster, why do I get an error of the form |
|
|
|
Failed Assertion("!(file != 0):(null)", File: |
|
|
|
Failed Assertion("!(file != 0):(null)", File: |
|
|
|
"/usr/local/postgres95/src/backend/storage/file/fd.c", Line: 257) |
|
|
|
"/usr/local/PostgreSQL/src/backend/storage/file/fd.c", Line: 257) |
|
|
|
!(file != 0) (0) |
|
|
|
!(file != 0) (0) |
|
|
|
initdb: could not create template database |
|
|
|
initdb: could not create template database |
|
|
|
initdb: cleaning up. |
|
|
|
initdb: cleaning up. |
|
|
@ -375,36 +387,16 @@ Section 3: Runtime Problems |
|
|
|
You haven't build IPC support into your Linux kernel. You |
|
|
|
You haven't build IPC support into your Linux kernel. You |
|
|
|
will have to rebuild the kernel and switch on this option. |
|
|
|
will have to rebuild the kernel and switch on this option. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3.6) Why does psql fail with: |
|
|
|
|
|
|
|
psql: can't load library 'libpq.so.1' |
|
|
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------- |
|
|
|
Psql has been compiled to link dynamically with the libpq |
|
|
|
Section 4: Spurious Problems in Need of Verification |
|
|
|
library. |
|
|
|
---------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4.1) Why doesn't the postmaster start the first time? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Pawko Olszewski <alder@amg.com.pl> reported a problem that, using |
|
|
|
|
|
|
|
Linux kernel 2.0.18, the postmaster wouldn't start the first time |
|
|
|
|
|
|
|
it is run using |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
postmaster -B 256 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
but if run as |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
postmaster -B 64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
killed and then restarted as |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
postmaster -B 256 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
everything was OK. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I haven't been able to repeat this problem! Nobody else has |
|
|
|
|
|
|
|
reported anything similar. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**************************************************************************** |
|
|
|
To solve this, you should log in as root and edit the file |
|
|
|
Dr. Andrew C.R. Martin, University College London & SciTech Software |
|
|
|
/etc/ld.so.conf |
|
|
|
EMAIL: martin@biochem.ucl.ac.uk Tel:(Work) +44(0)171 419 3890 |
|
|
|
Add a single line at the end which gives the name of the |
|
|
|
URL: http://www.biochem.ucl.ac.uk/~martin (Home) +44(0)1372 275775 |
|
|
|
PostgreSQL library directory (the lib subdirectory of your |
|
|
|
**************************************************************************** |
|
|
|
PostgreSQL installation) and run |
|
|
|
|
|
|
|
/sbin/ldconfig |
|
|
|
|
|
|
|
|
|
|
|