mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
It includes
-Support for mirroring tables in different Schema's -Improved documentation for compiling with 7.1.x and 7.2.x -Fixes a buffer overrun bug. Steven Singer
This commit is contained in:
@ -46,6 +46,7 @@ Pending tables.
|
||||
Installation Instructions
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
1) Compile pending.c
|
||||
|
||||
The file pending.c contains the recordchange trigger. This runs every
|
||||
@ -54,20 +55,35 @@ time a row inside of a table being mirrored changes.
|
||||
|
||||
To build the trigger run make on the "Makefile" in the DBMirror directory.
|
||||
|
||||
The Makefile supplied assumes that the postgres include files are in
|
||||
/usr/local/pgsql/include/server.
|
||||
Postgres-7.3 Make Instructions:
|
||||
|
||||
If you have already run "configure" in the pgsql-server directory
|
||||
then run "make" in the dbmirror directory to compile the trigger.
|
||||
|
||||
Postgres-7.1 & Postgres-7.2 Make Instructions:
|
||||
|
||||
The included Makefile is not compatible with postgres 7.1 and 7.2
|
||||
The trigger will need to be built by hand.
|
||||
|
||||
Run the following commands
|
||||
|
||||
gcc -fpic -I/usr/local/pgsql/include/server -c pending.c -DNOSCHEMAS
|
||||
ld -shared -o pending.so pending.o
|
||||
|
||||
Assuming the postgres include files are in /usr/local/pgsql/include/server.
|
||||
|
||||
Postgres-7.1.x installations should change this to
|
||||
/usr/local/pgsql/include (The server part is for 7.2+)
|
||||
|
||||
If you have installed the postgres include files to another location then
|
||||
modify the Makefile to reflect this.
|
||||
modify the include path to reflect this.
|
||||
|
||||
The trigger requires that all postgres headers be installed, this is
|
||||
accomplished in postgresql(7.1 or 7.2) by running "make install-all-headers"
|
||||
in the postgres source directory.
|
||||
Compiling the trigger by hand requires that all postgres headers be installed
|
||||
,this is accomplished in postgresql(7.1 or 7.2) by running
|
||||
"make install-all-headers" in the postgres source directory.
|
||||
|
||||
The Makefile should create a file named pending.so that contains the trigger.
|
||||
|
||||
You should now have a file named pending.so that contains the trigger.
|
||||
|
||||
Install this file in /usr/local/pgsql/lib (or another suitable location).
|
||||
|
||||
@ -93,6 +109,15 @@ To execute the script use psql as follows
|
||||
where MyDatabaseName is the name of the database you wish to install mirroring
|
||||
on(Your master).
|
||||
|
||||
Postgres-7.1 and 7.2 Notes:
|
||||
-The syntax for creating a trigger function changed in Postgres-7.3.
|
||||
Change the line in MirrorSetup.sql from
|
||||
|
||||
CREATE FUNCTION "recordchange" () RETURNS trigger AS
|
||||
|
||||
to
|
||||
CREATE FUNCTION "recordchange" () RETURNS OPAQUE AS
|
||||
|
||||
|
||||
3) Create slaveDatabase.conf files.
|
||||
|
||||
@ -199,6 +224,7 @@ RedHat Linux 7.1 & 6.2
|
||||
|
||||
Mandrake Linux 8.0(Limited Testing)
|
||||
-Postgres 7.2
|
||||
-Postgres 7.3
|
||||
-Perl 5.6
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user