@@ -3,7 +3,7 @@ Frequently Asked Questions (FAQ) for PostgreSQL
3
3
Sun Solaris specific
4
4
To be read in conjunction with the installation instructions.
5
5
============================================================
6
- Last updated: $Date: 2006/10/05 03:13:15 $
6
+ Last updated: $Date: 2006/10/10 22:19:08 $
7
7
8
8
9
9
Contents:
@@ -13,25 +13,25 @@ Contents:
13
13
3) Why does configure complain about a failed test program?
14
14
4) Why does my 64-bit build sometimes crash?
15
15
5) How can I compile for optimum performance?
16
- 6)How to compile PostgreSQL with Sun Studio ?
17
- 7)Where I can download prepared Solarispackages ?
18
- 8)How to tune PostgreSQL and Solaris forbest performance ?
19
- 9) Can I use dtrace for tracing PostgreSQL?
16
+ 6)Where I can download prepared Solaris packages ?
17
+ 7)How can I tune PostgreSQL and Solarisfor performance ?
18
+ 8)Can I use DTrace fortracing PostgreSQL ?
19
+
20
20
21
21
1) What tools do I need to build and install PostgreSQL on Solaris?
22
22
23
23
You will need
24
24
25
- GNU zip (for installing the documentation)
26
- GNUmake
27
- GNUreadline library (optional)
28
- Sun Studio CC or GCC
25
+ gzip (for installing the documentation)
26
+ GNUMake
27
+ GNUReadline library (optional)
28
+ Sun Studio CC or GCC
29
29
30
30
You can download Sun Studio from:
31
31
http://developers.sun.com/prodtech/cc/downloads/index.jsp
32
32
33
- Many of GNU tools are integrated intothe Solaris 10 or they are
34
- present on the Solaris companion CD.
33
+ Many of GNU tools are integrated into Solaris 10, or they are present
34
+ on the Solaris companion CD.
35
35
36
36
If you like packages for older version of Solaris, you can find these
37
37
tools here:
@@ -42,11 +42,12 @@ If you prefer sources, look here:
42
42
43
43
http://www.gnu.org/order/ftp.html
44
44
45
- You can build with either GCC or Sun's compiler suite. For better code
46
- optimalization Sun's compiler is strongly recommended on the SPARC
47
- architecture. We have heard reports of problems when using gcc 2.95.1;
48
- gcc 2.95.3 or later is recommended. If you are using Sun's compiler, be
49
- careful *not* to select /usr/ucb/cc; use /opt/SUNWspro/bin/cc.
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
50
+ /opt/SUNWspro/bin/cc.
50
51
51
52
52
53
2) Why do I get problems when building with OpenSSL support?
@@ -63,15 +64,15 @@ This is because of a namespace conflict between the standard
63
64
/usr/include/crypt.h header and the header files provided by OpenSSL.
64
65
65
66
Upgrading your OpenSSL installation to version 0.9.6a fixes this
66
- problem. Solaris 9 and abovealready newer version of OpenSSL.
67
+ problem. Solaris 9 and abovehas a newer version of OpenSSL.
67
68
68
69
69
70
3) Why does configure complain about a failed test program?
70
71
71
- This is probably a case of the run-time linker being unable to find some
72
- library. On solaris 8 and older it should be libz or some other
73
- non-standard library, such as libssl. To point it to the right
74
- location, set the LD_LIBRARY_PATH environment variable, e.g.,
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
+ LD_LIBRARY_PATH environment variable, e.g.,
75
76
76
77
LD_LIBRARY_PATH=/usr/sfw/lib:/opt/sfw/lib:/usr/local/lib
77
78
export LD_LIBRARY_PATH
@@ -104,68 +105,58 @@ does not matter.)
104
105
Then build as usual.
105
106
106
107
107
- 5) How can I compile for optimum performance?
108
-
109
- On SPARC architecture Sun Studio is strongly recommended for
110
- compilation. Try using -xO5 optimalization flag to generate
111
- significantly faster binaries. Do not use any flags which modify
112
- behavior of floating point operations and errno processing (e.g.
113
- -fast). These flags should raise some nonstandard PostgreSQL behavior
114
- for example in the date/time computing.
115
-
116
- If you do not reason to use 64-bit binaries on SPARC, prefer 32-bit
117
- version. The 64-bit operations are slower and 64-bit binaries are slower
118
- then 32-bits. And on other side a 32-bit code on the AMD64 CPU family is
119
- not native and that is why 32-bit code is significant slower on this
120
- CPU family.
108
+ 5) How can I compile for optimal performance?
121
109
110
+ On the SPARC architecture, Sun Studio is strongly recommended for
111
+ compilation. Try using the -xO5 optimization flag to generate
112
+ significantly faster binaries. Do not use any flags that modify
113
+ behavior of floating point operations and errno processing (e.g.,
114
+ -fast). These flags could raise some nonstandard PostgreSQL behavior
115
+ for example in the date/time computing.
122
116
123
- 6) How to compile PostgreSQL with Sun Studio?
117
+ If you do not have a reason to use 64-bit binaries on SPARC, prefer
118
+ the 32-bit version. The 64-bit operations are slower and 64-bit
119
+ binaries are slower than the 32-bit variants. And on other hand,
120
+ 32-bit code on the AMD64 CPU family is not native, and that is why
121
+ 32-bit code is significant slower on this CPU family.
124
122
125
- On Solaris 10 you can performed following steps:
126
123
127
- export CC=/opt/SUNWspro/bin/cc
128
- export CFLAGS=-xO5
129
- export LDFLAGS=-lm
130
- ./configure --without-readline
131
- gmake
124
+ 6) Where I can download prepared Solaris packages?
132
125
126
+ The PostgreSQL is bundled with Solaris 10 (from update 2). Official
127
+ packages are also available on
128
+ <http://pgfoundry.org/projects/solarispackages/>. Packages for older
129
+ Solaris version (8, 9) you can be obtained from
130
+ <http://www.sunfreeware.com/> or <http://www.blastwave.org/>.
133
131
134
- 7) Where I can download prepared Solaris packages?
135
132
136
- The PostgreSQL is bundled with Solaris 10 (from update 2). Official
137
- packages are too available on
138
- http://pgfoundry.org/projects/solarispackages/. Packages for older
139
- Solaris version (8,9) you can download from: http://www.sunfreeware.com
140
- or http://www.blastwave.org
141
-
142
-
143
- 8) How to tune PostgreSQL and Solaris for best performance?
133
+ 7) How can I tune PostgreSQL and Solaris for performance?
144
134
145
135
Some tuning tricks can be found here:
146
136
147
137
http://www.sun.com/servers/coolthreads/tnb/applications_postgresql.jsp
148
138
149
- This article is primary focused on T2000 platform,however, many of
150
- recommendations aregeneral for other hardware with Solaris.
139
+ This article is primary focused on T2000 platform,but many of the
140
+ recommendations arealso useful on other hardware with Solaris.
151
141
152
142
153
- 9 ) Can I usedtrace for tracing PostgreSQL?
143
+ 8 ) Can I useDTrace for tracing PostgreSQL?
154
144
155
- The PostgreSQL 8.2 has implementeddtrace support. You can enable it by
156
- the --enable-dtrace configure switch. If you want tocompile a 64-bit
157
- code withdtrace you must specify DTRACEFLAGS='-64', e.g.
145
+ PostgreSQL 8.2 has implementedDTrace support. You can enable it by
146
+ the --enable-dtrace configure switch. If you want tobuild 64-bit
147
+ binaries withDTrace you must specify DTRACEFLAGS='-64', e.g.,
158
148
159
- Usinggcc compiler:
149
+ UsingGCC compiler:
160
150
161
151
$ ./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ...
162
152
163
153
Using Sun compiler:
164
154
165
- $ configure CC='/opt/SUNWspro/bin/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64'
155
+ $./ configure CC='/opt/SUNWspro/bin/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64'
166
156
167
157
168
- If you have some problem with postgres linking, looks like:
158
+ If you see the linking of the postgres executable abort with an error
159
+ message like
169
160
170
161
Undefined first referenced
171
162
symbol in file
@@ -174,10 +165,10 @@ If you have some problem with postgres linking, looks like:
174
165
ld: fatal: Symbol referencing errors. No output written to postgres
175
166
collect2: ld returned 1 exit status
176
167
gmake: *** [postgres] Error 1
177
-
178
- check if you have Solaris 10u3 or newer installed on your box. You can
179
- also find more information here:
180
168
181
- http://blogs.sun.com/robertlor/entry/user_level_dtrace_probes_in
169
+ your DTrace installation is too old to handle probes in static
170
+ functions. You need Solaris 10u3 or newer.
182
171
172
+ You can also find more information here:
183
173
174
+ http://blogs.sun.com/robertlor/entry/user_level_dtrace_probes_in