Marc G. Fournier marc
Sun Feb 12 10:38:02 PST 2006
Just trying to get Slony 1.1.5 working to replicate between two 8.1.2 
databases, and right from the start, am having a problem ... I used, like 
I've done other other setups, slony_setup.pl to generate 
slony_master_setup.sh, but when I try and run it, I get:

$ ./slony_master_setup.sh
Errors were detected. Please review /var/lib/postgresql/slony_setup.log and fix the errors.

And, in the log file:

$ cat slony_setup.log 
ERROR:  operator does not exist: oid + integer
HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.

Now, after some checking back and forth between the master/slave (single), 
it looks like the error is with:

/usr/bin/psql -h slave -p 5432 -U postgres -d template1 -c \
"insert into pg_shadow (usename, usesysid, usecreatedb, usesuper, usecatupd, passwd, valuntil, useconfig) values (\
'user',(select case when max (usesysid) + 1 < 100 then 100 else max (usesysid) + 1 end from pg_shadow),\
'f','f','f','',null,null)"

which makes sense, since pg_shadow is defined as:

     View "pg_catalog.pg_shadow"
    Column    |  Type   | Modifiers
-------------+---------+-----------
  usename     | name    |
  usesysid    | oid     |
  usecreatedb | boolean |
  usesuper    | boolean |
  usecatupd   | boolean |
  passwd      | text    |
  valuntil    | abstime |
  useconfig   | text[]  |

so the above is trying to add 1 to usesysid::oid .. of course, in 
PostgreSQL 8.0, usesysid was an int:

template1=# \d pg_shadow
    Table "pg_catalog.pg_shadow"
    Column    |  Type   | Modifiers
-------------+---------+-----------
  usename     | name    | not null
  usesysid    | integer | not null
  usecreatedb | boolean | not null
  usesuper    | boolean | not null
  usecatupd   | boolean | not null
  passwd      | text    |
  valuntil    | abstime |
  useconfig   | text[]  |

So, looks like something got missed with the work on 8.1, at least in so 
far as the slony_setup.pl script ...

Easy work around for me is to just remove that from the script and do it 
manually but figured I'd point it out in case there is some easy way to 
fix the setup_slony.pl script itself ...



More information about the Slony1-general mailing list