1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +03:00

These are obsolete.

This commit is contained in:
Peter Eisentraut
2000-09-23 00:42:36 +00:00
parent 27777b6645
commit 33e5a4dfa5
4 changed files with 0 additions and 2861 deletions

View File

@ -1,748 +0,0 @@
<HTML>
<HEAD>
<TITLE>Linux PostgreSQL FAQ (german)</TITLE>
<META NAME="Author" CONTENT="Karsten Schulz">
<META NAME="GENERATOR" CONTENT="all pages hand-made by Karsten Schulz, using NEdit (Linux)">
<META http-equiv="content-type" CONTENT="text/html;CHARSET=iso8859-1">
<META NAME="robots" CONTENT="index">
<META NAME="robots" CONTENT="follow">
<META NAME="description" CONTENT="Die deutsche &Uuml;bersetzung der Linux-spezifischen FAQ zum Datenbanksystem PostgreSQL">
<META NAME="keywords" CONTENT="Linux, FAQ, DB, PostgreSQL, SQL, deutsch, german">
<LINK REV=MADE HREF="mailto:schulz@Linux-Systemhaus.de" TITLE="Karsten Schulz">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER><H1>H&auml;ufig gestellte Fragen (FAQ) zu PostgreSQL &gt;= V6.1, Linux-spezifisch</H1>
<STRONG>Bitte Zusammen mit der normalen FAQ lesen!</STRONG></CENTER>
<HR>
<TABLE BORDER=0>
<TR>
<TD>Letztes Update des Originals:</TD>
<TD>Tue Aug 10 11:15:00 BST 1999</TD>
</TR>
<TR>
<TD>Original-FAQ gepflegt durch:</TD>
<TD>Andrew C.R. Martin (<A HREF="mailto:martin@biochem.ucl.ac.uk">martin@biochem.ucl.ac.uk</A>)</TD>
</TR>
<TR>
<TD>Original Autor:</TD>
<TD>Andrew C.R. Martin (<A HREF="mailto:martin@biochem.ucl.ac.uk">martin@biochem.ucl.ac.uk</A>)</TD>
</TR>
<TR>
<TD COLSPAN=2>&nbsp;</TD>
</TR>
<TR>
<TD>Letztes Update der &Uuml;bersetzung:</TD>
<TD>Mo, 23. August 1999, 10:00 CEST</TD>
</TR>
<TR>
<TD>&Uuml;bersetzer:</TD>
<TD>Karsten Schulz (<A HREF="mailto:schulz@linux-systemhaus.de">schulz@linux-systemhaus.de</A>)</TD>
</TR>
</TABLE>
<HR>
<P>
&Auml;nderungen in dieser Version (* = ge&auml;ndert, + = neu, - = entfernt)
<P>
<A HREF="#3.11">+3.11)</A> Wieso bekomme ich einen Fehler wie: <EM>IpcMemoryCreate: shmget failed (Permission denied)</EM>?<BR>
<H2>Diese Datei ist ungef&auml;hr wie folgt unterteilt:</H2>
<A HREF="#1.">1.*)</A> PostgreSQL kompilieren<BR>
<A HREF="#2.">2.*)</A> Hilfs- und Zusatzprogramme kompilieren<BR>
<A HREF="#3.">3.*)</A> Laufzeit Probleme<BR>
<P><BR>
<H2>Beantwortete Fragen:</H2>
<A NAME="1.">&nbsp;</A><H3><A HREF="#Sec1">PostgreSQL kompilieren</A></H3>
<A HREF="#1.1">1.1)</A> Welche Anpassungen m&uuml;ssen in src/Makefile.global oder src/Makefile.custom gemacht werden
und gibt es weitere notwendige &Auml;nderungen?<BR>
<A HREF="#1.2">1.2)</A> Warum habe ich Probleme mit der fehlenden Bibliothek libreadline?<BR>
<A HREF="#1.3">1.3)</A> [REDHAT] Warum habe ich Probleme mit der fehlenden Bibliothek libdl und der fehlenden dlfcn.h?<BR>
<A HREF="#1.4">1.4)</A> [SLACKWARE 3.1] Warum habe ich Probleme mit der fehlenden Bibliothek libdl und der fehlenden dlfcn.h?<BR>
<A HREF="#1.5">1.5)</A> Die Kompilierung des Backends schl&auml;gt mit der Meldung fehl, da&szlig; die Include-Datei dlfcn.h fehlen w&uuml;rde.<BR>
<A HREF="#1.6">1.6)</A> GCC meldet, da&szlig; er die Option -fpic ignorieren w&uuml;rde.<BR>
<A HREF="#1.7">1.7)</A> Ich bekomme Warnungen, wie: <EM>warning: cast from pointer to integer of different size</EM><BR>
<A HREF="#1.8">1.8)</A> [SuSE-Linux 4.2-5.3] Wo sind curses und termcap?<BR>
<A HREF="#1.9">1.9)</A> Warum bekomme ich Probleme mit ld.so?<BR>
<A HREF="#1.10">1.10)</A> Wieso bekomme ich <EM>yy_flush_buffer undefined</EM> Fehler?<BR>
<A HREF="#1.11">1.11)</A> Wie kompiliere ich PostgreSQL auf einem a.out System?<BR>
<A HREF="#1.12">1.12)</A> Warum scheitert make mit der Meldung:<BR><EM>
yacc -d /disk2/PostgreSQL/src/backend/parser/gram.y
make: /usr/bin/make: cannot execute binary file</EM><BR>
<A HREF="#1.13">1.13)</A> Was sind die Bez&uuml;ge in der Bibliothek X11_LIB zu libsocket und libnsl in der Datei src/Makefile.global?<BR>
<A HREF="#1.14">1.14)</A> [DEBIAN] Wo ist die Bibliothek libtermcap?<BR>
<A HREF="#1.15">1.15)</A> [REDHAT] Kann ich PostgreSQL als RPM-Archiv bekommen?<BR>
<A HREF="#1.16">1.16)</A> W&auml;hrend ich versuche eine Entwickler-Version unter Linux zu kompilieren, bricht der Vorgang mit folgender
Fehlermeldung ab:<BR><EM>
In file included from /usr/include/sys/sem.h:8,<BR>
from ipc.c:37:<BR>
/usr/include/asm/bitops.h:32: warning: no previous prototype for Set_bit'<BR>
....<BR>
make: *** [ipc.o] Error 1</EM><BR>
<A HREF="#1.17">1.17)</A> Beim Kompilieren von PostgreSQL bricht der gcc mit einer Signal 11 Meldung ab.<BR>
<A HREF="#1.18">1.18)</A> Kann ich Version 6.1.1 unter MkLinux installieren?<BR>
<A HREF="#1.19">1.19)</A> Warum stoppt make oder bricht sonstwie ab?<BR>
<A HREF="#1.20">1.20)</A> Wie kann ich f&uuml;r die Prozessoren 486 oder Pentium optimieren?<BR>
<A HREF="#1.21">1.21)</A> Wieso bekomme ich seltsame Ergebnisse beim Drucken von Zeiten (z.B. beim Regressionstest 'timespan')?<BR>
<A HREF="#1.22">1.22)</A> Warum bekomme ich keine shared libraries f&uuml;r libpq, wenn ich Version 6.3.2 kompiliere?<BR>
<A HREF="#1.23">1.23)</A> Warum scheitert der Kompilierungslauf mit Nachrichten, da&szlig; F_BOOLIN, F_BOOLOUT und F_BYTEAIN nicht deklariert seien?<BR>
<P>
<A NAME="2.">&nbsp;</A><H3><A HREF="#Sec2">Hilfs- und Zusatzprogramme kompilieren</A></H3>
<A HREF="#2.1">2.1)</A> Der Linker findet die Bibliothek libX11 nicht, wenn pgtclsh kompiliert werden soll.<BR>
<A NAME="3.">&nbsp;</A><H3><A HREF="#Sec3">Laufzeit Probleme</A></H3>
<A HREF="#3.1">3.1)</A> Ich bekomme die Fehlermeldung <EM>_fUnKy_POSTPORT_sTuFf_ undefined</EM>, wenn Skripts wie createuser laufen.<BR>
<A HREF="#3.2">3.2)</A> Nachdem ich postmaster starte, meldet das System <EM>Bad system call (Core dumped)</EM><BR>
<A HREF="#3.3">3.3)</A> Wenn ich versuche, den Postmaster zu starten, bekomme ich eine Fehlermeldung wie:<BR><EM>
Failed Assertion("!(file != 0):(null)", File:<BR>
"/usr/local/PostgreSQL/src/backend/storage/file/fd.c", Line: 257)<BR>
!(file != 0) (0)<BR>
initdb: could not create template database<BR>
initdb: cleaning up.</EM><BR>
<A HREF="#3.4">3.4)</A> Warum funktioniert createuser nicht?<BR>
<A HREF="#3.5">3.5)</A> Wieso bekomme ich einen Fehler, wie:<BR><EM>
IpcMemoryCreate: memKey=155356396 , size=760632 ,<BR>
permission=384IpcMemoryCreate: shmget(..., create, ...)<BR>
failed: Invalid argument</EM><BR>
<A HREF="#3.6">3.6)</A> Wieso scheitert der Aufruf von psql mit: <EM>psql: can't load library 'libpq.so.1</EM><BR>
<A HREF="#3.7">3.7)</A> Andere seltsame Verhaltensweisen<BR>
<A HREF="#3.8">3.8)</A> Wenn PostgreSQL beim Systemhalt lief, f&uuml;hrt Linux beim Neustart jedesmal einen Filesystemcheck (fsck) durch<BR>
<A HREF="#3.9">3.9)</A> Warum dauert Query 32 in den RegressionsTests so lange?<BR>
<A HREF="#3.10">3.10)</A> Warum bekomme ich lustige Rundungsergebnisse in einigen Datums/Zeit-Berechnungen, wie:<BR><EM>
select '4 hours'::timespan;<BR>
liefert '3 hours 59 minutes 60 seconds'</EM>?<BR>
<A HREF="#3.11">+3.11)</A> Wieso bekomme ich einen Fehler wie: <EM>IpcMemoryCreate: shmget failed (Permission denied)</EM>?<BR>
<P>
<H3><A NAME="Sec1">Abschnitt 1: PostgreSQL kompilieren</A></H3>
<H4><A NAME="1.1">1.1)</A> Welche Anpassungen m&uuml;ssen in src/Makefile.global oder src/Makefile.custom gemacht werden
und gibt es weitere notwendige &Auml;nderungen?</H4>
&Auml;nderungen an den Makefiles werden am einfachsten dadurch gemacht, indem das <EM>customize shellscript</EM>
im src-Verzeichnis aufgerufen wird, das ein Makefile.custom erzeugt.
<P>
Die einzige andere &Auml;nderung, die evtl. zu machen w&auml;re, ist Flex zu ersetzen, wenn Du die Version 2.5.3 hast.
Diese Version hat einen Fehler, der sich durch das Scheitern des createuser-Programms &auml;u&szlig;ert.
(siehe dazu auch <A HREF="#3.4">Frage 3.4</A>).
<P>
Falls Du die Makefiles manuell &auml;nderst, <STRONG>musst</STRONG> Du die
folgende Variable setzen:<BR><BR>
<PRE>
PORTNAME= linux
</PRE>
Du musst auch die folgende Variable &auml;ndern, damit sie auf Deine
Installation passt:
<PRE>
POSTGRESDIR
</PRE>
Falls Du die <EM>USE_TCL</EM>-Option aktivierst, musst Du folgende Variablen setzen:<BR><BR>
<PRE>
TCL_INCDIR=
TCL_LIBDIR=
TCL_LIB=
TK_INCDIR=
TK_LIBDIR=
TK_LIB=
X11_INCDIR=
X11_LIBDIR=
X11_LIB=
</PRE>
Auf meinem Slackware 3.0 System sind das:
<PRE>
TCL_INCDIR= /usr/include/tcl
TCL_LIBDIR= /usr/lib
TCL_LIB= -ltcl
TK_INCDIR= /usr/include/tcl
TK_LIBDIR= /usr/lib
TK_LIB= -ltk
X11_INCDIR= /usr/include/X11
X11_LIBDIR= /usr/X386/lib
X11_LIB= -lX11
</PRE>
<P>
Du solltest auch alle weiteren &Auml;nderungen durchf&uuml;hren, die in der
Datei INSTALL und in Makefile.global dokumentiert sind.
<H4><A NAME="1.2">1.2)</A> Warum habe ich Probleme mit der fehlenden Bibliothek libreadline?</H4>
Linux Systeme kommen in der Regel nicht mit einer installierten GNU readline Bibliothek.
Stelle entweder sicher, da&szlig; Du die readline-Optionen in src/Makefile.global oder
src/Makefile.custom nicht aktivierst oder installiere die GNU readline Bibliothek.<BR>
Hinweis: Debian Linux (wie FreeBSD) kommt mit einer installierten GNU readline Bibliothek.
<H4><A NAME="1.3">1.3)</A> [REDHAT] Warum habe ich Probleme mit der fehlenden Bibliothek libdl und der fehlenden dlfcn.h?</H4>
Das Problem erscheint dadurch, da&szlig; in der letzten Phase des Kompilierungsvorgangs Funktionen wie
dlopen(), dlclose(), etc. nicht gelinkt werden k&ouml;nnen.
<P>
Die libdl Bibliothek wird zum dynamischen Linken von Benutzerfunktionen zur Laufzeit
benutzt. Aus irgendwelchen Gr&uuml;nden wurde diese Bibliothek mit der RedHat-Distribution
nicht ausgeliefert. Anscheinend ist dies in der letzten RedHat 4.0 (Colgate) ge&auml;ndert worden.
<P>
RedHat hat nun ein neues ld.so RPM-Archiv auf ihrem ftp-Server. Hole Dir einfach:
<P>
<A HREF="ftp://ftp.redhat.com/pub/redhat/devel/i386/RedHat/RPMS/">ftp://ftp.redhat.com/pub/redhat/devel/i386/RedHat/RPMS/ld.so-1.7.14-4.i386.rpm</A>
<P>
Installiere das RPM-Archiv wie &uuml;blich und gut ist!
<P>
Hinweis: Du mu&szlig;t <EM>configure</EM> und <EM>make clean</EM> nach der Installation
der Bibliothek und vor dem erneuten Kompilieren laufen lassen.
<P>
Es gab einen Bericht &uuml;ber ein zerst&ouml;rtes System, weil Programme auf
diese Bibliothek w&auml;hrend des Updates zugegriffen haben (alles in allem nicht
weiter &uuml;berraschend). Konsequenterweise ist es eine gute Idee, das System vor der
Installation zu rebooten, um so wenige Programme wie m&ouml;glich w&auml;hrend
des Updates laufen zu haben. In den Single-User-Mode zu gehen ist wahrscheinlich
auch eine gute Idee!
<P>
Wenn Du lieber den harten Weg gehen willst, kannst Du die Bibliothek und
die Header-Dateien von:
<P>
<A HREF="ftp://tsx-11.mit.edu/pub/linux/packages/GCC/">ftp://tsx-11.mit.edu/pub/linux/packages/GCC/ld.so-1.7.14.tar.gz</A>
<P>
holen. Alternativ findest Du vorkompilierte Binaries in
distributions/debian/buzz/binary-i386/base/ld.so-1.7.14-4.deb auf dem gleichen
ftp-Server oder folge den Instruktionen bei <A HREF="#1.2">Frage 1.2</A>, die den gleichen Fehler
f&uuml;r Slackware 3.1 behandelt.
<P>
Mache es aber nur auf diese Weise, wenn Du wei&szlig;t, was Du tust!
<H4><A NAME="1.4">1.4)</A> [SLACKWARE 3.1] Warum habe ich Probleme mit der fehlenden Bibliothek libdl und der fehlenden dlfcn.h?</H4>
Das Problem erscheint dadurch, da&szlig; in der letzten Phase des Kompilierungsvorgangs Funktionen wie
dlopen(), dlclose(), etc. nicht gelinkt werden k&ouml;nnen.
<P>
Siehe die Antwort zu <A HREF="#1.3">Frage 1.3</A>.
<P>
Slackware bis Version 3.0 war mit dieser Bibliothek und der Include-Datei ausgestattet und ab sp&auml;ten
3.1er-Versionen scheinen sie auch wieder da zu sein. Aber in fr&uuml;hen 3.1er-Versionen (vor dem 09.09.96)
fehlten sie und es wurden viele CD-ROMs von diesen ersten 3.1.er-Versionen gepresst.
<P>
Es gab einen Bericht &uuml;ber ein zerst&ouml;rtes System, weil Programme auf
diese Bibliothek w&auml;hrend des Updates zugegriffen haben (alles in allem nicht
weiter &uuml;berraschend). Konsequenterweise ist es eine gute Idee, das System vor der
Installation zu rebooten, um so wenige Programme wie m&ouml;glich w&auml;hrend
des Updates laufen zu haben. In den Single-User-Mode zu gehen ist wahrscheinlich
auch eine gute Idee!
<P>
Der einfachste Weg, den Fehler zu beseitigen ist, die Datei ldso.tgz von der a4-Diskette einer
aktuelleren Slackware zu nehmen, diese Datei im Wurzelverzeichnis (/) zu entpacken und dann ein
<PRE>sh install/doinst.sh</PRE>
durchzuf&uuml;hren. Danach ein <PRE>ldconfig</PRE>durchf&uuml;hren.
<P>
Hinweis: Du mu&szlig;t <EM>configure</EM> und <EM>make clean</EM> nach der Installation
der Bibliothek und vor dem erneuten Kompilieren laufen lassen.
<P>
Falls Du manuell installieren m&ouml;chtest, installiere zuerst die Datei dlfcn.h in /usr/include.
Dann die libdl.so.1.7.14 (oder was immer die letzte Version ist) in /lib. Dann f&uuml;hre
folgende Befehle aus:
<PRE>
cd /lib
ln -sf libdl.so.1.7.14 libdl.so.1
ln -sf libdl.so.1 libdl.so
</PRE>
Auf manchen Systemen (je nach Deiner gcc-Konfiguration) k&ouml;nnen noch folgende
Befehle notwendig sein:
<PRE>
cd /usr/lib
ln -sf /lib/libdl.so .
</PRE>
Und zum Schlu&szlig; noch ein <PRE>ldconfig</PRE>
<P>
Hinweis: Du mu&szlig;t <EM>configure</EM> und <EM>make clean</EM> nach der Installation
der Bibliothek und vor dem erneuten Kompilieren laufen lassen.
<H4><A NAME="1.5">1.5)</A> Die Kompilierung des Backends schl&auml;gt mit der Meldung fehl, da&szlig; die Include-Datei dlfcn.h fehlen w&uuml;rde.</H4>
Siehe die Antworten zu den Fragen <A HREF="#1.3">1.3</A> und <A HREF="#1.4">1.4</A>.
Und vergiss nicht, falls Du ein a.out-System benutzt, da&szlig; Du das dld-Paket installiert haben mu&szlig;
(welches bei den meisten a.out-Systemen nicht dabei ist), um dlfcn.h zu haben. Siehe <A HREF="#1.11">Frage 1.11</A>.
<H4><A NAME="1.6">1.6)</A> GCC meldet, da&szlig; er die Option -fpic ignorieren w&uuml;rde.</H4>
Fr&uuml;here Versionen des gcc nahmen entweder <CODE>-fpic</CODE> oder <CODE>-fPIC</CODE> an.
Es scheint, da&szlig; neuere Versionen (V2.7.2?) <CODE>-fPIC</CODE> erfordern.
Falls Du ein ELF-System benutzt, kannst das alles ignoriert werden, da <CODE>-fPIC</CODE>
als Standardvorgabe voreingestellt ist.
Du kannst diese Angabe korrigieren, indem Du CFLAGS_SL in der Datei src/Makefile.global
&auml;nderst.
<H4><A NAME="1.7">1.7)</A> Ich bekomme Warnungen, wie: <EM>warning: cast from pointer to integer of different size</EM></H4>
Diese Warnungen wurden in fr&uuml;heren Versionen von Postgres95 gesichtet und k&ouml;nnen ignoriert werden.
PostgreSQL V6.0 sollte ohne Warnungen kompiliert werden, au&szlig;er jenen, die sich auf System-Header-Dateien beziehen
(welche auch ignoriert werden k&ouml;nnen).
<H4><A NAME="1.8">1.8)</A> [SuSE-Linux 4.2-5.3] Wo sind curses und termcap?</H4>
SuSE-Linux 4.2 hat ncurses, nicht curses. Version 4.4 scheint beide Bibliotheken zu haben.
Bei SuSE-Linux ist au&szlig;erdem die termcap-Bibliothek in /usr/lib/termcap/ und nicht in /usr/lib.
<H5>PostgreSQL (bis Version V6.0)</H5>
Setze den Wert f&uuml;r CURSES_LIB in src/Makefile.custom auf -lncurses (oder erledige das durch das <EM>customize script</EM>.
F&uuml;ge folgende Zeile zur Datei src/Makefile.custom hinzu:
<PRE>
LDADD_BE+= -L/usr/lib/termcap
</PRE>
M&ouml;glicherweise mu&szlig;t Du in der Datei src/bin/psql/Makefile folgende &Auml;nderung durchf&uuml;hren:
<PRE>
ifeq ($(PORTNAME), linux)
LD_ADD+=
</PRE>
&auml;ndern in:
<PRE>
ifeq ($(PORTNAME), linux)
LD_ADD+= -ltermcap
</PRE>
<H5>PostgreSQL (V6.1)</H5>
Das Konfigurationsscript wei&szlig; nicht, da&szlig; es auch in /usr/lib/termcap nach der termcap-Bibliothek schauen soll.
Du solltest dieses Verzeichnis angeben, wenn es nach zus&auml;tzlichen Such-Verzeichnissen fragt.
<P>
Falls das nicht funkitoniert (Ich habe SuSE nicht, um das zu testen), dann solltest Du nach dem <EM>./configure</EM>-Lauf
die Datei src/Makefile.global &auml;ndern und in die LDFLAGS-Zeile den Eintrag -ltermcap (nach -lreadline) hinzuf&uuml;gen.
(Alternativ kannst Du auch die Datei src/Makefile.custom &auml;ndern, bevor Du <EM>./configure</EM> aufrufst.)
<P>
Einige SuSE-Versionen liefern nur ncurses, deshalb kann es sein, da&szlig; Du die
Benutzung von ncurses statt curses erzwingen mu&szlig;t, indem Du -lcurses in -lncurses &auml;nderst.
(best&auml;tigt f&uuml;r SuSE 5.1)
<P>
<H5>PostgreSQL (V6.4)</H5>
In PostgreSQL V6.4 &uuml;berpr&uuml;ft <CODE>configure</CODE> sowohl das Vorhandensein von
curses, als auch das von ncurses.
In der Zwischenzeit kannst Du den patch von <A HREF="mailto:ke@suse.de">Karl Eichwalder (ke@suse.de)</A>
anwenden:
<P>
<A HREF="http://www.PostgreSQL.ORG/mhonarc/pgsql-patches/msg00407.html">http://www.PostgreSQL.ORG/mhonarc/pgsql-patches/msg00407.html</A><BR>
oder (mit deutschen Bemerkungen):<BR>
<A HREF="http://www.suse.de/Support/sdb/ke_postgresql-632.html">http://www.suse.de/Support/sdb/ke_postgresql-632.html</A>
<P>
Es gab au&szlig;erdem einen Bericht, da&szlig; beim Update von SuSE 5.0 auf SuSE 5.2 der Link
von libtermcap.so.2.0.8 auf libtermcap.so nicht gesetzt wurde:
<PRE>
cd /usr/lib
ln -s libtermcap.so.2.0.8 libtermcap.so
</PRE>
<H4><A NAME="1.9">1.9)</A> Warum bekomme ich Probleme mit ld.so?</H4>
Falls Du Probleme mit ld.so bekommst - eine andere Bibliothek, die im ELF-System f&uuml;r dynamisches Laden
ben&ouml;tigt wird - dann hast Du Deine Systeminstallation oder wahrscheinlicher ein Linux-Update durcheinandergebracht
Siehe die Fragen <A HREF="#1.3">1.3</A>/<A HREF="#1.4">1.4</A>. M&ouml;glicherweise mu&szlig;t Du ld.so.x.y.z in /lib installieren
und ldconfig laufen lassen. Die aktuellste Version des ld-Packages ist 1.7.14. Zum Zeitpunkt des Schreibens dieser FAQ ist die Version 1.8 noch experimental.
<H4><A NAME="1.10">1.10)</A> Wieso bekomme ich <EM>yy_flush_buffer undefined</EM> Fehler?</H4>
Das ist nicht wirklich Linux-spezifisch, aber es tritt h&auml;ufiger auf alten Linux-Systemen auf.
Du brauchst eine aktuelle Version von flex (2.5.2. oder neuer), um PostgreSQL zu kompilieren. Beachte, da&szlig; flex 2.5.3.
einen Bug hat, siehe auch <A HREF="3.4">Frage 3.4</A>.
<H4><A NAME="1.11">1.11)</A> Wie kompiliere ich PostgreSQL auf einem a.out System?</H4>
Als erstes mu&szlig;t Du die dld-Bibliothek installieren. Diese gibt es auf Sunsite unter
Linux/libs/dld.3.2.7.tar.gz (<A HREF="ftp://sunsite.unc.edu/pub/Linux/libs/">ftp://sunsite.unc.edu/pub/Linux/libs/dld.3.2.7.tar.gz</A>).
<P>
Dann f&uuml;ge folgende Zeile in src/Makefile.custom hinzu:
<PRE>
LINUX_ELF=
</PRE>
oder benutze das <EM>customize Skript</EM>
<H4><A NAME="1.12">1.12)</A> Warum scheitert make mit der Meldung:<BR><EM>
yacc -d /disk2/PostgreSQL/src/backend/parser/gram.y
make: /usr/bin/make: cannot execute binary file</EM></H4>
Das war ein Problem in fr&uuml;hreren Versionen von Postgres95. Standardm&auml;&szlig;ig benutzt PostgreSQL <CODE>bison -y</CODE>
anstatt <CODE>yacc</CODE>.
<P>
yacc ist normalerweise als Skript implementiert, das <CODE>bison -y</CODE> aufruft. Aus verschiedenen Gr&uuml;nden ist
<EM>make</EM> nicht in der Lage, das Skript auszuf&uuml;hren (verschiedene Versionen von make? Verschiedene Versionen der bash?)
<P>
Um das zu beheben, &auml;ndere einfach die Datei src/mk/port/postgres.mk.linux am Ende. Die Zeile:
<PRE>
# YACC = bison -y
</PRE>
wird zu:
<PRE>
YACC = bison -y
</PRE>
<H4><A NAME="1.13">1.13)</A> Was sind die Bez&uuml;ge in der Bibliothek X11_LIB zu libsocket und libnsl in der Datei src/Makefile.global?</H4>
Das war ein Problem in Version 1.08 (Sun Solaris spezifisch). Sie sind behoben in 1.09 und 6.0
<H4><A NAME="1.14">1.14)</A> [DEBIAN] Wo ist die Bibliothek libtermcap?</H4>
Debian Linux kommt ohne die termcap-Bibliothek und benutzt ncurses (welche terminfo benutzt).
Es gibt keinen Grund, die CURSES_LIB-Variable in src/bin/psql/Makefile zu &auml;ndern, da Debian
einen Link von libncurses auf libcurses bereitstellt (im Gegensatz zu SuSE, siehe <A HREF="1.8">Frage 1.8</A>)
<P>
Du kannst die Datei src/bin/psql/Makefile wie folgt &auml;ndern:
<PRE>
ifeq ($(PORTNAME), linux)
LD_ADD+= -ltermcap
</PRE>
in
<PRE>
ifeq ($(PORTNAME), linux)
LD_ADD+=
</PRE>
<H4><A NAME="1.15">1.15)</A> [REDHAT] Kann ich PostgreSQL als RPM-Archiv bekommen?</H4>
Ja! <A HREF="mailto:mimo@lodz.pdi.net">Michal Mosiewicz</A> (<A HREF="http://www.pdi.lodz.pl/~mimo">http://www.pdi.lodz.pl/~mimo</A>)
hat ein RPM f&uuml;r PostgreSQL V6.0 auf Intel Architekturen zusammengestellt,
welches er nach <A HREF="ftp://ftp.redhat.org/pub/Incoming/">ftp://ftp.redhat.org/pub/Incoming/Postgres-6.0-1.i386.rpm</A>
hochgeladen hat.
<P>
Das ist eine vorkompilierte Version, das Quelltext-RPM stammt vom 03.02.1997.
<H4><A NAME="1.16">1.16)</A> W&auml;hrend ich versuche eine Entwickler-Version unter Linux zu kompilieren, bricht der Vorgang mit folgender
Fehlermeldung ab:<BR><EM>
In file included from /usr/include/sys/sem.h:8,<BR>
from ipc.c:37:<BR>
/usr/include/asm/bitops.h:32: warning: no previous prototype for Set_bit'<BR>
....<BR>
make: *** [ipc.o] Error 1</EM></H4>
Das Problem ist, da&szlig; Linux keine Prototypen f&uuml;r diese Inline-Funktionen bereith&auml;lt. Die L&ouml;sung
liegt darin, das Makefile in .../src/backend/storage/ipc/ zu &auml;ndern:
&Auml;ndere die Zeile:
<PRE>
CFLAGS+=$(INCLUDE_OPT)
</PRE>
in
<PRE>
CFLAGS+=$(INCLUDE_OPT) -Wno-error
</PRE>
Mache dasselbe dann im ../src/backend/storage/lmgr Verzeichnis.
<H4><A NAME="1.17">1.17)</A> Beim Kompilieren von PostgreSQL bricht der gcc mit einer Signal 11 Meldung ab.</H4>
Oder genauer: <EM>gcc: Internal compiler error: program cc1 got fatal signal 11</EM>
<P>
Das k&ouml;nnen Hardware/Speicherprobleme sein. PostgreSQL ist ein gro&szlig;es Programm und gro&szlig;e
gcc-Kompilierungsl&auml;fe (wie eben PostgreSQL oder eine Kernel-Kompilierung) beanspruchen den Hauptspeicher
wie wenig andere Programme. Dadurch k&ouml;nnen Fehler auftreten, die in normalen Situationen nicht erscheinen.
Niedrigere Betriebssysteme beanspruchen die Hardware ebenfalls nicht in diesem Ma&szlig;e, deshalb kann es sein, da&szlig; Du niemals
Probleme unter DOS/Windows siehst.
<P>
Mehr Information zu diesem Problem gibt es unter <A HREF="http://www.BitWizard.nl/sig11/">http://www.BitWizard.nl/sig11/</A> und
in deutsch unter <A HREF="http://www.suse.de/sdb/de/html/kfr_58.html">http://www.suse.de/sdb/de/html/kfr_58.html</A>.
<P>Laut dieser Sig11-FAQ scheint es ein spezielles Problem mit dem RedHat 5.0 gcc auf einem Cyrix-Prozessor zu geben.
Siehe bitte dort nach den Details nach.
<H4><A NAME="1.18">1.18)</A> Kann ich Version 6.1.1 unter MkLinux installieren?</H4>
<A HREF="mailto:t-ishii@sra.co.jp">Tatsuo Ishii</A> hat das unter MkLinux DR2.1 update2 geschafft, nachdem der kleine Patch
von <A HREF="ftp://ftp.sra.co.jp/pub/cmd/postgres/6.1.1/">ftp://ftp.sra.co.jp/pub/cmd/postgres/6.1.1/mklinux.patch.gz</A>
eingespielt wurde.
<H4><A NAME="1.19">1.19)</A> Warum stoppt make oder bricht sonstwie ab?</H4>
Es gibt eine Reihe von Reports dar&uuml;ber, da&szlig; gmake zu fr&uuml;h aussteigt oder mit einem Segmentation Fault aussteigt.
Das letzte Problem wurde von gmake 3.74 berichtet. Ein Update auf 3.76.1 l&ouml;ste dieses Problem.
Wie auch immer, 3.74 arbeitet bei vielen Leuten zur vollsten Zufriedenheit. Kurz gesagt, upgrade
Deinen gmake auf die aktuellste Version, bevor Du dieses Problem meldest.
<H4><A NAME="1.20">1.20)</A> Wie kann ich f&uuml;r die Prozessoren 486 oder Pentium optimieren?</H4>
Die Standard-Compilerflags f&uuml;hren keine Optimierung f&uuml;r den 486er oder den Pentium-Prozessor durch.
Um diese Optimierung zu aktivieren, f&uuml;ge wahlweise <U>eine</U> der folgenden Zeilen
der Datei Makefile.custom hinzu:
<PRE>
CFLAGS+= -m486
</PRE>
oder
<PRE>
CFLAGS+= -mpentium
</PRE>
oder
<PRE>
CFLAGS+= -mpentiumpro
</PRE>
<H4><A NAME="1.21">1.21)</A> Wieso bekomme ich seltsame Ergebnisse beim Drucken von Zeiten (z.B. beim Regressionstest 'timespan')?</H4>
Die Zeit erscheint z.B. als: "4 hours 59 mins 60.00 secs" und nicht als "5 hours"
<P>
Das ist ein Problem mit der glibc2-Bibliothek, die mit RedHat 5.0 ausgeliefert wird. Update Deine glibc auf die aktuellste RedHat-Version
f&uuml;r v5.0/Hurricane. Alle Versionen vor glibc-2.9.7 scheinen dieses Problem zu haben.
<H4><A NAME="1.22">1.22)</A> Warum bekomme ich keine shared libraries f&uuml;r libpq, wenn ich Version 6.3.2 kompiliere?</H4>
Es gab eine Last-Minute-&Auml;nderung der Linux-Konfiguration f&uuml;r Version 6.3.2.
Siehe f&uuml;r einige Fehlerbehebungen und einen Linux-ELF-Patch in <A HREF="ftp://postgresql.org/pub/patches/">ftp://postgresql.org/pub/patches/</A> nach.
<H4><A NAME="1.23">1.23)</A> Warum scheitert der Kompilierungslauf mit Nachrichten, da&szlig; F_BOOLIN, F_BOOLOUT und F_BYTEAIN nicht deklariert seien?</H4>
Die komplette Meldung sieht ungef&auml;hr so aus:
<PRE>
-I/usr/include/readline -O2 -Wall -Wmissing-prototypes -I..
-Wno-error -c bootstrap.c -o bootstrap.o
bootstrap.c:160: `F_BOOLIN' undeclared here (not in a function)
bootstrap.c:160: initializer element for `Procid[0].inproc' is not
constant
bootstrap.c:160: `F_BOOLOUT' undeclared here (not in a function)
bootstrap.c:160: initializer element for `Procid[0].outproc' is not
constant
bootstrap.c:161: `F_BYTEAIN' undeclared here (not in a function)
bootstrap.c:161: initializer element for `Procid[1].inproc' is not
constant
</PRE>
Solange Du nicht wei&szlig;t, warum das passiert, ist dieses Problem ziemlich kniffelig, da diese
Konstanten anscheinend nirgendwo definiert werden.
<P>
Die L&ouml;sung ist daf&uuml;r zu sorgen, da&szlig; der cpp in Deinem Pfad erreichbar ist, bevor
make gestartet wird.
<P>
Auf Redhat 5.1, ist cpp in /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3
<H3><A NAME="Sec2">Abschnitt 2: Hilfs- und Zusatzprogramme kompilieren</A></H3>
<H4><A NAME="2.1">2.1)</A> Der Linker findet die Bibliothek libX11 nicht, wenn pgtclsh kompiliert werden soll.</H4>
F&uuml;ge folgende Zeile in src/Makefile.custom hinzu:
<PRE>
X11_LIBDIR = /usr/X11R6/lib
</PRE>
<H3><A NAME="Sec3">Abschnitt 3: Laufzeit Probleme</A></H3>
<H4><A NAME="3.1">3.1)</A> Ich bekomme die Fehlermeldung <EM>_fUnKy_POSTPORT_sTuFf_ undefined</EM>, wenn Skripts wie createuser laufen.</H4>
Das ist ein Fehler in Versionen 1.06-1.07 und ist ab Version 1.08 und h&ouml;her behoben.
<H4><A NAME="3.2">3.2)</A> Nachdem ich postmaster starte, meldet das System <EM>Bad system call (Core dumped)</EM></H4>
Diese Fehlermeldung deutet an, da&szlig; Du keinen Shared-Memory-Support in den Kernel einkompiliert hast.
Der Kernel mu&szlig; mit dieser Option neu kompiliert werden, um diese Eigenschaft hinzuzuf&uuml;gen.
<H4><A NAME="3.3">3.3)</A> Wenn ich versuche, den Postmaster zu starten, bekomme ich eine Fehlermeldung wie:<BR><EM>
Failed Assertion("!(file != 0):(null)", File:<BR>
"/usr/local/PostgreSQL/src/backend/storage/file/fd.c", Line: 257)<BR>
!(file != 0) (0)<BR>
initdb: could not create template database<BR>
initdb: cleaning up.</EM></H4>
Deine Berechtigungen f&uuml;r die Datei /dev/null sind falsch gesetzt.
ein <CODE>ls -l /dev/null</CODE> sollte folgende Ausgabe zeigen:
<PRE>
crw-rw-rw- 1 root wheel 2, 2 Oct 8 18:41 /dev/null
</PRE>
Korrigiere die Berechtigungen mit:
<PRE>
chmod a+rw /dev/null
</PRE>
<H4><A NAME="3.4">3.4)</A> Warum funktioniert createuser nicht?</H4>
Es gibt ein Problem mit Version 2.5.3 des GNU flex und createuser. Die M&ouml;glichkeiten, diesen Fehler zu beheben sind:
Entweder auf die flex-Version 2.5.3 zu gehen, auf Version 2.5.4 zu gehen, oder
den Patch nach doc/README.flex einzuspielen.
<P>
Die Version 2.5.4. gibt es unter <A HREF="ftp://prep.ai.mit.edu/pub/gnu/">ftp://prep.ai.mit.edu/pub/gnu/flex-2.5.4.tar.gz</A>.
<H4><A NAME="3.5">3.5)</A> Wieso bekomme ich einen Fehler, wie:<BR><EM>
IpcMemoryCreate: memKey=155356396 , size=760632 ,<BR>
permission=384IpcMemoryCreate: shmget(..., create, ...)<BR>
failed: Invalid argument</EM></H4>
Du hast keine IPC-Unterst&uuml;tzung in Deinen Linux-Kernel einkompiliert.
Der Kernel mu&szlig; mit dieser Option neu kompiliert werden, um diese Eigenschaft hinzuzuf&uuml;gen.
<H4><A NAME="3.6">3.6)</A> Wieso scheitert der Aufruf von psql mit: <EM>psql: can't load library 'libpq.so.1</EM></H4>
Psql wurde mit dynamischen Zugriff auf die libpq-bibliothek kompiliert.
Um dieses Problem zu l&ouml;sen, solltest Du Dich als root anmelden und die Datei /etc/ld.so.conf editieren.
F&uuml;ge eine Zeile am Ende hinzu, die den Namen des PostgreSQL-Bibliotheken-Verzeichnis enth&auml;lt (das
lib-Verzeichnis im PostgreSQL-Installationsverzeichnis) und rufe den Befehl <CODE>/sbin/ldconfig -v</CODE> auf.
Alternativ (und falls Du keinen root-Zugriff hast) kannst Du die LD_LIBRARY_PATH-Variable
benutzen.
Die LD_LIBRARY_PATH-Variable enth&auml;lt eine durch Doppelpunkt getrennte Liste mit Suchpfaden f&uuml;r
Shared-Bibliotheken. Diese Liste wird durchsucht, bevor auf die Informationen von ldconfig zugegriffen wird.
Unter der bash sieht das ganze so aus:
<PRE>
export LD_LIBRARY_PATH='PathToPGSQL'/lib
</PRE>
unter der tcsh so:
<PRE>
setenv LD_LIBRARY_PATH 'PathToPGSQL'/lib
</PRE>
wobei 'PathToPGSQL' das Installationsverzeichnis von PostgreSQL ist.
Hinweis: der ldd-Befehl dient dazu, sich die dynamischen Bibliotheken f&uuml;r eine bestimmte
ausf&uuml;hrbare Datei anzeigen zu lassen.
<H4><A NAME="3.7">3.7)</A> Andere seltsame Verhaltensweisen</H4>
Ich bin mir nicht sicher, welche Symptome alle auftreten k&ouml;nnen, au&szlig;er da&szlig; gar nichts richtig funktioniert,
aber es stellte sich heraus, da&szlig; man sorgsam darauf achten sollte, da&szlig; die richtige Version der libpq-Bibliothek
geladen wird. Falls Du alte Versionen in Deinem Bibliothekspfad hast (z.B. in /usr/lib) k&ouml;nnen diese statt der
neueren Version geladen werden. Schaffe diese alten Versionen beiseite und siehe im &uuml;brigen
<A HREF="3.6">Frage 3.6</A> f&uuml;r weitere Details bez&uuml;glich dem Laden von Bibliotheken.
<H4><A NAME="3.8">3.8)</A> Wenn PostgreSQL beim Systemhalt lief, f&uuml;hrt Linux beim Neustart jedesmal einen Filesystemcheck (fsck) durch</H4>
Es gab dar&uuml;ber einige Berichte und es scheint, da&szlig; dies passiert, wenn PostgreSQL von der /etc/inittab
gestartet wird, wie im INSTALL-Dokument beschrieben.
<P>
Deshalb wird Dir empfohlen, den postmaster von einem rc-Skript aus zu starten.
Unter einem Slackware-artigem System w&uuml;rdest Du /etc/rc.d/rc.local modifizieren,
um den postmaster zu starten.
<P>
Unter RedHat-artigen Systemen w&uuml;rdest Du ein SysV-artiges Skript in /etc/rc.d/rc3.d
basierend auf der /etc/rc.d/init.d Schablonen-Datei erstellen.
<P>
Es gibt eine Beispieldatei unter dem Verzeichnis contrib/linux/postgres.init.
<P>
Hier ist noch ein anderes Beispiel von <A HREF="mailto:john@intelligent.co.uk">John Robinson</A>
welches Du entsprechend anpassen kannst.
<PRE>
#!/bin/sh
#
# postgreSQL.init This shell script takes care of starting and stopping
# the PostgreSQL postmaster.
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting postgres Postmaster daemon:"
if [ -z "`pidofproc postmaster`" ]
then
su postgres -c "/usr/local/pgsql/bin/postmaster -D /home/postgreSQL/data -p 5432 &"
echo -n " postmaster"
else
echo -n " (already running)"
fi
echo
touch /var/lock/subsys/postgres
;;
stop)
# Stop daemons.
echo -n "Shutting down postgres Postmaster daemon: "
killall -TERM postmaster 2&gt;/dev/null
killall -TERM postgres 2&gt;/dev/null
echo
rm -f /var/lock/subsys/postgres
;;
*)
echo "Usage: postgres {start|stop}"
exit 1
esac
exit 0
</PRE>
<H4><A NAME="3.9">3.9)</A> Warum dauert Query 32 in den RegressionsTests so lange?</H4>
Das passiert wegen eines Fehlers in den Regressions-Skripten auf Linux-Kisten.
Es gibt - soweit ich wei&szlig; - zwei M&ouml;glichkeiten, diese Fehler zu umgehen
(die Information stammt von <A HREF="mailto:t-ishii@sra.co.jp">Tatsuo Ishii</A>):
<P>
1. &auml;ndere folgende Zeile in regress.sh:
<PRE>
time postgres -texecutor -tplanner -Q bench &lt; bench.sql
</PRE>
in
<PRE>
postgres -texecutor -tplanner -Q bench &lt; bench.sql
</PRE>
2. nachdem der Test gelaufen ist, entferne eine Zeile ganz am Ende der Datei bench.out,
die ungef&auml;hr so aussieht:
<PRE>
85.86user 114.47system 4:49.20elapsed 69%CPU (0avgtext+0avgdata 0maxresident)k
</PRE>
dann gib folgendes auf der Befehlszeile ein:
<PRE>
sh ./perquery &lt; bench.out &gt; & bench.out.perquery
</PRE>
<H4><A NAME="#3.10">3.10)</A> Warum bekomme ich lustige Rundungsergebnisse in einigen Datums/Zeit-Berechnungen, wie:<BR><EM>
select '4 hours'::timespan;<BR>
liefert '3 hours 59 minutes 60 seconds'</EM>?</H4>
Du benutzt neue glibc2-Bibliotheken in einer Version kleiner als 2.0.7. Das ist ein mathematisches Rundungsproblem.
Aktualisiere Deine Bibliothek.
<H4><A NAME="3.11">3.11)</A> Wieso bekomme ich einen Fehler wie: <EM>IpcMemoryCreate: shmget failed (Permission denied)</EM>?</H4>
Im Detail erscheint der Fehler mit dieser Meldung:<BR>
<PRE>
In detail, a message like this may appear:
IpcMemoryCreate: shmget failed (Permission denied)
key=5432010, size=120, permission=700
IpcMemoryAttach: shmat failed (Permission denied) id=0
FATAL 1: AttachSLockMemory: could not attach segment
</PRE>
Dieser Fehler wird durch nicht gel&ouml;schte Segmente im <EM>shared memory</EM> verursacht.
(Du kannst sie mit dem Programm <EM>ipcs</EM> sehen.
Benutze das Programm <EM>ipcrm</EM>, um sie zu l&ouml;schen.
<HR>
<P><BR>
<P><BR>
<CENTER>
<TABLE BORDER=0 CELLSPACING=2 CELLPADDING=2>
<TR>
<TH COLSPAN=2>Author of the english version</TH>
</TR>
<TR>
<TD ALIGN=LEFT>Dr. Andrew C.R. Martin</TD>
<TD ALIGN=RIGHT>University College London</TD>
</TR>
<TR>
<TD ALIGN=LEFT>EMAIL: (Work) martin@biochem.ucl.ac.uk</TD>
<TD ALIGN=RIGHT>(Home) andrew@stagleys.demon.co.uk</TD>
</TR>
<TR>
<TD ALIGN=CENTER COLSPAN=2>URL: http://www.biochem.ucl.ac.uk/~martin</TD>
</TR>
<TR>
<TD ALIGN=LEFT>Tel: (Work) +44(0)171 419 3890</TD>
<TD ALIGN=RIGHT>(Home) +44(0)1372 275775</TD>
</TR>
</TABLE>
<P>
<TABLE BORDER=0 CELLSPACING=2 CELLPADDING=2>
<TR>
<TH COLSPAN=2>Translator of the german version</TH>
</TR>
<TR>
<TD ALIGN=LEFT>Karsten Schulz</TD>
<TD ALIGN=RIGHT>Linux Systemhaus Schulz</TD>
</TR>
<TR>
<TD ALIGN=LEFT>EMAIL: (Work) schulz@Linux-Systemhaus.de</TD>
<TD ALIGN=RIGHT>(Home) kaschu@t800.ping.de</TD>
</TR>
<TR>
<TD ALIGN=CENTER COLSPAN=2>URL: http://www.Linux-Systemhaus.de/</TD>
</TR>
<TR>
<TD ALIGN=LEFT>Tel: (Work) +49 231 3944432</TD>
<TD ALIGN=RIGHT>(Fax) +49 231 3944435</TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>

View File

@ -1,666 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.06 [en] (X11; I; Linux 2.1.105 i586) [Netscape]">
</HEAD>
<BODY BGCOLOR="#FFFDEC">
<PRE>=======================================================
Frequently Asked Questions (FAQ) per PostgreSQL >= V6.1
Specifiche per Linux Os
DA LEGGERE IN CONGIUNZIONE CON LE NORMALI FAQ
=======================================================
Ultimo aggiornamento:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lunedi' 18 Maggio 11:17:00 GMT 1998
Curatore corrente:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Andrew C.R. Martin (martin@biochem.ucl.ac.uk)
Autore originale:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Andrew C.R. Martin (martin@biochem.ucl.ac.uk)
Traduzione FAQ in italiano: Daniele Medri 'MaDriD' (madrid@darshan.org)
Cambiamenti in questa versione (* = modificato, + = nuovo, - = rimosso):
+1.21)&nbsp; Perche' ricevo strani risultati con i tempi di stampa (per esempio
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nel test di regressione 'timespan'?</PRE>
<PRE>Questo file &egrave; diviso approsimativamente nel sequente modo:
1.*)&nbsp;&nbsp;&nbsp; Istallare PostgreSQL
2.*)&nbsp;&nbsp;&nbsp; Compilare programmi accessori
3.*)&nbsp;&nbsp;&nbsp; Problemi di esecuzione
Domande risposte:
1.1)&nbsp;&nbsp;&nbsp; Quali cambiamenti devo fare a src/Makefile.global o a src/Makefile.custom
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e ci sono altri cambiamenti necessari?
1.2)&nbsp;&nbsp;&nbsp; Perche' ricevo problemi con missing libreadline?
1.3)&nbsp;&nbsp;&nbsp; [REDHAT] Perche' ricevo problemi di libdl e dlfcn.h perse?
1.4)&nbsp;&nbsp;&nbsp; [SLACKWARE 3.1] Perche' ricevo problemi di libdl e dlfcn.h perse?
1.5)&nbsp;&nbsp;&nbsp; La mia compilazione si arresta segnalando la mancanza dell'include file
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dlfcn.h perso.
1.6)&nbsp;&nbsp;&nbsp; GCC reclama una ignorata opzione -fpic
1.7)&nbsp;&nbsp;&nbsp; Ricevo messaggi di warning (errore) del tipo
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; warning: cast from pointer to integer of different size
1.8)&nbsp;&nbsp;&nbsp; [SuSE-Linux 4.2-4.4] Dove sono curses e termcap?
1.9)&nbsp;&nbsp;&nbsp; Perche' ho problemi con&nbsp; ld.so?
1.10)&nbsp;&nbsp; Perche' ricevo errori del tipo `yy_flush_buffer undefined'?
1.11)&nbsp;&nbsp; Come posso compilare PostgreSQL su un sistema a.out?
1.12)&nbsp;&nbsp; Che cosa fallisce con:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yacc -d /disk2/PostgreSQL/src/backend/parser/gram.y
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; make: /usr/bin/make: cannot execute binary file
1.13)&nbsp;&nbsp; Quali sono i riferimenti in X11_LIB a libsocket e libnsl in
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src/Makefile.global?
1.14)&nbsp;&nbsp; [DEBIAN] Dov'e' libtermcap?
1.15)&nbsp;&nbsp; [REDHAT] Posso trovare PostgreSQL come RPM?
1.16)&nbsp;&nbsp; Quando tento di compilare una versione in sviluppo sotto Linux, la
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; compilazione fallisce con il seguente messaggio:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In file included from /usr/include/sys/sem.h:8,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from ipc.c:37:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/include/asm/bitops.h:32: warning: no previous prototype for Set_bit'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ....
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; make: *** [ipc.o] Error 1
1.17)&nbsp;&nbsp; Quando sto' compilando postgres, gcc riporta un signal 11 e si interrompe.
1.18)&nbsp;&nbsp; Posso installare 6.1.1 su MkLinux?
1.19)&nbsp;&nbsp; Perche' esce o va in crash?
1.20)&nbsp;&nbsp; Come posso ottimizzarlo per un 486 o un processore pentium
1.21)&nbsp;&nbsp; Perche' ricevo strani risultati con i tempi di stampa (per esempio
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nel test di regressione 'timespan'?
2.1)&nbsp;&nbsp;&nbsp; Il linker non trova libX11 quando sta' compilando pgtclsh
3.1)&nbsp;&nbsp;&nbsp; Ricevo un messaggio tipo&nbsp; _fUnKy_POSTPORT_sTuFf_ non definito quando
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lancio uno script come createuser
3.2)&nbsp;&nbsp;&nbsp; Lancio postmaster e dopo il sistema dice 'Bad system call(Core&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dumped)'
3.3)&nbsp;&nbsp;&nbsp; Quando tento di lanciare Postmaster, perche' ricevo un errore del tipo
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Failed Assertion("!(file != 0):(null)", File:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "/usr/local/PostgreSQL/src/backend/storage/file/fd.c", Line: 257)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !(file != 0) (0)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; initdb: could not create template database
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; initdb: cleaning up.
3.4)&nbsp;&nbsp;&nbsp; Perche' createuser non funziona?
3.5)&nbsp;&nbsp;&nbsp; Perche' ricevo un errore del tipo:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IpcMemoryCreate: memKey=155356396 , size=760632 ,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; permission=384IpcMemoryCreate: shmget(..., create, ...)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; failed: Invalid argument
3.6)&nbsp;&nbsp;&nbsp; Perche' psql fallisce con:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; psql: can't load library 'libpq.so.1'
3.7)&nbsp;&nbsp;&nbsp; Altri comportamenti strani
3.8)&nbsp;&nbsp;&nbsp; Quando PostgreSQL e' attivo allo shutdown di sistema, Linux
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; esegue al reboot un fsck al disco.
3.9)&nbsp;&nbsp;&nbsp; Perche' la Query 32 nel test di regressione pretende molto tempo?
3.10)&nbsp;&nbsp; Perche' ricevo dei risultati arrotondati su date/time aritmetici,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; come
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select '4 hours'::timespan;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; returning '3 hours 59 minutes 60 seconds'?
----------------------------------------------------------------------
Sezione 1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Compilare PostgreSQL
----------------------------------------------------------------------
1.1)&nbsp;&nbsp;&nbsp; Quali cambiamenti devo fare a src/Makefile.global o a&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src/Makefile.custom e ci sono altri cambiamenti necessari?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I cambiamenti ai makefiles sono piu'facilmente fatti usando
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lo script di shell per la personalizzazione che si trova nella
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; directory src che scrive un file Makefile.custom appropriato.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I soli altri cambiamenti che tu devi fare e rimpiazzare Flex se tu
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hai una versione 2.5.3, la quale ha dei bug che si manifestano al
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fallimento di createuser (Vedi domanda 3.4)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Se tu modifichi i makefiles a mano, tu *devi* settare le seguenti
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; variabili:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PORTNAME=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; linux
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tu devi anche cambiare quello che segue per settare la tua propria&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; installazione:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSTGRESDIR
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Se tu cambi sull'opzione USE_TCL, devi settare questo:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TCL_INCDIR=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TCL_LIBDIR=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TCL_LIB=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TK_INCDIR=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TK_LIBDIR=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TK_LIB=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X11_INCDIR=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X11_LIBDIR=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X11_LIB=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sul mio sistema Slackware3.0 esse sono:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TCL_INCDIR=&nbsp;&nbsp;&nbsp;&nbsp; /usr/include/tcl
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TCL_LIBDIR=&nbsp;&nbsp;&nbsp;&nbsp; /usr/lib
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TCL_LIB=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -ltcl
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TK_INCDIR=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/include/tcl
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TK_LIBDIR=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/lib
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TK_LIB=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -ltk
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X11_INCDIR=&nbsp;&nbsp;&nbsp;&nbsp; /usr/include/X11
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X11_LIBDIR=&nbsp;&nbsp;&nbsp;&nbsp; /usr/X386/lib
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X11_LIB=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -lX11
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Devi fare ogni altro cambiamento necessario come documentato nel
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file INSTALL e in Makefile.global
1.2)&nbsp;&nbsp;&nbsp; Perche' ricevo problemi con missing libreadline?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I sistemi Linux in genere non vengono distribuiti con la libreria
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gnu readline installata. Si pu&ograve; in ogni caso o disattivare l'opzione
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; di readline in src/Makefile.global o src/Makefile.custom, oppure
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; installare la libreria GNU stessa (readline).
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Nota che Linux Debian (come FreeBSD) esce con le readline installate.
1.3)&nbsp;&nbsp;&nbsp; [REDHAT] Perche' ricevo problemi di libdl e dlfcn.h perse??
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Questa manifestazione avvisa che non c'e' la capacita' di linkare
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; funzioni come dlopen(), dlclose(), etc. durante l'ultima fase di compilazione.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; La libreria libdl e' usata per linkare in maniera dinamica le funzioni
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e rendere flessibile l'avvio dell'applicativo. Per alcune ragioni questa
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; non era presente nella distribuzione Red Hat. La versione Redhat 4.0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Colgate) a colmato a questa mancanza.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RedHat ha ora una nuova versione di ld.so in formato RPM nei propri siti FTP.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Scaricate:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ftp://ftp.redhat.com/pub/redhat/devel/i386/RedHat/RPMS/ld.so-1.7.14-4.i386.rpm
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Installa il file RPM nella maniera usuale e andra'!
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ATTENZIONE! Devi rilanciare nuovamente il file configure e fare un&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; make clean dopo aver installato la libreria e prima di ricompilare.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C'e' stata una sola notizia di sistema corrotto da programmi che&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; accedevano a queste librerie mentre venivano aggiornate (nessun altra&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sorpresa.) Conseguentemente e' una buona idea quella di fare un reboot
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; del sistema prima di installare le nuove librerie e avere pochi
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; processi attivi durante questo upgrade. Lanciare il sistema in
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; modalita' utente singolo (single-user) e' probabilmente una buona idea!
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Se tu vuoi fare la strada piu' dura, puoi ottenere la libreria e&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; l'header file da:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ftp://tsx-11.mit.edu/pub/linux/packages/GCC/ld.so-1.7.14.tar.gz
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Alternativamente puoi trovare i file binari precompilati in&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; distributions/debian/buzz/binary-i386/base/ld.so-1.7.14-4.deb
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nel medesimo sito, o seguire le istruzioni date alla domanda 1.2 per
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; correggere lo stesso errore con le aggiornate versioni di Slackware 3.1.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Non scegliere questo metodo se non sai quello che stai facendo!
1.4)&nbsp;&nbsp;&nbsp; [SLACKWARE 3.1] Perche' ricevo problemi di libdl e dlfcn.h perse??
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Questa manifestazione avvisa che non c'e' la capacita' di linkare
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; funzioni come dlopen(), dlclose(), etc. durante l'ultima fase di compilazione.</PRE>
<PRE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Guarda la risposta alla domanda 1.3. Slackware fino alla versione 3.0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; era provvista di questa libreria e degli include file e ritornarono nell'ultima
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; versione 3.1, ma la prima versione della 3.1 (prima del 9 settembre 1996)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; non aveva queste e molte versioni su CD-ROM erano state stampate&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; con la prima edizione.&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C'e' stata una sola notizia di sistema corrotto da programmi che&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; accedevano a queste librerie mentre venivano aggiornate (nessun altra&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sorpresa.) Conseguentemente e' una buona idea quella di fare un reboot
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; del sistema prima di installare le nuove librerie e avere pochi
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; processi attivi durante questo upgrade. Lanciare il sistema in
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; modalita' utente singolo (single-user) e' probabilmente una buona idea!
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Per fissare facilmente questo basta ottenere il file ldso.tgz dal quarto
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dischetto della piu' recente distribuzione Slackware e scompattarlo da
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dalla directory di root (/) e poi lanciare
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sh install/doinst.sh
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; per completare l'installazione. Successivamente lanciare
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ldconfig
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ATTENZIONE! Devi rilanciare nuovamente il file configure e fare un&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; make clean dopo aver installato la libreria e prima di ricompilare.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Se vuoi installarla manualmente bisogna installare prima il file
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dlfcn.h in /usr/include.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Secondo, installa il file libdl.so.1.7.14 (o qualsiasi altra versione)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in /lib, e poi fai:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd /lib
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ln -sf libdl.so.1.7.14 libdl.so.1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ln -sf libdl.so.1 libdl.so
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Su certi sistemi (a seconda della personale configurazione di GCC)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e' necessario fare:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd /usr/lib
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ln -sf /lib/libdl.so .
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Finalmente
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ldconfig
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ATTENZIONE! Devi rilanciare nuovamente il file configure e fare un&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; make clean dopo aver installato la libreria e prima di ricompilare.
1.5)&nbsp;&nbsp;&nbsp; La mia compilazione si arresta segnalando la mancanza dell'include file
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dlfcn.h perso.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Guarda la risposta 1.3/1.4. Non dimenticare che se stai usando un sistema
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a.out devi prima avere installato il pacchetto dld (il quale non viene
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fornito con molti sistemi a.out) per avere dlfcn.h e gli altri.&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Guarda la domanda 1.11.
1.6)&nbsp;&nbsp;&nbsp; GCC reclama una ignorata opzione -fpic
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Le prime versioni di GCC accettavano entrambe -fpic o -&pound;PIC.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Nelle piu' recenti versioni (V2.7.2?) richiede -&pound;PIC.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Se tu stai usando una versione ELF di Linux, questa puo' per sicurezza
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; essere ignorata perche' -&pound;PIC e' di default.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Puoi correggere questa editando il file src/Makefile.global e cambiare
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFLAGS_SL
1.7)&nbsp;&nbsp;&nbsp; Ricevo messaggi di warning (errore) del tipo
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; warning: cast from pointer to integer of different size
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Questi appararivano nelle prime versione di Postgres95 e posso per sicurezza
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; essere ignorate. PostgreSQL V6.0 dovrebbe compilare senza warnings
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ad eccezione di quelli relativi agli header file di sistema (i quali possono
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; essere ignorati per sicurezza).
1.8)&nbsp;&nbsp;&nbsp; [SuSE-Linux 4.2-4.4] Dove sono curses e termcap?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SuSE-Linux 4.2 ha le ncurses ma non le curses. 4.4 ha entrambe.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SuSE-Linux ha anche le librerie termcap in /usr/lib/termcap&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invece di essere in /usr/lib.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PostgreSQL (fino alla V6.0)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -----------------------
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Setta il valore delle CURSES_LIB in src/Makefile.custom a -lncurses&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (o fai questo attraverso lo script di personalizzazione).
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Aggiundi la seguente riga al file src/Makefile.custom:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LDADD_BE+= -L/usr/lib/termcap
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Devi editare il file src/bin/psql/Makefile e cambiare:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ifeq ($(PORTNAME), linux)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LD_ADD+=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; con:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ifeq ($(PORTNAME), linux)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LD_ADD+= -ltermcap
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PostgreSQL (V6.1)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -----------------
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lo script di configurazone non sa' di cercare nella directory&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/lib/termcap per le librerie termcap, percio' tu devi specificare
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; questo come una delle directory delle librerie dove cercare.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Se non funziona (non ho SuSE per verificare che vada)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; allora lancia configure, edita src/Makefile.global e aggiungi
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -ltermcap alla linea LDFLAGS
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (dopo -lreadline). (Alternativamente poi configurare&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src/Makefile.custom prima di lanciare configure.)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Alcune versioni di SuSE forniscono solo ncurses, percio' tu devi
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; forzare l'uso delle ncurses piuttosto che le curses cambiando&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -lcurses con -lncurses. (dimostrato per SuSE 5.1)
1.9)&nbsp;&nbsp;&nbsp; Perche' ho problemi con&nbsp; ld.so?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Se tu hai problemi con ld.so, un altra libreria richiesta sotto ELF
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; per il caricamento dinamico, allora hai creato disordine con la tua
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; installazione o fatto un upgrade di Linux.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Guarda le risposte alle domande 1.3/1.4. Devi installare ld.so.x.y.z in
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /lib e lanciare ldconfig.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; La piu' recente vesione stabile del pacchetto ld e&igrave; 1.7.14
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mentre scrivo, la versione 1.8.x di ld e' sperimentale.&nbsp;
1.10)&nbsp;&nbsp; Perche' ricevo errori del tipo `yy_flush_buffer undefined'?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Questo non e' specifico per Linux, ma e' comune nelle vecchie istallazione
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; di Linux. Devi avere una versione recente di Flex (2.5.2 o superiore)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; per compilare PostgreSQL. Nota che Flex 2.5.3 ha dei bug: guarda la&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; domanda 3.4.
1.11)&nbsp;&nbsp; Come posso compilare PostgreSQL su un sistema a.out?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Prima, devi installare la libreria dld. Puoi ottenere questa da Sunsite come:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Linux/libs/dld.3.2.7.tar.gz
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (ftp://sunsite.unc.edu/pub/Linux/libs/dld.3.2.7.tar.gz)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Secondo, aggiungi la seguente linea al file&nbsp; src/Makefile.custom:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LINUX_ELF=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (o usa lo script di configurazione)
1.12)&nbsp;&nbsp; Che cosa fallisce con:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yacc -d /disk2/PostgreSQL/src/backend/parser/gram.y
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; make: /usr/bin/make: cannot execute binary file
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Questo e' un problema delle prime versioni di Postgres95. Il default
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; per PostgreSQL e' di usare bison -y piuttosto che yacc.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yacc e' generalmente implementato come script che invoca bison -y
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Per alcune ragioni (certe versioni di make? certe versioni di bash?)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; make non puo' eseguire questo file di script.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Per correggere questo, edita semplicemente src/mk/port/postgres.mk.linux
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e alla fine del file cambia:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # YACC = bison -y
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; con
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; YACC = bison -y
1.13)&nbsp;&nbsp; Quali sono i riferimenti in X11_LIB a libsocket e libnsl in
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; src/Makefile.global?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Questo era un problema nella versione 1.08 (specifica per Sun Solaris)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E' stata fissata nella 1.09 e 6.0
1.14)&nbsp;&nbsp; [DEBIAN] Dov'e'&nbsp; libtermcap?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debian Linux viene distribuita senza librerie termcap e usa ncurses&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (le quali usano terminfo all'interno). Non c'e' bisogno di cambiare la
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; variabile CURSES_LIB&nbsp; in src/bin/psql/Makefile peche' Debian provvede&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; con un link da libncurses a libcurses (diversamente da SuSE-Linux --
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Vedi domanda 1.8).
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Devi editare src/bin/psql/Makefile e commentare i cambiamenti:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ifeq ($(PORTNAME), linux)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LD_ADD+= -ltermcap
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; con:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ifeq ($(PORTNAME), linux)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LD_ADD+=
1.15)&nbsp;&nbsp; [REDHAT] Posso trovare PostgreSQL come RPM?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Si! Michal Mosiewicz&nbsp;<mimo@lodz.pdi.net>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (http://www.pdi.lodz.pl/~mimo) ha creato un RPM
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; per PostgreSQL V6.0 per architettura Intel uplodata a&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ftp://ftp.redhat.org/pub/Incoming/Postgres-6.0-1.i386.rpm
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Questa e' una precompilata versione, le sorgenti RPM erano come
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; io ho scritto (3 Febbraio 1997).
1.16)&nbsp;&nbsp; Quando tento di compilare una versione in sviluppo sotto Linux, la
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; compilazione fallisce con il seguente messaggio:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In file included from /usr/include/sys/sem.h:8,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from ipc.c:37:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/include/asm/bitops.h:32: warning: no previous prototype for Set_bit'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ....
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; make: *** [ipc.o] Error 1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Il problema e' che Linux non prevede prototipi per queste funzioni inline.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; La soluzione e' di andare dentro la directory .../src/backend/storage/ipc
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ed editare Makefile.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cambia la linea
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFLAGS+=$(INCLUDE_OPT)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; con
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFLAGS+=$(INCLUDE_OPT) -Wno-error
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fai lo stesso con la directory ../src/backend/storage/lmgr.
1.17)&nbsp;&nbsp; Quando sto' compilando postgres, gcc riporta un signal 11 e si interrompe.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Piu' specificatamente:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gcc: Internal compiler error: program cc1 got fatal&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; signal 11
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Questo e' un problema di hardware/memoria. PostgreSQL e' un grande
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; programma, e una larga compilazione con gcc (come la compilazione
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; di PostgreSQL o la compilazione del kernel) stressa la memoria come
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; molti altri programmi, mostrando errori che non appaiono nelle normali
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; operazioni. Sistemi operativi inferiori non riescono a stressare l'hardware
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in questo modo, per questo non vedrai mai questi errori sotto DOS/Windows.&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Maggiori informazioni in merito:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; http://www.bitwizard.nl/sig11
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Da questo Sig11 FAQ, sembra essere un errore specifico con Redhat 5.0&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lanciando su un processore Cyrix. Guarda il link superiore per i dettagli!
1.18)&nbsp;&nbsp; Posso installare 6.1.1 su MkLinux?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tatsuo Ishii&nbsp;<t-ishii@sra.co.jp> ha fatto questo su MkLinux DR2.1 update2 dopo una piccola
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; patch disponibile presso:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ftp://ftp.sra.co.jp/pub/cmd/postgres/6.1.1/mklinux.patch.gz
1.19)&nbsp;&nbsp; Perche' esce o va in crash??
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ci sono state diverse segnalazioni di gmake, dove in tutte si usciva
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subito e c'era una seg faulting. Il problema piu' marcato e' stato&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; riportato con gmake 3.74 - upgradandolo alla 3.76.1 si e' risolto.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Comunque, la versione 3.74 e' funzionante per altri tipi di setup.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In breve, prova ad upgradare gmake all'ultima versione che puoi trovare
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; prima di riportarlo come un problema.
1.20)&nbsp;&nbsp; Come posso ottimizzarlo per un 486 o un processore pentium
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Le flags di compilazione per default non permettono l'optimizzazione per 486
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; o per processori Pentium. Per aggiungerla come ottimizzazione, edita
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Makefile.custom e aggiungi:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFLAGS+= -m486
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; o (per i nuovi compilatori che molte persone non stanno usando)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFLAGS+= -mpentium
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; o
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CFLAGS+= -mpentiumpro
1.21)&nbsp;&nbsp; Perche' ricevo strani risultati con i tempi di stampa (per esempio
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nel test di regressione 'timespan'?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Le ore appaiono come: '4 hours 59 mins 60.00 secs'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invece di '5 hours'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Questo e' un problema con le librerie glibc2 le quali appaiono con
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RedHat 5.0. Aggiorna le tue glibc con le ultime versioni di RedHat per
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v5.0/hurricane. Tutto quello che e' anteriore alle glibc-2.0.7 ha&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; questi problemi.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
----------------------------------------------------------------------
Sezione 2:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Compilare programmi accessori
----------------------------------------------------------------------
2.1)&nbsp;&nbsp;&nbsp; Il linker non trova libX11 quando sta' compilando pgtclsh
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Aggiungi la seguente riga al file src/Makefile.custom
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; X11_LIBDIR = /usr/X11R6/lib
----------------------------------------------------------------------
Sezione 3:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Problemi di esecuzione
----------------------------------------------------------------------
3.1)&nbsp;&nbsp;&nbsp; Ricevo un messaggio tipo&nbsp; _fUnKy_POSTPORT_sTuFf_ non definito quando
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lancio uno script come createuser
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Questo e' un bug nella V.1.06-V1.07 di Postgres ed e' fissata con la versione
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.08 o superiore.
3.2)&nbsp;&nbsp;&nbsp; Lancio postmaster e dopo il sistema dice 'Bad system call(Core&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dumped)'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Questo indica che non hai compilato il supporto per la memoria condivisa nel
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kernel. Devi ricompilare il kernel per aggiungere questa feature.
3.3)&nbsp;&nbsp;&nbsp; Quando tento di lanciare Postmaster, perche' ricevo un errore del tipo
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Failed Assertion("!(file != 0):(null)", File:&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "/usr/local/PostgreSQL/src/backend/storage/file/fd.c", Line: 257)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !(file != 0) (0)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; initdb: could not create template database
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; initdb: cleaning up.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I permessi sul file /dev/null sono sbagliati.&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ls -l /dev/null should give you something like:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; crw-rw-rw-&nbsp; 1 root&nbsp; wheel&nbsp;&nbsp;&nbsp; 2,&nbsp;&nbsp; 2 Oct&nbsp; 8 18:41 /dev/null
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Correggi i permessi con:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chmod a+rw /dev/null
3.4)&nbsp;&nbsp;&nbsp; Perche' createuser non funziona?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C'e' un problema con la versione 2.5.3 di GNU Flex e createuser.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Le tue opzioni devono recedere a Flex V2.5.2, aggiornale alla V2.5.4 o
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; applica una patch alla V2.5.3 la quale e' fornita in doc/README.flex
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Puoi ottenere la V.2.5.4 da:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ftp://prep.ai.mit.edu/pub/gnu/flex-2.5.4.tar.gz
3.5)&nbsp;&nbsp;&nbsp; Perche' ricevo un errore del tipo:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IpcMemoryCreate: memKey=155356396 , size=760632 ,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; permission=384IpcMemoryCreate: shmget(..., create, ...)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; failed: Invalid argument
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Non hai compilato il supporto IPC nel kernel di Linux.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Devi ricompilare il kernel con questa opzione.
3.6)&nbsp;&nbsp;&nbsp; Perche' psql fallisce con:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; psql: can't load library 'libpq.so.1'
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Psql e' stata compilata per linkarsi dinamicamente con la libreria libpq.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Per risolvere questo, devi accedere come root ed editare il file
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /etc/ld.so.conf
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Aggiungi una linea singola alla fine, la quale prende il nome della directory
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delle librerie di PostgreSQL (la sottodirectory delle librerie&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dell'installazione diPostgreSQL) e lancia
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /sbin/ldconfig -v
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Alternativamente, (e se tu non hai accesso come root), devi usare la
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; variabile di ambiente LD_LIBRARY_PATH.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; La variabile LD_LIBRARY_PATH contiene una lista di paths per ricercare le librerie
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; condivise. Questa lista e' ricercata prima delle librerie specificate da ldconfig.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Percio' sotto Bash, devi fare qualcosa del tipo:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; export LD_LIBRARY_PATH='PathToPGSQL'/lib
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; o, usando tcsh
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setenv LD_LIBRARY_PATH 'PathToPGSQL'/lib
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rimpiazzando 'PathToPGSQL' con l'appropriato path alla tua directory PostgreSQL
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; al top level.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Nota che il comando ldd puo' essere eseguito su un programma linkato dinamicamente
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alla lista di paths a tutte le librerie condivise sopra, alle quali gli eseguibili
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dipendono.
3.7)&nbsp;&nbsp;&nbsp; Altri comportamenti strani
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Non sono sicuro quali siano i sintomi che non permettono la corretta esecuzione,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ma si puo' ipotizzare che le ragioni vadano oltre il regolare funzionamento del&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; loader dinamico nel caricare la corretta versione delle librerie libpq.&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Se hai una versione vecchia dai una occhiata al path delle librerie
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (per esempio in /usr/lib) che dovrebbero caricare nelle nuove versioni che intendi
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; far girare. Renditi sicuro di prendere queste nel percorso e guarda la Domanda 3.6&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; per i dettagli in merito al caricamento dinamico delle librerie.
3.8)&nbsp;&nbsp;&nbsp; Quando PostgreSQL e' attivo allo shutdown di sistema, Linux
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; esegue al reboot un fsck al disco.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ci sono state alcune segnalazioni di questo e sembre essere il
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; risultato di lanciare PostgreSQL dal /etc/inittab come suggerito
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nel file INSTALL.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Si raccomanda percio' di lanciare il postmaster da un rc script.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sotto una versione di tipo Slackware, devi modificare /etc/rc.d/rc.local
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; per lanciare il postmaster. Sotto una versione in stile RedHat
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; devi creare uno script in stile SysV sotto /etc/rc.d/rc3.d basato
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sul file /etc/rc.d/init.d.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C'e' un esempio di file in contrib/linux/postgres.init
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Un altro file di esempio &egrave; proposto da John Robinson&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<john@intelligent.co.uk> il quale puo' essere modificato a seconda delle esigenze:
#!/bin/sh
#
# postgreSQL.init This shell script takes care of starting and stopping
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the PostgreSQL postmaster.
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] &amp;&amp; exit 0
# See how we were called.
case "$1" in
&nbsp; start)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Start daemons.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo -n "Starting postgres Postmaster daemon:"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ -z "`pidofproc postmaster`" ]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; su postgres -c "/usr/local/pgsql/bin/postmaster -D /home/postgreSQL/data -p 5432 &amp;"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo -n " postmaster"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo -n " (already running)"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; touch /var/lock/subsys/postgres
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;
&nbsp; stop)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Stop daemons.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo -n "Shutting down postgres Postmaster daemon: "
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; killall -TERM postmaster 2>/dev/null
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; killall -TERM postgres 2>/dev/null
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rm -f /var/lock/subsys/postgres
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;
&nbsp; *)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "Usage: postgres {start|stop}"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit 1
esac
exit 0
3.9)&nbsp;&nbsp;&nbsp; Perche' la Query 32 nel test di regressione pretende molto tempo?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Questo e' un bug nello script di regressione presente su Linux Os.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ci sono due raggiri per evitarli (informazione di Tatsuo Ishii&nbsp;<t-ishii@sra.co.jp>):
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1. cambia quello che segue in regress.sh:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; time postgres -texecutor -tplanner -Q bench &lt; bench.sql
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; postgres -texecutor -tplanner -Q bench &lt; bench.sql
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2. dopo aver lanciato il test, rimuovi la linea finale di&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bench.out, qualcosa del tipo:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 85.86user 114.47system 4:49.20elapsed 69%CPU (0avgtext+0avgdata 0maxresident)k
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; poi digita:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sh ./perquery &lt; bench.out > &amp; bench.out.perquery
3.10)&nbsp;&nbsp; Perche' ricevo dei risultati arrotondati su date/time aritmetici,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; come
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select '4 hours'::timespan;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; returning '3 hours 59 minutes 60 seconds'?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Stai usando le nuove librerie glibc2 e hai una versione precedene alla
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.0.7. E' un problema di arrotondamento matematico nella libreria.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Aggiorna le tue librerie.</PRE>
<PRE>
----------------------------------------------------------------------------
Dr. Andrew C.R. Martin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; University College London
EMAIL: (Work) martin@biochem.ucl.ac.uk&nbsp;&nbsp;&nbsp; (Home) andrew@stagleys.demon.co.uk
URL:&nbsp;&nbsp; http://www.biochem.ucl.ac.uk/~martin
Tel:&nbsp;&nbsp; (Work) +44(0)171 419 3890&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Home) +44(0)1372 275775
----------------------------------------------------------------------------
Daniele Medri 'MaDriD' - e-mail: madrid@darshan.org web: www.darshan.org&nbsp;&nbsp;
----------------------------------------------------------------------------</PRE>
</BODY>
</HTML>