head	1.29;
access;
symbols
	REL7_4_29:1.18
	REL8_0_25:1.18
	REL8_1_21:1.18.8.1
	REL8_2_17:1.22.2.11
	REL8_3_11:1.28
	REL7_4_28:1.18
	REL8_0_24:1.18
	REL8_1_20:1.18.8.1
	REL8_2_16:1.22.2.11
	REL8_3_10:1.28
	REL7_4_27:1.18
	REL8_0_23:1.18
	REL8_1_19:1.18.8.1
	REL8_2_15:1.22.2.11
	REL8_3_9:1.28
	REL7_4_26:1.18
	REL8_0_22:1.18
	REL8_1_18:1.18.8.1
	REL8_2_14:1.22.2.11
	REL8_3_8:1.28
	REL7_4_25:1.18
	REL8_0_21:1.18
	REL8_1_17:1.18.8.1
	REL8_2_13:1.22.2.11
	REL8_3_7:1.28
	REL7_4_24:1.18
	REL8_0_20:1.18
	REL8_1_16:1.18.8.1
	REL8_2_12:1.22.2.11
	REL8_3_6:1.28
	REL7_4_23:1.18
	REL8_0_19:1.18
	REL8_1_15:1.18.8.1
	REL8_2_11:1.22.2.11
	REL8_3_5:1.28
	REL7_4_22:1.18
	REL8_0_18:1.18
	REL8_1_14:1.18.8.1
	REL8_2_10:1.22.2.11
	REL8_3_4:1.28
	REL7_4_21:1.18
	REL8_0_17:1.18
	REL8_1_13:1.18.8.1
	REL8_2_9:1.22.2.11
	REL8_3_3:1.28
	REL7_4_20:1.18
	REL8_0_16:1.18
	REL8_1_12:1.18.8.1
	REL8_2_8:1.22.2.11
	REL8_3_2:1.28
	REL8_2_7:1.22.2.11
	REL8_3_1:1.28
	REL8_3_STABLE:1.28.0.2
	REL8_3_0:1.28
	REL8_3_RC2:1.28
	REL7_3_21:1.16.2.5
	REL7_4_19:1.18
	REL8_0_15:1.18
	REL8_1_11:1.18.8.1
	REL8_2_6:1.22.2.11
	REL8_3_RC1:1.28
	REL8_3_BETA4:1.28
	REL8_3_BETA3:1.28
	REL8_3_BETA2:1.28
	REL8_3_BETA1:1.28
	REL7_3_20:1.16.2.5
	REL7_4_18:1.18
	REL8_0_14:1.18
	REL8_1_10:1.18.8.1
	REL8_2_5:1.22.2.11
	REL7_3_19:1.16.2.5
	REL7_4_17:1.18
	REL8_0_13:1.18
	REL8_1_9:1.18.8.1
	REL8_2_4:1.22.2.8
	REL8_0_12:1.18
	REL8_1_8:1.18.8.1
	REL8_2_3:1.22.2.7
	REL7_3_18:1.16.2.5
	REL7_4_16:1.18
	REL8_0_11:1.18
	REL8_1_7:1.18.8.1
	REL8_2_2:1.22.2.5
	REL8_0_10:1.18
	REL8_1_6:1.18.8.1
	REL8_2_1:1.22.2.4
	REL7_4_15:1.18
	REL7_3_17:1.16.2.5
	REL8_2_STABLE:1.22.0.2
	REL8_2_0:1.22
	REL8_2_RC1:1.22
	REL8_2_BETA3:1.22
	REL8_2_BETA2:1.22
	REL8_1_5:1.18.8.1
	REL8_0_9:1.18
	REL7_4_14:1.18
	REL7_3_16:1.16.2.5
	REL8_2_BETA1:1.18
	REL7_3_15:1.16.2.5
	REL7_4_13:1.18
	REL8_0_8:1.18
	REL8_1_4:1.18
	REL7_3_14:1.16.2.5
	REL7_4_12:1.18
	REL8_0_7:1.18
	REL8_1_3:1.18
	REL7_3_13:1.16.2.5
	REL7_4_11:1.18
	REL8_0_6:1.18
	REL8_1_2:1.18
	REL7_3_12:1.16.2.5
	REL7_4_10:1.18
	REL8_0_5:1.18
	REL8_1_1:1.18
	REL8_1_STABLE:1.18.0.8
	REL8_1_0:1.18
	REL8_1_0RC1:1.18
	REL8_1_0BETA4:1.18
	REL8_1_0BETA3:1.18
	REL7_3_11:1.16.2.5
	REL7_4_9:1.18
	REL8_0_4:1.18
	REL8_1_0BETA2:1.18
	REL8_1_0BETA1:1.18
	REL7_2_8:1.13.2.1
	REL7_3_10:1.16.2.5
	REL7_4_8:1.18
	REL8_0_3:1.18
	REL8_0_2:1.18
	REL7_2_7:1.13.2.1
	REL7_3_9:1.16.2.5
	REL7_4_7:1.18
	REL8_0_1:1.18
	REL8_0_STABLE:1.18.0.6
	REL8_0_0:1.18.0.4
	REL8_0_0RC5:1.18
	REL8_0_0RC4:1.18
	REL8_0_0RC3:1.18
	REL8_0_0RC2:1.18
	REL8_0_0RC1:1.18
	REL8_0_0BETA5:1.18
	REL8_0_0BETA4:1.18
	REL7_4_6:1.18
	REL7_3_8:1.16.2.5
	REL7_2_6:1.13.2.1
	REL8_0_0BETA3:1.18
	REL8_0_0BETA2:1.18
	REL7_2_5:1.13.2.1
	REL7_4_5:1.18
	REL7_3_7:1.16.2.5
	REL7_4_4:1.18
	REL8_0_0BETA1:1.18
	REL7_4_3:1.18
	REL7_4_2:1.18
	REL7_3_6:1.16.2.5
	REL7_4_1:1.18
	REL7_3_5:1.16.2.5
	REL7_4:1.18
	REL7_4_RC2:1.18
	REL7_4_STABLE:1.18.0.2
	REL7_4_RC1:1.18
	REL7_4_BETA5:1.18
	REL7_4_BETA4:1.17
	REL7_4_BETA3:1.17
	REL7_4_BETA2:1.17
	WIN32_DEV:1.17.0.2
	REL7_4_BETA1:1.17
	REL7_3_4:1.16.2.5
	REL7_3_2:1.16.2.3
	REL7_2_4:1.13.2.1
	REL7_3_STABLE:1.16.0.2
	REL7_2_3:1.13.2.1
	REL7_2_STABLE:1.13.0.2
	REL7_2:1.12
	REL7_2_RC2:1.12
	REL7_2_RC1:1.12
	REL7_2_BETA5:1.11
	REL7_2_BETA4:1.11
	REL7_2_BETA3:1.10
	REL7_2_BETA2:1.10
	REL7_2_BETA1:1.10
	REL7_1_2:1.10
	REL7_1_STABLE:1.10.0.2
	REL7_1_BETA:1.7
	REL7_1_BETA3:1.7
	REL7_1_BETA2:1.7
	REL7_1:1.10
	REL7_0_PATCHES:1.4.0.2
	REL7_0:1.4
	REL6_5_PATCHES:1.1.0.2;
locks; strict;
comment	@# @;


1.29
date	2008.11.21.16.46.19;	author petere;	state dead;
branches;
next	1.28;

1.28
date	2007.02.27.19.10.19;	author momjian;	state Exp;
branches;
next	1.27;

1.27
date	2007.02.23.23.22.33;	author momjian;	state Exp;
branches;
next	1.26;

1.26
date	2007.02.23.20.37.59;	author momjian;	state Exp;
branches;
next	1.25;

1.25
date	2007.02.23.20.30.08;	author momjian;	state Exp;
branches;
next	1.24;

1.24
date	2007.02.23.18.38.19;	author momjian;	state Exp;
branches;
next	1.23;

1.23
date	2006.12.02.09.29.51;	author petere;	state Exp;
branches;
next	1.22;

1.22
date	2006.10.10.22.19.08;	author petere;	state Exp;
branches
	1.22.2.1;
next	1.21;

1.21
date	2006.10.05.03.13.15;	author momjian;	state Exp;
branches;
next	1.20;

1.20
date	2006.10.04.22.03.22;	author momjian;	state Exp;
branches;
next	1.19;

1.19
date	2006.10.02.23.01.17;	author momjian;	state Exp;
branches;
next	1.18;

1.18
date	2003.10.09.17.11.13;	author momjian;	state Exp;
branches
	1.18.8.1;
next	1.17;

1.17
date	2002.11.11.20.04.05;	author petere;	state Exp;
branches;
next	1.16;

1.16
date	2002.07.27.20.10.03;	author petere;	state Exp;
branches
	1.16.2.1;
next	1.15;

1.15
date	2002.07.15.21.34.04;	author momjian;	state Exp;
branches;
next	1.14;

1.14
date	2002.03.04.17.47.11;	author tgl;	state Exp;
branches;
next	1.13;

1.13
date	2002.02.12.22.35.07;	author tgl;	state Exp;
branches
	1.13.2.1;
next	1.12;

1.12
date	2002.01.18.20.56.17;	author tgl;	state Exp;
branches;
next	1.11;

1.11
date	2001.12.10.13.02.20;	author petere;	state Exp;
branches;
next	1.10;

1.10
date	2001.04.08.16.36.13;	author petere;	state Exp;
branches;
next	1.9;

1.9
date	2001.04.04.20.02.31;	author petere;	state Exp;
branches;
next	1.8;

1.8
date	2001.03.13.20.42.11;	author petere;	state Exp;
branches;
next	1.7;

1.7
date	2000.10.19.03.18.56;	author momjian;	state Exp;
branches;
next	1.6;

1.6
date	2000.10.18.21.18.24;	author momjian;	state Exp;
branches;
next	1.5;

1.5
date	2000.08.26.19.34.24;	author petere;	state Exp;
branches;
next	1.4;

1.4
date	99.09.27.16.44.44;	author momjian;	state Exp;
branches;
next	1.3;

1.3
date	99.09.27.03.34.54;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	99.09.13.00.21.18;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	99.09.13.00.20.48;	author momjian;	state dead;
branches
	1.1.2.1;
next	;

1.1.2.1
date	99.09.13.00.20.48;	author momjian;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	99.09.27.03.39.06;	author momjian;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	99.09.27.16.54.01;	author momjian;	state Exp;
branches;
next	;

1.13.2.1
date	2002.03.04.17.47.24;	author tgl;	state Exp;
branches;
next	;

1.16.2.1
date	2002.11.11.19.59.56;	author petere;	state Exp;
branches;
next	1.16.2.2;

1.16.2.2
date	2002.11.16.02.34.22;	author momjian;	state Exp;
branches;
next	1.16.2.3;

1.16.2.3
date	2002.12.18.20.39.31;	author momjian;	state Exp;
branches;
next	1.16.2.4;

1.16.2.4
date	2003.02.14.14.05.52;	author momjian;	state Exp;
branches;
next	1.16.2.5;

1.16.2.5
date	2003.07.23.04.13.11;	author momjian;	state Exp;
branches;
next	;

1.18.8.1
date	2006.10.10.00.29.14;	author momjian;	state Exp;
branches;
next	;

1.22.2.1
date	2006.12.03.16.43.05;	author momjian;	state Exp;
branches;
next	1.22.2.2;

1.22.2.2
date	2006.12.11.22.48.07;	author momjian;	state Exp;
branches;
next	1.22.2.3;

1.22.2.3
date	2007.01.05.20.55.28;	author momjian;	state Exp;
branches;
next	1.22.2.4;

1.22.2.4
date	2007.01.05.20.57.17;	author momjian;	state Exp;
branches;
next	1.22.2.5;

1.22.2.5
date	2007.02.01.04.56.41;	author momjian;	state Exp;
branches;
next	1.22.2.6;

1.22.2.6
date	2007.02.06.18.38.04;	author momjian;	state Exp;
branches;
next	1.22.2.7;

1.22.2.7
date	2007.02.07.03.16.59;	author momjian;	state Exp;
branches;
next	1.22.2.8;

1.22.2.8
date	2007.04.19.03.07.22;	author momjian;	state Exp;
branches;
next	1.22.2.9;

1.22.2.9
date	2007.09.11.17.37.29;	author momjian;	state Exp;
branches;
next	1.22.2.10;

1.22.2.10
date	2007.09.12.03.11.49;	author momjian;	state Exp;
branches;
next	1.22.2.11;

1.22.2.11
date	2007.09.13.03.34.23;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.29
log
@Include the platform "FAQs" into the installation instructions.
I weeded out some really old information along the way.
FAQ_AIX needs separate consideration and will be dealt with later.
@
text
@============================================================
Frequently Asked Questions (FAQ) for PostgreSQL
Sun Solaris specific
To be read in conjunction with the installation instructions.
============================================================
Last updated:        $Date: 2007/02/27 19:10:19 $


Contents:

1) What tools do I need to build and install PostgreSQL on Solaris?
2) Why do I get problems when building with OpenSSL support?
3) Why does configure complain about a failed test program?
4) Why does my 64-bit build sometimes crash?
5) How can I compile for optimum performance?
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?


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

You will need

	gzip (for installing the documentation)
	GNU Make
	GNU Readline library (optional)
	Sun Studio CC or GCC

You can download Sun Studio from: 
http://developers.sun.com/prodtech/cc/downloads/index.jsp

Many of GNU tools are integrated into Solaris 10, or they are present
on the Solaris companion CD.

If you like packages for older version of Solaris, you can find these
tools here:

	http://www.sunfreeware.com or http://www.blastwave.org

If you prefer sources, look here:

	http://www.gnu.org/order/ftp.html

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.


2) Why do I get problems when building with OpenSSL support?

When you build PostgreSQL with OpenSSL support you might get compilation
errors in the following files:

	src/backend/libpq/crypt.c
	src/backend/libpq/password.c
	src/interfaces/libpq/fe-auth.c
	src/interfaces/libpq/fe-connect.c

This is because of a namespace conflict between the standard
/usr/include/crypt.h header and the header files provided by OpenSSL.

Upgrading your OpenSSL installation to version 0.9.6a fixes this
problem.  Solaris 9 and above has a newer version of OpenSSL.


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

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
LDFLAGS environment variable, e.g.,

	LDFLAGS="-R /usr/sfw/lib:/opt/sfw/lib:/usr/local/lib"
	export LDFLAGS

and restart configure. See the ld(1) man page for more
information.


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.


5) How can I compile for optimal performance?

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.

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.


6) Where I can download prepared Solaris packages?

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/>.


7) How can I tune PostgreSQL and Solaris for performance?

Some tuning tricks can be found here:

	http://www.sun.com/servers/coolthreads/tnb/applications_postgresql.jsp

This article is primary focused on T2000 platform, but many of the
recommendations are also useful on other hardware with Solaris.


8) Can I use DTrace for tracing PostgreSQL?

Yes, see the chapter "Monitoring Database Activity" in the documentation
for further information.

You can also find more information here:

	http://blogs.sun.com/robertlor/entry/user_level_dtrace_probes_in

If you see the linking of the postgres executable abort with an error
message like

	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

your DTrace installation is too old to handle probes in static
functions.  You need Solaris 10u4 or newer. Workaround is remove static
keyword from AbortTransaction and CommitTransaction functions declaration in 
src/backend/access/transam/xact.c.

See http://sunsolve.sun.com/search/document.do?assetkey=1-1-2139224-1
(registration required).
@


1.28
log
@Remove Kerberos mention in Solaris FAQ.
@
text
@d6 1
a6 1
Last updated:        $Date: 2007/02/23 23:22:33 $
@


1.27
log
@Update Solaris FAQ.
@
text
@d6 1
a6 1
Last updated:        $Date: 2007/02/23 20:37:59 $
a18 1
9) Can I compile PostgreSQL with Kerberos v5 support?
a167 7

9) Can I compile PostgreSQL with Kerberos v5 support?

Yes, Kerberos is integrated in OpenSolaris and will be integrated in
Solaris 10u4. Kerberos v5 support is implemented by the GSS security
library which contains Kerberos v5 functions. However, the library is
private and the interface might change without notice.
@


1.26
log
@Spelling fix.
@
text
@d6 1
a6 1
Last updated:        $Date: 2007/02/23 20:30:08 $
d172 4
a175 5
Kerberos is integrated in OpenSolaris and will be integrated in Solaris
10u4. Kerberos v5 support is implemented by the GSS security library
which contains Kerberos v5 functions. However, the library is private
and the interface might change without notice.

@


1.25
log
@Update Solaris FAQ wording, per Peter.
@
text
@d6 1
a6 1
Last updated:        $Date: 2007/02/23 18:38:19 $
d173 1
a173 1
10u4. Kerberos v5 support is implemented by the GSS security libary
@


1.24
log
@Update Solaris FAQ.

Zdenek Kotala
@
text
@d6 1
a6 1
Last updated:        $Date: 2006/12/02 09:29:51 $
d172 4
a175 4
Kerberos is integrated in OpenSolaris and will be integrated in Solaris 10u4. GSS security
mechanism contains internal Kerberos v5 library implementation which provide all necessary
krb5 function. However, usage this library is only on own risk. It is private library
and interface may change without notice.
@


1.23
log
@Collect the bits of wisdom about dtrace installation in the installation
chapter rather than scattering them across several incomplete fragments.
@
text
@d6 1
a6 1
Last updated:        $Date: 2006/10/10 22:19:08 $
d19 1
d76 1
a76 1
LD_LIBRARY_PATH environment variable, e.g.,
d78 2
a79 2
	LD_LIBRARY_PATH=/usr/sfw/lib:/opt/sfw/lib:/usr/local/lib
	export LD_LIBRARY_PATH
d81 1
a81 3
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
d147 4
d163 13
a175 1
functions.  You need Solaris 10u3 or newer.
a176 3
You can also find more information here:

	http://blogs.sun.com/robertlor/entry/user_level_dtrace_probes_in
@


1.22
log
@Cleanup pass
@
text
@d6 1
a6 1
Last updated:        $Date: 2006/10/05 03:13:15 $
d145 2
a146 12
PostgreSQL 8.2 has implemented DTrace support.  You can enable it by
the --enable-dtrace configure switch.  If you want to build 64-bit
binaries with DTrace you must specify DTRACEFLAGS='-64', e.g.,

Using GCC compiler:

	$ ./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ...
            
Using Sun compiler:

	$ ./configure CC='/opt/SUNWspro/bin/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64'

@


1.22.2.1
log
@Update 8.2.X release to say 8.2.0 instead of just 8.2.
@
text
@d6 1
a6 1
Last updated:        $Date: 2006/12/02 09:29:51 $
d145 12
a156 2
Yes, see the chapter "Monitoring Database Activity" in the documentation
for further information.
@


1.22.2.2
log
@Backpatch FAQ entry for null concatenation.
@
text
@@


1.22.2.3
log
@Stamp release 8.2.1.  Update FAQs.
@
text
@@


1.22.2.4
log
@Update Japanese FAQ.
@
text
@@


1.22.2.5
log
@Backpatch FAQs to stable branch.
@
text
@@


1.22.2.6
log
@Backpatch FAQs to 8.2.X branch.
@
text
@@


1.22.2.7
log
@Update FAQ for 8.2.3.
@
text
@@


1.22.2.8
log
@Stamp releases 8.2.4, 8.1.9, 8.0.13, 7.4.17, 7.3.19.
@
text
@d6 1
a6 1
Last updated:        $Date: 2007/02/27 19:10:19 $
d75 1
a75 1
LDFLAGS environment variable, e.g.,
d77 2
a78 2
	LDFLAGS="-R /usr/sfw/lib:/opt/sfw/lib:/usr/local/lib"
	export LDFLAGS
d80 3
a82 1
and restart configure. See the ld(1) man page for more
a147 4
You can also find more information here:

	http://blogs.sun.com/robertlor/entry/user_level_dtrace_probes_in

d160 1
a160 3
functions.  You need Solaris 10u4 or newer. Workaround is remove static
keyword from AbortTransaction and CommitTransaction functions declaration in 
src/backend/access/transam/xact.c.
d162 3
a164 2
See http://sunsolve.sun.com/search/document.do?assetkey=1-1-2139224-1
(registration required).
@


1.22.2.9
log
@Stamp releases 8.2.5, 8.1.10, 8.0.14, 7.4.18, 7.3.20.

Update FAQs for 8.2.5.
@
text
@@


1.22.2.10
log
@Update Japanese FAQ to current release number.
@
text
@@


1.22.2.11
log
@Update Japanese FAQ, backpatch.

Jun Kuwamura
@
text
@@


1.21
log
@Add indenting to Solaris FAQ, for clarity.
@
text
@d6 1
a6 1
Last updated:        $Date: 2006/10/04 22:03:22 $
d16 4
a19 4
6) How to compile PostgreSQL with Sun Studio?
7) Where I can download prepared Solaris packages?
8) How to tune PostgreSQL and Solaris for best performance?
9) Can I use dtrace for tracing PostgreSQL?
d25 4
a28 4
	GNU zip (for installing the documentation)
	GNU make
	GNU readline library (optional)
	Sun Studio CC or GCC   
d33 2
a34 2
Many of GNU tools are integrated into the Solaris 10 or they are
present on the Solaris companion CD. 
d45 6
a50 5
You can build with either GCC or Sun's compiler suite. For better  code
optimalization 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.
d67 1
a67 1
problem.  Solaris 9 and above already  newer version of OpenSSL.
d72 4
a75 4
This is probably a case of the run-time linker being unable to find some
library. On solaris 8 and older it should be libz 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.,
d108 1
a108 14
5) How can I compile for optimum performance?

On SPARC architecture Sun Studio is strongly recommended for
compilation. Try using -xO5 optimalization flag to generate
significantly faster binaries. Do not use any flags which modify
behavior of floating point operations and  errno processing (e.g.
-fast). These flags should raise some nonstandard PostgreSQL behavior
for example in the date/time computing. 

If you do not reason to use 64-bit binaries on SPARC, prefer 32-bit
version. The 64-bit operations are slower and 64-bit binaries are slower
then 32-bits. And on other side a 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.
d110 6
d117 5
a121 1
6) How to compile PostgreSQL with Sun Studio?
a122 1
On Solaris 10 you can performed following steps:
d124 1
a124 5
	export CC=/opt/SUNWspro/bin/cc
	export CFLAGS=-xO5
	export LDFLAGS=-lm
	./configure --without-readline
	gmake
d126 5
a131 1
7) Where I can download prepared Solaris packages?
d133 1
a133 8
The PostgreSQL is bundled with Solaris 10 (from update 2). Official
packages are too available on
http://pgfoundry.org/projects/solarispackages/.  Packages for older
Solaris version (8,9) you can download from: http://www.sunfreeware.com
or http://www.blastwave.org


8) How to tune PostgreSQL and Solaris for best performance?
d139 2
a140 2
This article is primary focused on T2000 platform, however, many of
recommendations are general for other hardware with Solaris.
d143 1
a143 1
9) Can I use dtrace for tracing PostgreSQL?
d145 3
a147 3
The PostgreSQL 8.2 has implemented dtrace support. You can enable it by 
the --enable-dtrace configure switch. If you want to compile a 64-bit
code with dtrace you must specify DTRACEFLAGS='-64', e.g.
d149 1
a149 1
Using gcc compiler:
d155 1
a155 1
	$ configure CC='/opt/SUNWspro/bin/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64'
d158 2
a159 1
If you have some problem with postgres linking, looks like:
a167 3
	
check if you have Solaris 10u3 or newer installed on your box.  You can
also find more information here:
d169 2
a170 1
	http://blogs.sun.com/robertlor/entry/user_level_dtrace_probes_in
d172 1
d174 1
@


1.20
log
@Update Solaris FAQ.

Zdenek Kotala
@
text
@d4 1
a4 1
to be read in conjunction with the installation instructions
d6 1
a6 1
last updated:        $Date: 2003/10/09 17:11:13 $
d25 4
a28 4
- GNU zip (for installing the documentation)
- GNU make
- GNU readline library (optional)
- Sun Studio CC or GCC   
d38 2
a39 1
http://www.sunfreeware.com or http://www.blastwave.org
a41 1
http://www.gnu.org/order/ftp.html
d43 7
a49 6
You can build with either GCC or Sun's compiler suite. For better 
code optimalization 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.
d54 2
a55 2
When you build PostgreSQL with OpenSSL support you might get
compilation errors in the following files:
d57 4
a60 4
src/backend/libpq/crypt.c
src/backend/libpq/password.c
src/interfaces/libpq/fe-auth.c
src/interfaces/libpq/fe-connect.c
d66 1
a66 3
problem.

Solaris 9 and above already  newer version of OpenSSL.
d71 12
a82 13
This is probably a case of the run-time linker being unable to find
some library. On solaris 8 and older it should be libz 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.,

LD_LIBRARY_PATH=/usr/sfw/lib:/opt/sfw/lib:/usr/local/lib
export LD_LIBRARY_PATH

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.
d88 4
a91 4
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:
d94 1
d96 1
d98 1
d109 12
a120 10
On SPARC architecture Sun Studio is strongly recommended for compilation.
Try using -xO5 optimalization flag to generate significantly faster binaries.
Do not use any flags which modify behavior of floating point operations and 
errno processing (e.g. -fast). These flags should raise some nonstandard
PostgreSQL behavior for example in the date/time computing. 

If you do not reason to use 64-bit binaries on SPARC, prefer 32-bit version.
The 64-bit operations are slower and 64-bit binaries are slower then 32-bits.
And on other side a 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.
d127 5
a131 5
export CC=/opt/SUNWspro/bin/cc
export CFLAGS=-xO5
export LDFLAGS=-lm
./configure --without-readline
gmake
d136 5
a140 5
The PostgreSQL is bundled with Solaris 10 (from update 2). Official packages
are too available on http://pgfoundry.org/projects/solarispackages/.

Packages for older Solaris version (8,9) you can download from:
http://www.sunfreeware.com or http://www.blastwave.org
d146 2
a147 1
http://www.sun.com/servers/coolthreads/tnb/applications_postgresql.jsp
d156 2
a157 2
the --enable-dtrace configure switch. If you want to compile a 64-bit code
with dtrace you must specify DTRACEFLAGS='-64', e.g.
d160 2
a161 1
$ ./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ...
d164 2
a165 1
$ configure CC='/opt/SUNWspro/bin/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64'
d170 10
a179 9
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

, check if you have Solaris 10u3 or newer installed on your box.
d181 1
a181 2
You can also find more information here:
http://blogs.sun.com/robertlor/entry/user_level_dtrace_probes_in
@


1.19
log
@Remove mention of the -fast option from the Solaris FAQ.

Kenneth Marshall
@
text
@a7 2
current maintainer:  Peter Eisentraut <peter_e@@gmx.net>

d16 4
d28 4
a31 1
- GCC (if you don't have Sun's compiler)
d33 6
a38 2
If you like Solaris packages, you can find these tools here:
http://www.sunfreeware.com
d43 6
a48 4
You can build with either GCC or Sun's compiler suite.  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.
d67 2
d73 3
a75 3
libz 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.,
d77 1
a77 1
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/ssl/lib
d104 74
@


1.18
log
@Update Solaris FAQ to mention -fast.
@
text
@d6 1
a6 1
last updated:        $Date: 2002/11/11 20:04:05 $
a90 11


5) How can I compile for optimum performance?

Try using the "-fast" compile flag.  The binaries might not be portable to
other Solaris systems, and you might need to compile everything that links
to PostgreSQL with "-fast", but PostgreSQL will run significantly faster,
50% faster on some tests.



@


1.18.8.1
log
@Backpatch FAQs to 8.1.X.
@
text
@d4 1
a4 1
To be read in conjunction with the installation instructions.
d6 3
a8 1
Last updated:        $Date: 2006/10/05 03:13:15 $
a17 4
6) How to compile PostgreSQL with Sun Studio?
7) Where I can download prepared Solaris packages?
8) How to tune PostgreSQL and Solaris for best performance?
9) Can I use dtrace for tracing PostgreSQL?
d23 4
a26 10
	GNU zip (for installing the documentation)
	GNU make
	GNU readline library (optional)
	Sun Studio CC or GCC   

You can download Sun Studio from: 
http://developers.sun.com/prodtech/cc/downloads/index.jsp

Many of GNU tools are integrated into the Solaris 10 or they are
present on the Solaris companion CD. 
d28 2
a29 4
If you like packages for older version of Solaris, you can find these
tools here:

	http://www.sunfreeware.com or http://www.blastwave.org
d32 1
d34 4
a37 7
	http://www.gnu.org/order/ftp.html

You can build with either GCC or Sun's compiler suite. For better  code
optimalization 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.
d42 2
a43 2
When you build PostgreSQL with OpenSSL support you might get compilation
errors in the following files:
d45 4
a48 4
	src/backend/libpq/crypt.c
	src/backend/libpq/password.c
	src/interfaces/libpq/fe-auth.c
	src/interfaces/libpq/fe-connect.c
d54 1
a54 1
problem.  Solaris 9 and above already  newer version of OpenSSL.
d59 13
a71 12
This is probably a case of the run-time linker being unable to find some
library. On solaris 8 and older it should be libz 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.,

	LD_LIBRARY_PATH=/usr/sfw/lib:/opt/sfw/lib:/usr/local/lib
	export LD_LIBRARY_PATH

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.
d77 4
a80 4
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:
a82 1

a83 1

a84 1

d95 4
a98 71
On SPARC architecture Sun Studio is strongly recommended for
compilation. Try using -xO5 optimalization flag to generate
significantly faster binaries. Do not use any flags which modify
behavior of floating point operations and  errno processing (e.g.
-fast). These flags should raise some nonstandard PostgreSQL behavior
for example in the date/time computing. 

If you do not reason to use 64-bit binaries on SPARC, prefer 32-bit
version. The 64-bit operations are slower and 64-bit binaries are slower
then 32-bits. And on other side a 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.


6) How to compile PostgreSQL with Sun Studio?

On Solaris 10 you can performed following steps:

	export CC=/opt/SUNWspro/bin/cc
	export CFLAGS=-xO5
	export LDFLAGS=-lm
	./configure --without-readline
	gmake


7) Where I can download prepared Solaris packages?

The PostgreSQL is bundled with Solaris 10 (from update 2). Official
packages are too available on
http://pgfoundry.org/projects/solarispackages/.  Packages for older
Solaris version (8,9) you can download from: http://www.sunfreeware.com
or http://www.blastwave.org


8) How to tune PostgreSQL and Solaris for best performance?

Some tuning tricks can be found here:

	http://www.sun.com/servers/coolthreads/tnb/applications_postgresql.jsp

This article is primary focused on T2000 platform, however, many of
recommendations are general for other hardware with Solaris.


9) Can I use dtrace for tracing PostgreSQL?

The PostgreSQL 8.2 has implemented dtrace support. You can enable it by 
the --enable-dtrace configure switch. If you want to compile a 64-bit
code with dtrace you must specify DTRACEFLAGS='-64', e.g.

Using gcc compiler:

	$ ./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ...
            
Using Sun compiler:

	$ configure CC='/opt/SUNWspro/bin/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64'


If you have some problem with postgres linking, looks like:

	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
	
check if you have Solaris 10u3 or newer installed on your box.  You can
also find more information here:
a99 1
	http://blogs.sun.com/robertlor/entry/user_level_dtrace_probes_in
@


1.17
log
@Revise platform FAQs.
@
text
@d6 1
a6 1
last updated:        $Date: 2002/07/27 20:10:03 $
d16 2
a17 2
5) Why does my 64-bit build sometimes crash?

d91 11
@


1.16
log
@Assemble portability modules into libpgport library.
Some makefile simplifications.
@
text
@d2 1
a2 1
Frequently Asked Questions (FAQ) for PostgreSQL 7.2
d6 1
a6 1
last updated:        $Date: 2002/07/15 21:34:04 $
a15 1
4) How do I ensure that pg_dump and pg_restore can handle files > 2 Gb?
d34 4
a37 4
You can build with either GCC or Sun's compiler suite.  We have heard reports
of problems when using gcc 2.95.1; gcc 2.95.3 is recommended.  If you are
using Sun's compiler, be careful *not* to select /usr/ucb/cc; use
/opt/SUNWspro/bin/cc.
d74 1
a74 12
4) How do I ensure that pg_dump and pg_restore can handle files > 2 Gb?

By default, gcc will build programs that only handle 32-bit file offsets.
This is not a real problem for the server but can easily be trouble for
pg_dump and pg_restore.  Before running 'configure', set your CFLAGS variable
to specify support for files with 64-bit offsets.  This has been verified
to work on Solaris 7:

     CFLAGS="`getconf LFS_CFLAGS`"; export CFLAGS


5) Why does my 64-bit build sometimes crash?
@


1.16.2.1
log
@Revise platform FAQs.
@
text
@d2 1
a2 1
Frequently Asked Questions (FAQ) for PostgreSQL
d6 1
a6 1
last updated:        $Date: 2002/07/27 20:10:03 $
d16 1
d35 4
a38 4
You can build with either GCC or Sun's compiler suite.  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.
d75 12
a86 1
4) Why does my 64-bit build sometimes crash?
@


1.16.2.2
log
@Update TODO/FAQ for 7.3 release.
@
text
@d6 1
a6 1
last updated:        $Date: 2002/11/11 20:04:05 $
@


1.16.2.3
log
@Update Russian FAQ.  Update all FAQ's for 7.3.X branch.
@
text
@@


1.16.2.4
log
@Update FAQ's in head and 7.3.X.
@
text
@@


1.16.2.5
log
@Update all FAQ's for 7.3.4.
@
text
@@


1.15
log
@Remove certain Makefile dependencies by using full pathnames in
configure.in.
@
text
@d6 1
a6 1
last updated:        $Date: 2002/03/04 17:47:11 $
d91 1
a91 1
than the library copy.  To do this, after you run 'configure' edit two files
d94 2
a95 2
(1) In src/Makefile.global, change the line
	SNPRINTF = 
d97 1
a97 1
	SNPRINTF = $(top_builddir)/src/backend/port/snprint.o
d99 2
a100 2
(2) In src/backend/port/Makefile, add "snprintf.o" to OBJS.  (Skip this
step if you see "$(SNPRINTF)" already listed in OBJS.)
@


1.14
log
@Update FAQ_Solaris with info about gcc 2.95.1 problems and how to work
around 64-bit vsnprintf bug.
@
text
@d6 1
a6 1
last updated:        $Date: 2002/02/12 22:35:07 $
d97 1
a97 1
	SNPRINTF = snprintf.o
@


1.13
log
@Add warning not to use /usr/ucb/cc on Solaris.
@
text
@d6 1
a6 1
last updated:        $Date: 2002/01/18 20:56:17 $
d17 1
d35 4
a38 3
You can build with either GCC or Sun's compiler suite.
If you are using Sun's compiler, be careful *not* to select /usr/ucb/cc;
use /opt/SUNWspro/bin/cc.
d84 19
@


1.13.2.1
log
@Update FAQ_Solaris with info about gcc 2.95.1 problems and how to work
around 64-bit vsnprintf bug.
@
text
@d6 1
a6 1
last updated:        $Date: 2002/02/12 22:35:07 $
a16 1
5) Why does my 64-bit build sometimes crash?
d34 3
a36 4
You can build with either GCC or Sun's compiler suite.  We have heard reports
of problems when using gcc 2.95.1; gcc 2.95.3 is recommended.  If you are
using Sun's compiler, be careful *not* to select /usr/ucb/cc; use
/opt/SUNWspro/bin/cc.
a81 19


5) 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 two files
produced by configure:

(1) In src/Makefile.global, change the line
	SNPRINTF = 
to read
	SNPRINTF = snprintf.o

(2) In src/backend/port/Makefile, add "snprintf.o" to OBJS.  (Skip this
step if you see "$(SNPRINTF)" already listed in OBJS.)

Then build as usual.
@


1.12
log
@Add info about how to enable large-file support, so that pg_dump won't
choke at 2Gb of output.  From Andrew Sullivan.
@
text
@d6 1
a6 1
last updated:        $Date: 2001/12/10 13:02:20 $
d26 1
a26 2

Both GCC and the Sun compiler suite work.
d33 4
@


1.11
log
@update
@
text
@d6 1
a6 1
last updated:        $Date: 2001/04/08 16:36:13 $
d16 1
d68 11
@


1.10
log
@Update to reflect OpenSSL 0.9.6a release.
@
text
@d2 1
a2 1
Frequently Asked Questions (FAQ) for PostgreSQL 7.1
d6 1
a6 1
last updated:        $Date: 2001/04/04 20:02:31 $
d8 1
a8 2
current maintainer:  Marc Liyanage (liyanage@@access.ch)
original author:     Marc Liyanage (liyanage@@access.ch)
a15 2
4) A bunch of regression tests fail in random, non-reproduceable
   patterns.  What's wrong?
d65 2
a66 18
In the future, consider installing the offending libraries so they
provide their own "rpath".


4) A bunch of regression tests fail in random, non-reproduceable
   patterns.  What's wrong?

A lot of users have reported that the parallel regression test suite
causes a varying, unpredictable set of tests to fail, usually tests in
the second half of the run.  The failure is usually a failure to
connect to the server at all, or an abrupt loss of the connection.
Invariably, these problems go away when the regression test suite is
changed to use TCP/IP sockets instead of Unix domain sockets.  (Change
line 163 of src/test/regress/pg_regress to match *solaris*; yes, there
should be an easier way to do this.)  Since a number of users do not
seem to have any problems with this at all, we do not claim that "Unix
domain sockets are broken on Solaris", but feel free to draw your own
conclusions, or better yet, share your insights with the rest of us.
@


1.9
log
@update
@
text
@d6 1
a6 1
last updated:        $Date: 2001/03/13 20:42:11 $
d40 1
a40 1
When you build PostgreSQL with OpenSSL support you will probably get
a49 1
We believe that this should be fixed by OpenSSL.
d51 2
a52 2
The problem can be worked around by removing the inclusion of
<crypt.h> in these four files.
@


1.8
log
@update
@
text
@d2 1
a2 1
Frequently Asked Questions (FAQ) for PostgreSQL  V7.1
d6 1
a6 1
last updated:        $Date: 2000/10/19 03:18:56 $
d16 3
d54 33
@


1.7
log
@Solaris looks like it is OK now, FAQ item removed.
@
text
@d1 6
a6 6
=======================================================
Frequently Asked Questions (FAQ) for PostgreSQL  V6.5
Sun Solaris Specific
TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ
=======================================================
last updated:        $Date: 2000/10/18 21:18:24 $
d14 2
a15 2
1.1) What tools do I need to build and install PostgreSQL on Solaris?
1.2) What else do I have to do before building PostgreSQL? 
d18 1
a18 14
Notes:

- The commands given here are for the bash shell. If you use
  a different shell, you'll have to change the commands accordingly,
  especially these regarding environment variables.

- These instructions are written for Solaris 2.6


----------------------------------------------------------------------
Section 1:  Building and Installing PostgreSQL
----------------------------------------------------------------------

1.1) What tools do I need to build and install PostgreSQL on Solaris?
d22 1
a22 3
- GNU flex 2.5.4 or better (the lex included in Solaris 2.6 won't work)
- GNU bison (the yacc included in Solaris 2.6 won't work)
- GNU zip (gzip and especially gunzip for installing the docs)
d24 1
a24 1
- GNU readline library
d26 1
a26 3
We also used

- GNU cc (gcc 2.8.1)
d35 1
d37 2
a38 24
1.2) What else do I have to do before building PostgreSQL?

Shared libraries
----------------

The default installation procedure puts the shared libraries
into "/usr/local/pgsql/lib", but the dynamic loader won't
find them there at runtime unless you use some hack like
symlinking the libraries in /usr/lib or setting LD_LIBRARY_PATH
for every user that will use the DB system.

The first time you'll encounter this problem is usually when
running "initdb". It will fail with something like
   
   ld.so.1: pg_id: fatal: libpq.so: open failed: No such file or directory  
   
We recommend that you store the path of the directory containing
the libraries in the environment variable LD_RUN_PATH *before*
starting the build. This will cause the linker to store this
path in the binaries.

Do this:

# export LD_RUN_PATH=/usr/local/pgsql/lib
d40 8
a47 1
(or wherever you choose to put the libraries)
d49 2
a50 2
There is some good information about this here:
http://www.visi.com/~barr/ldpath.html
@


1.6
log
@Update solaris FAQ for pl/pgsql Michel Decima <michel.decima@@rd.francetelecom.fr>
@
text
@d6 1
a6 1
last updated:        $Date: 2000/08/26 19:34:24 $
a15 1
1.3) Why am I having trouble using PL/pgsql and other procedural languages?
a81 7


1.3) Why am I having trouble using PL/pgsql and other procedural languages?

Try adding this to template/solaris_sparc_gcc and recompile:

	LDFLAGS:-Wl,--export-dynamic
@


1.5
log
@Update platform FAQs
@
text
@d6 1
a6 1
last updated:        $Date$
d16 1
d83 7
@


1.4
log
@Fix to give super user and createdb user proper update catalog rights.
@
text
@d6 1
a6 1
last updated:        Thu Sep 21 9:30:00 CET 1999
a11 1

a15 7
1.3) Why am I getting "IpcMemoryCreate" errors when I try
     to run postmaster?
1.4) Why am I getting "Can't tell what username to use" errors
     when I try to run initdb?

A)   Contributors

a26 1

d37 1
a37 1
- GNU zip (gzip and especially zcat for installing the docs)
a52 1

a81 74


zcat
----

If

- both the original solaris zcat as well as the recommended
  GNU zcat are installed on the system (e.g. the former in /usr/bin and
  the latter in /usr/local/bin) and 
- configure (or "which zcat") finds the wrong one

then configure needs to be told where GNU zcat can be found.

Failure to do so will cause configure to select the wrong one
and the "gmake install" command in the "doc" subdirectory
(step 12 in the INSTALL file) will fail because Solaris
zcat cannot handle the .gz compressed documentation files.

To fix this, type

# export GZCAT=/usr/local/bin/zcat

(or wherever your GNU zcat lives)

before running configure.




1.3) Why am I getting "IpcMemoryCreate" errors when I try
     to run the postmaster?

(See also 3.4 in the main FAQ file)

Under Solaris 2.6 and probably others, the default shared memory
maximum segment size kernel parameter is set too low. The solution
is to put something like the following line into /etc/system and
reboot the system.

set shmsys:shminfo_shmmax=0x7fffffff

Excellent info regarding shared memory under Solaris can be found here:
http://www.sunworld.com/swol-09-1997/swol-09-insidesolaris.html




1.4) Why am I getting "Can't tell what username to use" errors
     when I try to run initdb?

Put something like this into the .bash_profile startup script
of the postgres user (see also step 17 in the INSTALL file):

export USER=postgres









----------------------------------------------------------------------
Section A:  Contributors
----------------------------------------------------------------------

- Jose Luis Rodriguez Garcia
  Suggested to change the shmmax parameter in 1.3 from 0xffffffff to 0x7fffffff
  because the value is a signed integer in Solaris versions prior to 2.6.



@


1.3
log
@New Solaris FAQ.
@
text
@d6 1
a6 1
last updated:        Thu Sep 2 11:40:00 CET 1999
d22 4
d132 1
a132 1
set shmsys:shminfo_shmmax=0xffffffff
d147 19
@


1.2
log
@Add solaris faq.
@
text
@d1 142
@


1.1
log
@file FAQ_Solaris was initially added on branch REL6_5_PATCHES.
@
text
@@


1.1.2.1
log
@Update for 6.5.2.
@
text
@@


1.1.2.2
log
@new solaris faq.
@
text
@a0 142
=======================================================
Frequently Asked Questions (FAQ) for PostgreSQL  V6.5
Sun Solaris Specific
TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ
=======================================================
last updated:        Thu Sep 2 11:40:00 CET 1999

current maintainer:  Marc Liyanage (liyanage@@access.ch)
original author:     Marc Liyanage (liyanage@@access.ch)



Contents:

1.1) What tools do I need to build and install PostgreSQL on Solaris?
1.2) What else do I have to do before building PostgreSQL? 
1.3) Why am I getting "IpcMemoryCreate" errors when I try
     to run postmaster?
1.4) Why am I getting "Can't tell what username to use" errors
     when I try to run initdb?

Notes:

- The commands given here are for the bash shell. If you use
  a different shell, you'll have to change the commands accordingly,
  especially these regarding environment variables.

- These instructions are written for Solaris 2.6



----------------------------------------------------------------------
Section 1:  Building and Installing PostgreSQL
----------------------------------------------------------------------

1.1) What tools do I need to build and install PostgreSQL on Solaris?

You will need

- GNU flex 2.5.4 or better (the lex included in Solaris 2.6 won't work)
- GNU bison (the yacc included in Solaris 2.6 won't work)
- GNU zip (gzip and especially zcat for installing the docs)
- GNU make
- GNU readline library

We also used

- GNU cc (gcc 2.8.1)

If you like Solaris packages, you can find these tools here:
http://www.sunfreeware.com

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




1.2) What else do I have to do before building PostgreSQL?

Shared libraries
----------------

The default installation procedure puts the shared libraries
into "/usr/local/pgsql/lib", but the dynamic loader won't
find them there at runtime unless you use some hack like
symlinking the libraries in /usr/lib or setting LD_LIBRARY_PATH
for every user that will use the DB system.

The first time you'll encounter this problem is usually when
running "initdb". It will fail with something like
   
   ld.so.1: pg_id: fatal: libpq.so: open failed: No such file or directory  
   
We recommend that you store the path of the directory containing
the libraries in the environment variable LD_RUN_PATH *before*
starting the build. This will cause the linker to store this
path in the binaries.

Do this:

# export LD_RUN_PATH=/usr/local/pgsql/lib

(or wherever you choose to put the libraries)

There is some good information about this here:
http://www.visi.com/~barr/ldpath.html


zcat
----

If

- both the original solaris zcat as well as the recommended
  GNU zcat are installed on the system (e.g. the former in /usr/bin and
  the latter in /usr/local/bin) and 
- configure (or "which zcat") finds the wrong one

then configure needs to be told where GNU zcat can be found.

Failure to do so will cause configure to select the wrong one
and the "gmake install" command in the "doc" subdirectory
(step 12 in the INSTALL file) will fail because Solaris
zcat cannot handle the .gz compressed documentation files.

To fix this, type

# export GZCAT=/usr/local/bin/zcat

(or wherever your GNU zcat lives)

before running configure.




1.3) Why am I getting "IpcMemoryCreate" errors when I try
     to run the postmaster?

(See also 3.4 in the main FAQ file)

Under Solaris 2.6 and probably others, the default shared memory
maximum segment size kernel parameter is set too low. The solution
is to put something like the following line into /etc/system and
reboot the system.

set shmsys:shminfo_shmmax=0xffffffff

Excellent info regarding shared memory under Solaris can be found here:
http://www.sunworld.com/swol-09-1997/swol-09-insidesolaris.html




1.4) Why am I getting "Can't tell what username to use" errors
     when I try to run initdb?

Put something like this into the .bash_profile startup script
of the postgres user (see also step 17 in the INSTALL file):

export USER=postgres
@


1.1.2.3
log
@New Solaris FAQ.
@
text
@d6 1
a6 1
last updated:        Thu Sep 21 9:30:00 CET 1999
a21 4
A)   Contributors



d128 1
a128 1
set shmsys:shminfo_shmmax=0x7fffffff
a142 19









----------------------------------------------------------------------
Section A:  Contributors
----------------------------------------------------------------------

- Jose Luis Rodriguez Garcia
  Suggested to change the shmmax parameter in 1.3 from 0xffffffff to 0x7fffffff
  because the value is a signed integer in Solaris versions prior to 2.6.



@
