Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Slony-I configu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 15825 of 17437
Post > Topic >>

Slony-I configuration problem, probably due to custom casts in 8.3

by Markus.Wollny@[EMAIL PROTECTED] ("Markus Wollny") Jun 17, 2008 at 01:52 PM

Hi

I'm trying to get Slony-I up and running; master-db is PostgreSQL 8.3.1,
sl=
ave is PostgreSQL 8.2.4, Slony-I is 1.2.14 on both machines.=20

This is the DDL for the table I wish to replicate:

CREATE TABLE stats.article_impressions_day
(
site_id integer NOT NULL,
article_id integer NOT NULL,
date_day date NOT NULL,
impressions_p1 integer,
impressions_total integer NOT NULL,
impressions_pages integer,
CONSTRAINT "pk_article_impressions_day" PRIMARY KEY (site_id, article_id,
d=
ate_day)
)WITHOUT OIDS;
-- Indexes
CREATE INDEX idx_article_impressions_day_total ON
stats.article_impressions=
_day USING btree (impressions_total);
CREATE INDEX idx_article_impressions_day_site ON
stats.article_impressions_=
day USING btree (site_id);
CREATE INDEX idx_article_impressions_day_p1 ON
stats.article_impressions_da=
y USING btree (impressions_p1);
CREATE INDEX idx_article_impressions_day_date_day ON
stats.article_impressi=
ons_day USING btree (date_day);
CREATE INDEX idx_article_impressions_day_aid ON
stats.article_impressions_d=
ay USING btree (article_id);

This is my slonik-script:

--------
#!/bin/sh

CLUSTER=3Dstats
DBNAME1=3Dcommunity
DBNAME2=3Dcbox
HOST1=3Dciadb2
HOST2=3Dciadb1
SLONY_USER=3Dpostgres
PGBENCH_USER=3Dpostgres

/opt/pgsql/bin/slonik <<_EOF_
        cluster name =3D $CLUSTER;
        node 1 admin conninfo =3D 'dbname=3D$DBNAME1 host=3D$HOST1
user=3D$=
SLONY_USER';
        node 2 admin conninfo =3D 'dbname=3D$DBNAME2 host=3D$HOST2
user=3D$=
SLONY_USER';
        init cluster ( id =3D 1, comment =3D 'Node 1' );

 create set ( id =3D 1, origin =3D 1, comment =3D 'All stats tables' );
        set add table ( set id =3D 1, origin =3D 1,
                id =3D 1, full qualified name =3D
'stats.article_impression=
s_day',
                comment =3D 'daily article stats' );
        set add table ( set id =3D 1, origin =3D 1,
                id =3D 2, full qualified name =3D
'stats.entity_impressions=
_day',
                comment =3D 'daily entity stats' );

        store node ( id =3D 2, comment =3D 'Node 2' );
        store path ( server =3D 1, client =3D 2,
                conninfo =3D 'dbname=3D$DBNAME1 host=3D$HOST1
user=3D$SLONY=
_USER');
        store path ( server =3D 2, client =3D 1,
                conninfo =3D 'dbname=3D$DBNAME2 host=3D$HOST2
user=3D$SLONY=
_USER');
        store listen ( origin =3D 1, provider =3D 1, receiver =3D 2 );
        store listen ( origin =3D 2, provider =3D 2, receiver =3D 1 );

--------

When I run this script, I get some error messages:
<stdin>:41: PGRES_FATAL_ERROR select "_stats".setAddTable(1, 1,
'stats.arti=
cle_impressions_day', 'pk_article_impressions_day', 'daily article
stats');=
  - ERROR:  operator is not unique: unknown || integer
LINE 1: SELECT  'create trigger "_stats_logtrigger_' ||  $1  || '" a...
                                                     ^
HINT:  Could not choose a best candidate operator. You might need to add
ex=
plicit type casts.
QUERY:  SELECT  'create trigger "_stats_logtrigger_' ||  $1  || '" after
in=
sert or update or delete on ' ||  $2  || ' for each row execute procedure
                                "_stats".logTrigger (''_stats'', ''' || 
$1=
  || ''', ''' ||  $3  || ''');'
CONTEXT:  PL/pgSQL function "altertableforreplication" line 62 at EXECUTE
s=
tatement
SQL statement "SELECT  "_stats".alterTableForReplication( $1 )"
PL/pgSQL function "setaddtable_int" line 109 at PERFORM
SQL statement "SELECT  "_stats".setAddTable_int( $1 ,  $2 ,  $3 ,  $4 , 
$5=
 )"
PL/pgSQL function "setaddtable" line 37 at PERFORM

I strongly suspect that there is some conflict with the implicit casts I
ad=
ded in the master-db - I used
http://people.planetpostgresql.org/peter/uplo=
ads/pg83-implicit-casts.sqlx in order to restore pre-8.3 cast behaviour.
As=
 our application still depends on this behaviour I cannot simply drop the
c=
asts. Now what could I do to get replication with these casts in place on
t=
he master-db?

Kind regards

   Markus


Computec Media AG
Sitz der Gesellschaft und Registergericht: F=FCrth (HRB 8818)
Vorstandsmitglieder: Johannes S. G=F6zalan (Vorsitzender) und Rainer
Rosenb=
usch
Vorsitzender des Aufsichtsrates: J=FCrg Marquard=20
Umsatzsteuer-Identifikationsnummer: DE 812 575 276



--=20
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 1 Posts in Topic:
Slony-I configuration problem, probably due to custom casts in 8
Markus.Wollny@[EMAIL PROT  2008-06-17 13:52:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 15:56:45 CST 2008.