Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6fa875d

Browse files
committed
Update Solaris FAQ.
Zdenek Kotala
1 parentabcf760 commit6fa875d

File tree

1 file changed

+101
-14
lines changed

1 file changed

+101
-14
lines changed

‎doc/FAQ_Solaris

Lines changed: 101 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ Frequently Asked Questions (FAQ) for PostgreSQL
33
Sun Solaris specific
44
to be read in conjunction with the installation instructions
55
============================================================
6-
last updated: $Date: 2006/10/02 23:01:17 $
7-
8-
current maintainer: Peter Eisentraut <peter_e@gmx.net>
6+
last updated: $Date: 2006/10/04 22:03:22 $
97

108

119
Contents:
@@ -15,6 +13,10 @@ Contents:
1513
3) Why does configure complain about a failed test program?
1614
4) Why does my 64-bit build sometimes crash?
1715
5) How can I compile for optimum performance?
16+
6) How to compile PostgreSQL with Sun Studio?
17+
7) Where I can download prepared Solaris packages?
18+
8) How to tune PostgreSQL and Solaris for best performance?
19+
9) Can I use dtrace for tracing PostgreSQL?
1820

1921
1) What tools do I need to build and install PostgreSQL on Solaris?
2022

@@ -23,18 +25,27 @@ You will need
2325
- GNU zip (for installing the documentation)
2426
- GNU make
2527
- GNU readline library (optional)
26-
- GCC (if you don't have Sun's compiler)
28+
- Sun Studio CC or GCC
29+
30+
You can download Sun Studio from:
31+
http://developers.sun.com/prodtech/cc/downloads/index.jsp
2732

28-
If you like Solaris packages, you can find these tools here:
29-
http://www.sunfreeware.com
33+
Many of GNU tools are integrated into the Solaris 10 or they are
34+
present on the Solaris companion CD.
35+
36+
If you like packages for older version of Solaris, you can find these
37+
tools here:
38+
http://www.sunfreeware.com or http://www.blastwave.org
3039

3140
If you prefer sources, look here:
3241
http://www.gnu.org/order/ftp.html
3342

34-
You can build with either GCC or Sun's compiler suite. We have heard
35-
reports of problems when using gcc 2.95.1; gcc 2.95.3 or later is
36-
recommended. If you are using Sun's compiler, be careful *not* to
37-
select /usr/ucb/cc; use /opt/SUNWspro/bin/cc.
43+
You can build with either GCC or Sun's compiler suite. For better
44+
code optimalization Sun's compiler is strongly recommended on the
45+
SPARC architecture. We have heard reports of problems when using
46+
gcc 2.95.1; gcc 2.95.3 or later is recommended. If you are using
47+
Sun's compiler, be careful *not* to select /usr/ucb/cc;
48+
use /opt/SUNWspro/bin/cc.
3849

3950

4051
2) Why do I get problems when building with OpenSSL support?
@@ -53,15 +64,17 @@ This is because of a namespace conflict between the standard
5364
Upgrading your OpenSSL installation to version 0.9.6a fixes this
5465
problem.
5566

67+
Solaris 9 and above already newer version of OpenSSL.
68+
5669

5770
3) Why does configure complain about a failed test program?
5871

5972
This is probably a case of the run-time linker being unable to find
60-
libz or some other non-standard library, such as libssl. To point it
61-
to the right location, set the LD_LIBRARY_PATH environment variable,
62-
e.g.,
73+
some library. On solaris 8 and older it should be libz or some other
74+
non-standard library, such as libssl. To point it to the right location,
75+
set the LD_LIBRARY_PATH environment variable,e.g.,
6376

64-
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/ssl/lib
77+
LD_LIBRARY_PATH=/usr/sfw/lib:/opt/sfw/lib:/usr/local/lib
6578
export LD_LIBRARY_PATH
6679

6780
and restart configure. You will also have to keep this setting
@@ -88,3 +101,77 @@ to read
88101
does not matter.)
89102

90103
Then build as usual.
104+
105+
106+
5) How can I compile for optimum performance?
107+
108+
On SPARC architecture Sun Studio is strongly recommended for compilation.
109+
Try using -xO5 optimalization flag to generate significantly faster binaries.
110+
Do not use any flags which modify behavior of floating point operations and
111+
errno processing (e.g. -fast). These flags should raise some nonstandard
112+
PostgreSQL behavior for example in the date/time computing.
113+
114+
If you do not reason to use 64-bit binaries on SPARC, prefer 32-bit version.
115+
The 64-bit operations are slower and 64-bit binaries are slower then 32-bits.
116+
And on other side a 32-bit code on the AMD64 CPU family is not native and
117+
that is why 32-bit code is significant slower on this CPU family.
118+
119+
120+
6) How to compile PostgreSQL with Sun Studio?
121+
122+
On Solaris 10 you can performed following steps:
123+
124+
export CC=/opt/SUNWspro/bin/cc
125+
export CFLAGS=-xO5
126+
export LDFLAGS=-lm
127+
./configure --without-readline
128+
gmake
129+
130+
131+
7) Where I can download prepared Solaris packages?
132+
133+
The PostgreSQL is bundled with Solaris 10 (from update 2). Official packages
134+
are too available on http://pgfoundry.org/projects/solarispackages/.
135+
136+
Packages for older Solaris version (8,9) you can download from:
137+
http://www.sunfreeware.com or http://www.blastwave.org
138+
139+
140+
8) How to tune PostgreSQL and Solaris for best performance?
141+
142+
Some tuning tricks can be found here:
143+
http://www.sun.com/servers/coolthreads/tnb/applications_postgresql.jsp
144+
145+
This article is primary focused on T2000 platform, however, many of
146+
recommendations are general for other hardware with Solaris.
147+
148+
149+
9) Can I use dtrace for tracing PostgreSQL?
150+
151+
The PostgreSQL 8.2 has implemented dtrace support. You can enable it by
152+
the --enable-dtrace configure switch. If you want to compile a 64-bit code
153+
with dtrace you must specify DTRACEFLAGS='-64', e.g.
154+
155+
Using gcc compiler:
156+
$ ./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ...
157+
158+
Using Sun compiler:
159+
$ configure CC='/opt/SUNWspro/bin/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64'
160+
161+
162+
If you have some problem with postgres linking, looks like:
163+
164+
Undefined first referenced
165+
symbol in file
166+
AbortTransaction utils/probes.o
167+
CommitTransaction utils/probes.o
168+
ld: fatal: Symbol referencing errors. No output written to postgres
169+
collect2: ld returned 1 exit status
170+
gmake: *** [postgres] Error 1
171+
172+
, check if you have Solaris 10u3 or newer installed on your box.
173+
174+
You can also find more information here:
175+
http://blogs.sun.com/robertlor/entry/user_level_dtrace_probes_in
176+
177+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp