postgresql/doc/FAQ_Solaris

165 lines
5.5 KiB
Plaintext
Raw Normal View History

2001-03-14 04:42:11 +08:00
============================================================
2002-11-12 04:04:05 +08:00
Frequently Asked Questions (FAQ) for PostgreSQL
2001-03-14 04:42:11 +08:00
Sun Solaris specific
To be read in conjunction with the installation instructions.
2001-03-14 04:42:11 +08:00
============================================================
Last updated: $Date: 2006/12/03 16:43:05 $
1999-09-27 11:34:54 +08:00
Contents:
2001-03-14 04:42:11 +08:00
1) What tools do I need to build and install PostgreSQL on Solaris?
2) Why do I get problems when building with OpenSSL support?
2001-04-05 04:02:31 +08:00
3) Why does configure complain about a failed test program?
2003-10-10 01:11:13 +08:00
4) Why does my 64-bit build sometimes crash?
5) How can I compile for optimum performance?
2006-10-11 06:19:08 +08:00
6) Where I can download prepared Solaris packages?
7) How can I tune PostgreSQL and Solaris for performance?
8) Can I use DTrace for tracing PostgreSQL?
2001-03-14 04:42:11 +08:00
1) What tools do I need to build and install PostgreSQL on Solaris?
1999-09-27 11:34:54 +08:00
You will need
2006-10-11 06:19:08 +08:00
gzip (for installing the documentation)
GNU Make
GNU Readline library (optional)
Sun Studio CC or GCC
2006-10-05 06:03:22 +08:00
You can download Sun Studio from:
http://developers.sun.com/prodtech/cc/downloads/index.jsp
1999-09-27 11:34:54 +08:00
2006-10-11 06:19:08 +08:00
Many of GNU tools are integrated into Solaris 10, or they are present
on the Solaris companion CD.
2006-10-05 06:03:22 +08:00
If you like packages for older version of Solaris, you can find these
tools here:
http://www.sunfreeware.com or http://www.blastwave.org
1999-09-27 11:34:54 +08:00
If you prefer sources, look here:
http://www.gnu.org/order/ftp.html
2006-10-11 06:19:08 +08:00
You can build with either GCC or Sun's compiler suite. For better
code optimization, Sun's compiler is strongly recommended on the SPARC
architecture. We have heard reports of problems when using GCC
2.95.1; gcc 2.95.3 or later is recommended. If you are using Sun's
compiler, be careful not to select /usr/ucb/cc; use
/opt/SUNWspro/bin/cc.
1999-09-27 11:34:54 +08:00
2001-03-14 04:42:11 +08:00
2) Why do I get problems when building with OpenSSL support?
1999-09-27 11:34:54 +08:00
When you build PostgreSQL with OpenSSL support you might get compilation
errors in the following files:
1999-09-27 11:34:54 +08:00
src/backend/libpq/crypt.c
src/backend/libpq/password.c
src/interfaces/libpq/fe-auth.c
src/interfaces/libpq/fe-connect.c
1999-09-27 11:34:54 +08:00
2001-03-14 04:42:11 +08:00
This is because of a namespace conflict between the standard
/usr/include/crypt.h header and the header files provided by OpenSSL.
1999-09-27 11:34:54 +08:00
Upgrading your OpenSSL installation to version 0.9.6a fixes this
2006-10-11 06:19:08 +08:00
problem. Solaris 9 and above has a newer version of OpenSSL.
2006-10-05 06:03:22 +08:00
2001-04-05 04:02:31 +08:00
3) Why does configure complain about a failed test program?
2006-10-11 06:19:08 +08:00
This is probably a case of the run-time linker being unable to find
some library, probably libz, libreadline or some other non-standard
library such as libssl. To point it to the right location, set the
LD_LIBRARY_PATH environment variable, e.g.,
2001-04-05 04:02:31 +08:00
LD_LIBRARY_PATH=/usr/sfw/lib:/opt/sfw/lib:/usr/local/lib
export LD_LIBRARY_PATH
2001-04-05 04:02:31 +08:00
and restart configure. You will also have to keep this setting whenever
you run any of the installed PostgreSQL programs. Alternatively, set
the environment variable LD_RUN_PATH. See the ld(1) man page for more
information.
2002-11-12 04:04:05 +08:00
4) Why does my 64-bit build sometimes crash?
On Solaris 7 and older, the 64-bit version of libc has a buggy vsnprintf
routine, which leads to erratic core dumps in PostgreSQL. The simplest
known workaround is to force PostgreSQL to use its own version of
vsnprintf rather than the library copy. To do this, after you run
'configure' edit a file produced by configure:
In src/Makefile.global, change the line
LIBOBJS =
to read
LIBOBJS = snprintf.o
(There might be other files already listed in this variable. Order
does not matter.)
Then build as usual.
2006-10-05 06:03:22 +08:00
2006-10-11 06:19:08 +08:00
5) How can I compile for optimal performance?
2006-10-05 06:03:22 +08:00
2006-10-11 06:19:08 +08:00
On the SPARC architecture, Sun Studio is strongly recommended for
compilation. Try using the -xO5 optimization flag to generate
significantly faster binaries. Do not use any flags that modify
behavior of floating point operations and errno processing (e.g.,
-fast). These flags could raise some nonstandard PostgreSQL behavior
for example in the date/time computing.
2006-10-05 06:03:22 +08:00
2006-10-11 06:19:08 +08:00
If you do not have a reason to use 64-bit binaries on SPARC, prefer
the 32-bit version. The 64-bit operations are slower and 64-bit
binaries are slower than the 32-bit variants. And on other hand,
32-bit code on the AMD64 CPU family is not native, and that is why
32-bit code is significant slower on this CPU family.
2006-10-05 06:03:22 +08:00
2006-10-11 06:19:08 +08:00
6) Where I can download prepared Solaris packages?
2006-10-05 06:03:22 +08:00
2006-10-11 06:19:08 +08:00
The PostgreSQL is bundled with Solaris 10 (from update 2). Official
packages are also available on
<http://pgfoundry.org/projects/solarispackages/>. Packages for older
Solaris version (8, 9) you can be obtained from
<http://www.sunfreeware.com/> or <http://www.blastwave.org/>.
2006-10-05 06:03:22 +08:00
2006-10-11 06:19:08 +08:00
7) How can I tune PostgreSQL and Solaris for performance?
2006-10-05 06:03:22 +08:00
Some tuning tricks can be found here:
http://www.sun.com/servers/coolthreads/tnb/applications_postgresql.jsp
2006-10-05 06:03:22 +08:00
2006-10-11 06:19:08 +08:00
This article is primary focused on T2000 platform, but many of the
recommendations are also useful on other hardware with Solaris.
2006-10-05 06:03:22 +08:00
2006-10-11 06:19:08 +08:00
8) Can I use DTrace for tracing PostgreSQL?
2006-10-05 06:03:22 +08:00
Yes, see the chapter "Monitoring Database Activity" in the documentation
for further information.
2006-10-05 06:03:22 +08:00
2006-10-11 06:19:08 +08:00
If you see the linking of the postgres executable abort with an error
message like
2006-10-05 06:03:22 +08:00
Undefined first referenced
symbol in file
AbortTransaction utils/probes.o
CommitTransaction utils/probes.o
ld: fatal: Symbol referencing errors. No output written to postgres
collect2: ld returned 1 exit status
gmake: *** [postgres] Error 1
2006-10-11 06:19:08 +08:00
your DTrace installation is too old to handle probes in static
functions. You need Solaris 10u3 or newer.
2006-10-05 06:03:22 +08:00
2006-10-11 06:19:08 +08:00
You can also find more information here:
2006-10-05 06:03:22 +08:00
2006-10-11 06:19:08 +08:00
http://blogs.sun.com/robertlor/entry/user_level_dtrace_probes_in