hello,
if anyone has experience with dbmirror.pl please advise:
I am installing dbmirror (from contrib tree): I compiled it under
the source tree of postgresql-7.3b2 and everything went fine:
since I need to test it on a postgres-7.1.3 installation (which does not
include dbmirror) I then copied the pending.so (is the result of the "make"
issued in postgresql-7.3b2/contrib/dbmirror) to the test server in
/usr/lib/pgsql/contrib/dbmirror/pending.so and made a simlink as follows:
$ ls -l /usr/local/pgsql/lib/pending.so
lrwxrwxrwx 1 root root 42 Oct 10 16:03
/usr/local/pgsql/lib/pending.so -> /usr/lib/pgsql/contrib/dbmirror/pending.so
(note that I use redhat7.2 on both machines) then I get this error:
$ psql mydb < MirrorSetup.sql
ERROR: parser: parse error at or near "trigger"
where the first lines of MirrorSetup.sql are:
bash-2.05$ cat MirrorSetup.sql
CREATE FUNCTION "recordchange" () RETURNS trigger AS
'/usr/local/pgsql/lib/pending.so', 'recordchange' LANGUAGE 'C';
........
I have also set PL/pgSQL
$ createlang -l mydb
Procedural languages
Name | Trusted? | Compiler
---------+----------+----------
plpgsql | t | PL/pgSQL
(1 row)
what have I missed?
thx
antonello