1 ============================================================
2 Frequently Asked Questions (FAQ) for PostgreSQL
4 To be read in conjunction with the installation instructions.
5 ============================================================
6 Last updated: $Date: 2007/02/23 23:22:33 $
11 1) What tools do I need to build and install PostgreSQL on Solaris?
12 2) Why do I get problems when building with OpenSSL support?
13 3) Why does configure complain about a failed test program?
14 4) Why does my 64-bit build sometimes crash?
15 5) How can I compile for optimum performance?
16 6) Where I can download prepared Solaris packages?
17 7) How can I tune PostgreSQL and Solaris for performance?
18 8) Can I use DTrace for tracing PostgreSQL?
21 1) What tools do I need to build and install PostgreSQL on Solaris?
25 gzip (for installing the documentation)
27 GNU Readline library (optional)
30 You can download Sun Studio from:
31 http://developers.sun.com/prodtech/cc/downloads/index.jsp
33 Many of GNU tools are integrated into Solaris 10, or they are present
34 on the Solaris companion CD.
36 If you like packages for older version of Solaris, you can find these
39 http://www.sunfreeware.com or http://www.blastwave.org
41 If you prefer sources, look here:
43 http://www.gnu.org/order/ftp.html
45 You can build with either GCC or Sun's compiler suite. For better
46 code optimization, Sun's compiler is strongly recommended on the SPARC
47 architecture. We have heard reports of problems when using GCC
48 2.95.1; gcc 2.95.3 or later is recommended. If you are using Sun's
49 compiler, be careful not to select /usr/ucb/cc; use
53 2) Why do I get problems when building with OpenSSL support?
55 When you build PostgreSQL with OpenSSL support you might get compilation
56 errors in the following files:
58 src/backend/libpq/crypt.c
59 src/backend/libpq/password.c
60 src/interfaces/libpq/fe-auth.c
61 src/interfaces/libpq/fe-connect.c
63 This is because of a namespace conflict between the standard
64 /usr/include/crypt.h header and the header files provided by OpenSSL.
66 Upgrading your OpenSSL installation to version 0.9.6a fixes this
67 problem. Solaris 9 and above has a newer version of OpenSSL.
70 3) Why does configure complain about a failed test program?
72 This is probably a case of the run-time linker being unable to find
73 some library, probably libz, libreadline or some other non-standard
74 library such as libssl. To point it to the right location, set the
75 LDFLAGS environment variable, e.g.,
77 LDFLAGS="-R /usr/sfw/lib:/opt/sfw/lib:/usr/local/lib"
80 and restart configure. See the ld(1) man page for more
84 4) Why does my 64-bit build sometimes crash?
86 On Solaris 7 and older, the 64-bit version of libc has a buggy vsnprintf
87 routine, which leads to erratic core dumps in PostgreSQL. The simplest
88 known workaround is to force PostgreSQL to use its own version of
89 vsnprintf rather than the library copy. To do this, after you run
90 'configure' edit a file produced by configure:
92 In src/Makefile.global, change the line
100 (There might be other files already listed in this variable. Order
106 5) How can I compile for optimal performance?
108 On the SPARC architecture, Sun Studio is strongly recommended for
109 compilation. Try using the -xO5 optimization flag to generate
110 significantly faster binaries. Do not use any flags that modify
111 behavior of floating point operations and errno processing (e.g.,
112 -fast). These flags could raise some nonstandard PostgreSQL behavior
113 for example in the date/time computing.
115 If you do not have a reason to use 64-bit binaries on SPARC, prefer
116 the 32-bit version. The 64-bit operations are slower and 64-bit
117 binaries are slower than the 32-bit variants. And on other hand,
118 32-bit code on the AMD64 CPU family is not native, and that is why
119 32-bit code is significant slower on this CPU family.
122 6) Where I can download prepared Solaris packages?
124 The PostgreSQL is bundled with Solaris 10 (from update 2). Official
125 packages are also available on
126 <http://pgfoundry.org/projects/solarispackages/>. Packages for older
127 Solaris version (8, 9) you can be obtained from
128 <http://www.sunfreeware.com/> or <http://www.blastwave.org/>.
131 7) How can I tune PostgreSQL and Solaris for performance?
133 Some tuning tricks can be found here:
135 http://www.sun.com/servers/coolthreads/tnb/applications_postgresql.jsp
137 This article is primary focused on T2000 platform, but many of the
138 recommendations are also useful on other hardware with Solaris.
141 8) Can I use DTrace for tracing PostgreSQL?
143 Yes, see the chapter "Monitoring Database Activity" in the documentation
144 for further information.
146 You can also find more information here:
148 http://blogs.sun.com/robertlor/entry/user_level_dtrace_probes_in
150 If you see the linking of the postgres executable abort with an error
153 Undefined first referenced
155 AbortTransaction utils/probes.o
156 CommitTransaction utils/probes.o
157 ld: fatal: Symbol referencing errors. No output written to postgres
158 collect2: ld returned 1 exit status
159 gmake: *** [postgres] Error 1
161 your DTrace installation is too old to handle probes in static
162 functions. You need Solaris 10u4 or newer. Workaround is remove static
163 keyword from AbortTransaction and CommitTransaction functions declaration in
164 src/backend/access/transam/xact.c.
166 See http://sunsolve.sun.com/search/document.do?assetkey=1-1-2139224-1
167 (registration required).