~launchpad-committers/ubuntu/lucid/slony1/ppa-8.4

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
Building and Installing Slony-I
------------------------------------

$Id: INSTALL,v 1.12.2.2 2007-08-29 05:44:57 devrim Exp $

Slony-I currently supports PostgreSQL 7.4.0 (and higher), 8.0.x,
8.1.x, and 8.2.x.  There have also been changes made to support
features expected in 8.3.  The "UPDATE FUNCTIONS" command has some
problems on 8.1.0 thru 8.1.3; see the FAQ for how to cope with this.

Note that earlier versions supported versions in the 7.3.x series; as
of Slony-I 1.2.0, 7.3 support has been dropped.

If you require 7.3 support, please avail yourself of an earlier
Slony-I release; seeing as how 7.3 is very old, dating back to 2002,
you really should consider upgrading to a newer version of PostgreSQL.

Important Configuration parameters
====================================

Slony-I normally needs to be built and installed by the same user that
owns the PostgreSQL binaries.  The installation target must be
identical to the existing PostgreSQL installation particularly in view
of the fact that several Slony-I components represent libraries and
SQL scripts that need to be in the PostgreSQL lib/ and share/
directories.

On certain platforms (AIX and Solaris are known to need this),
PostgreSQL must be configured with the option --enable-thread-safety
to provide correct client libraries.

The location of the PostgreSQL source-tree was specified with the
configure option --with-pgsourcetree=<dir>. As of 1.1, this configure
option no longer exists, instead, locations of database components are
specified individually, such as:

--with-pgconfigdir=<dir>        Location of the PostgreSQL pg_config program.
--with-pgbindir=<dir>           Location of the PostgreSQL postmaster.
--with-pgincludedir=<dir>       Location of the PostgreSQL headers.
--with-pgincludeserverdir=<dir> Location of the PostgreSQL server headers.
--with-pglibdir=<dir>           Location of the PostgreSQL libs.
--with-pgpkglibdir=<dir>        Location of the PostgreSQL pkglibs. E.g. plpgsql.so
--with-pgsharedir=<dir>         Location of the PostgreSQL share dir. E.g. postgresql.conf.sample

*USUALLY*, all you should need to specify is the first of those
locations, namely --with-pgconfigdir=/path/to/pg_config/bin; the
others should be able to be inferred based on the output of pg_config.

PostgreSQL version 8 installs the server header #include files by
default; with version 7.4 and earlier, you need to make sure that the
build installation included doing "make install-all-headers",
otherwise the server headers will not be installed, and Slony-I will
be unable to compile.

After running configure, you may wish to review the file
"Makefile.global" to ensure it is looking in the right places for all of
the components. If you failed to specify some of those locations, you
may discover that your system fills in some surprising values...

Files Installed
==================

The main list of files installed within the PostgreSQL instance is:

    * $bindir/slon
    * $bindir/slonik
    * $libdir/slony1_funcs$(DLSUFFIX)
    * $libdir/xxid($DLSUFFIX)
    * $datadir/slony1_base.sql
    * $datadir/slony1_base.v73.sql
    * $datadir/slony1_base.v74.sql
    * $datadir/slony1_funcs.sql
    * $datadir/slony1_funcs.v73.sql
    * $datadir/slony1_funcs.v74.sql
    * $datadir/xxid.v73.sql 

The .sql files are not fully substituted yet.  And yes, both the 7.3
and the 7.4 files get installed on a system, irrespective of its
version.  The slonik admin utility does namespace/cluster
substitutions within the files, and loads those files when creating
replication nodes.  At that point in time, the database being
initialized may be remote and may run a different version of
PostgreSQL than that of the local host.

At the very least, the two shared objects installed in the $libdir
directory must be installed onto every computer that is supposed to
become a Slony node. (Other components may be able to be loaded
remotely from other hosts.)

altperl Administration tools
================================

If you wish to have the "altperl" administration tools available, you
need to specify the "--with-perltools=somewhere" option.

Building Documentation - Admin Guide
========================================

There is an extensive "Administrator's Guide" containing what wisdom
has been discovered and written down about the care and feeding of
Slony-I.

This is only built if you specify "--with-docs"

Note that you may have difficulty building the documentation on Red
Hat-based systems due to NAMELEN being set way too low.  Havoc
Pennington opened a bug on this back in mid-2001, back in the days of
Red Hat 7.1; Red Hat Software has assigned the bug, but there does not
appear to have been much progress since then.  The second URL below
indicates that there is intent to address the issue by bumping up the
value of NAMELEN in some future release of Red Hat Enterprise Linux,
but that won't likely help you in 2005.  Fedora Core 4 should have the
issue addressed somewhat sooner.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=36058
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=159382 (For RHEL)

A pre-built copy of the "admin guide" should be readily available,
either in the form of a separate tarball nearby, or in the directory
doc/adminguide/prebuilt

Until Red Hat Software fixes this bug, as root, you may work around the
issue by changing NAMELEN as follows:
cd /usr/share/sgml && perl -pi.bak -e 's/(NAMELEN\s+)44/${1}256/' `find . -type f |xargs grep 'NAMELEN.*44'|sed -e 's/:.*//'`

Building Slony-I for use with Packaged PostgreSQL Binaries
============================================================

If you are building Slony-I against a prepackaged binary install of
PostgreSQL as provided in RPM or .deb packages, you very likely need
to install an additional "postgresql-dev" package which contains the
PostgreSQL #include files.

If you are running a pre-8.0 version of PostgreSQL, and the packagers
did not use "make install-all-headers" to install server headers, you
may find yourself forced to throw the prepackaged version overboard and
build PostgreSQL yourself.

If you are looking for what software dependancies there are, it may be
useful to look at the file redhat/slony-I.spec to see what
dependancies they point to.  There is also a .spec file around for
SuSE.  If you have difficulties building on distributions based on
either Red Hat or SuSE's distributions, the ".spec" files may be quite
useful to help puzzle things out.

On RHAS/RHEL/Centos, people have frequently reported problems relating
to missing Kerberos #include files; apparently the use of OpenSSH for
authentication draws in a dependancy on Kerberos that isn't
automatically detected.  You may need to add an -I path for
/usr/kerberos/include; see postgresql-slony1.spec for more
details.

On Debian, there is now an official package; see
<http://packages.qa.debian.org/s/slony1.html> for more details.