41
41
default tool with the name "make".) To test for GNU make enter:
43
43
It is recommended to use version 3.76.1 or later.
44
* You need an ISO/ANSI C compiler (minimum C89-compliant). Recent
44
* You need an ISO/ANSI C compiler (at least C89-compliant). Recent
45
45
versions of GCC are recommendable, but PostgreSQL is known to build
46
46
using a wide variety of compilers from different vendors.
47
47
* tar is required to unpack the source distribution, in addition to
52
52
you type, and allows you to use arrow keys to recall and edit
53
53
previous commands. This is very helpful and is strongly
54
54
recommended. If you don't want to use it then you must specify the
55
"--without-readline" option of "configure". As an alternative, you
55
"--without-readline" option to "configure". As an alternative, you
56
56
can often use the BSD-licensed "libedit" library, originally
57
57
developed on NetBSD. The "libedit" library is GNU
58
58
Readline-compatible and is used if "libreadline" is not found, or
127
127
package, or if you want to do server development, you also need the
128
128
following packages:
130
* GNU Flex and Bison are needed to build a CVS checkout or if you
131
changed the actual scanner and parser definition files. If you need
132
them, be sure to get Flex 2.5.4 or later and Bison 1.875 or later.
133
Other lex and yacc programs cannot be used.
130
* GNU Flex and Bison are needed to build from a CVS checkout, or if
131
you changed the actual scanner and parser definition files. If you
132
need them, be sure to get Flex 2.5.4 or later and Bison 1.875 or
133
later. Other lex and yacc programs cannot be used.
134
* Perl is also needed to build from a CVS checkout, or if you changed
135
the input files for any of the build steps that use Perl scripts.
136
If building on Windows you will need Perl in any case.
135
138
If you need to get a GNU package, you can find it at your local GNU
136
139
mirror site (see http://www.gnu.org/order/ftp.html for a list) or at
168
171
keys), then use the "-o" option when running pg_dumpall.
169
172
To make the backup, you can use the pg_dumpall command from the
170
173
version you are currently running. For best results, however, try
171
to use the pg_dumpall command from PostgreSQL 8.4beta2, since this
174
to use the pg_dumpall command from PostgreSQL 8.4.0, since this
172
175
version contains bug fixes and improvements over older versions.
173
176
While this advice might seem idiosyncratic since you haven't
174
177
installed the new version yet, it is advisable to follow it if you
180
183
On systems that have PostgreSQL started at boot time, there is
181
184
probably a start-up file that will accomplish the same thing. For
182
example, on a Red Hat Linux system one might find that:
185
example, on a Red Hat Linux system one might find that this works:
183
186
/etc/rc.d/init.d/postgresql stop
185
187
3. If restoring from backup, rename or delete the old installation
186
188
directory. It is a good idea to rename the directory, rather than
187
189
delete it, in case you have trouble and need to revert to it. Keep
196
198
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
197
199
6. Restore your previous "pg_hba.conf" and any "postgresql.conf"
199
7. Start the database server, again the special database user account:
201
7. Start the database server, again using the special database user
200
203
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data
201
204
8. Finally, restore your data from backup with:
202
205
/usr/local/pgsql/bin/psql -d postgres -f outputfile
794
797
you can rebuild everything with "gmake" later on. To reset the source
795
798
tree to the state in which it was distributed, use "gmake distclean".
796
799
If you are going to build for several platforms within the same source
797
tree you must do this and rebuild for each platform. (Alternatively,
798
use a separate build tree for each platform, so that the source tree
800
tree you must do this and re-configure for each platform.
801
(Alternatively, use a separate build tree for each platform, so that
802
the source tree remains unmodified.)
801
804
If you perform a build and then discover that your "configure" options
802
805
were wrong, or if you change anything that "configure" investigates
813
On several systems with shared libraries you need to tell the system
814
how to find the newly installed shared libraries. The systems on which
815
this is *not* necessary include BSD/OS, FreeBSD, HP-UX, IRIX, Linux,
816
NetBSD, OpenBSD, Tru64 UNIX (formerly Digital UNIX), and Solaris.
816
On some systems with shared libraries you need to tell the system how
817
to find the newly installed shared libraries. The systems on which this
818
is *not* necessary include BSD/OS, FreeBSD, HP-UX, IRIX, Linux, NetBSD,
819
OpenBSD, Tru64 UNIX (formerly Digital UNIX), and Solaris.
818
821
The method to set the shared library search path varies between
819
822
platforms, but the most widely-used method is to set the environment
1016
PostgreSQL on AIX works, but getting it installed properly can be
1017
challenging. Both AIX version 4.3 and 5.3 are supported in theory. You
1018
can use GCC or the native IBM compiler xlc. In general, using recent
1019
versions of AIX and PostgreSQL helps. Check the build farm for up to
1020
date information about which versions of AIX are known to work.
1019
PostgreSQL works on AIX, but getting it installed properly can be
1020
challenging. AIX versions from 4.3.3 to 6.1 are considered supported.
1021
You can use GCC or the native IBM compiler xlc. In general, using
1022
recent versions of AIX and PostgreSQL helps. Check the build farm for
1023
up to date information about which versions of AIX are known to work.
1022
1025
Use the following "configure" flags in addition to your own if you have
1023
Readline or libz there: --with-includes=/usr/local/include
1026
installed Readline or libz there: --with-includes=/usr/local/include
1024
1027
--with-libraries=/usr/local/lib.
1026
1029
If you don't have a PowerPC or use GCC you might see rounding
1034
1037
libraries, the following URLs may help you:
1035
1038
http://www.faqs.org/faqs/aix-faq/part4/section-22.html,
1036
1039
http://www.han.de/~jum/aix/ldd.c.
1037
__________________________________________________________________
1041
On AIX 4.3.2, you need "libm.a" that is in the fileset bos.adt.libm.
1042
Try the following command:
1043
$ lslpp -l bos.adt.libm
1041
Table 1 shows the minimum recommended fix levels for various AIX
1042
versions. To check your current fix level, use "oslevel -r" in AIX
1043
4.3.3 to AIX 5.2 ML 7, or "oslevel -s" in later versions.
1045
Table 1. Minimum recommended AIX fix levels
1046
AIX version fix level
1047
AIX 4.3.3 Maintenance Level 11 + post ML11 bundle
1048
AIX 5.1 Maintenance Level 9 + post ML9 bundle
1049
AIX 5.2 Technology Level 10 Service Pack 3
1050
AIX 5.3 Technology Level 7
1044
1052
__________________________________________________________________
1059
1067
Unix-domain sockets broken
1061
AIX 5.3 has a problem where sockadr_storage is not defined to be large
1069
AIX 5.3 has a problem where sockaddr_storage is not defined to be large
1062
1070
enough. In version 5.3, IBM increased the size of sockaddr_un, the
1063
1071
address structure for Unix-domain sockets, but did not correspondingly
1064
increase the size of sockadr_storage. The result of this is that
1072
increase the size of sockaddr_storage. The result of this is that
1065
1073
attempts to use Unix-domain sockets with PostgreSQL lead to libpq
1066
1074
overflowing the data structure. TCP/IP connections work OK, but not
1067
1075
Unix-domain sockets, which prevents the regression tests from working.
1069
1077
The problem was reported to IBM, and is recorded as bug report
1070
PMR29657. If you upgrade to maintenance level 5300-03, that will
1071
include this fix. Use the command oslevel -r to determine what
1072
maintenance level you are at. An immediate resolution is to alter
1073
_SS_MAXSIZE to = 1025 in "/usr/include/sys/socket.h".
1074
__________________________________________________________________
1078
PMR29657. If you upgrade to maintenance level 5300-03 or later, that
1079
will include this fix. A quick workaround is to alter _SS_MAXSIZE to
1080
1025 in "/usr/include/sys/socket.h". In either case, recompile
1081
PostgreSQL once you have the corrected header file.
1082
__________________________________________________________________
1084
Internet address issues
1086
PostgreSQL relies on the system's getaddrinfo function to parse IP
1087
addresses in listen_addresses, "pg_hba.conf", etc. Older versions of
1088
AIX have assorted bugs in this function. If you have problems related
1089
to these settings, updating to the appropriate fix level shown in Table
1090
1 in the Section called AIX should take care of it.
1094
When implementing PostgreSQL version 8.1 on AIX 5.3, we periodically
1095
ran into problems where the statistics collector would "mysteriously"
1096
not come up successfully. This appears to be the result of unexpected
1097
behaviour in the IPv6 implementation. It looks like PostgreSQL and IPv6
1098
do not play very well together at this time on AIX.
1100
Any of the following actions "fix" the problem.
1102
* Delete the IPv6 address for localhost:
1104
# ifconfig lo0 inet6 ::1/0 delete
1105
* Remove IPv6 from net services. The file "/etc/netsvc.conf" on AIX
1106
is roughly equivalent to "/etc/nsswitch.conf" on Solaris/Linux. The
1107
default, on AIX, is thus:
1111
to deactivate searching for IPv6 addresses.
1112
__________________________________________________________________
1078
1116
AIX can be somewhat peculiar with regards to the way it does memory
1079
1117
management. You can have a server with many multiples of gigabytes of
1160
1198
Developing and Porting C and C++ Applications on AIX, IBM Redbook.
1161
1199
__________________________________________________________________
1163
Statistics Collector Issues
1165
When implementing PostgreSQL version 8.1 on AIX 5.3, we periodically
1166
ran into problems where the statistics collector would "mysteriously"
1167
not come up successfully. This appears to be the result of unexpected
1168
behaviour in the IPv6 implementation. It looks like PostgreSQL and IPv6
1169
do not play very well together at this time on AIX.
1171
Any of the following actions "fix" the problem.
1173
* Delete the IPv6 address for localhost:
1175
# ifconfig lo0 inet6 ::1/0 delete
1176
* Remove IPv6 from net services. The file "/etc/netsvc.conf" on AIX
1177
is roughly equivalent to "/etc/nsswitch.conf" on Solaris/Linux. The
1178
default, on AIX, is thus:
1182
to deactivate searching for IPv6 addresses.
1183
__________________________________________________________________
1187
1203
PostgreSQL can be built using Cygwin, a Linux-like environment for