[Bucardo-general] Problem with Primary Key
Christian Gmeiner
christian.gmeiner at gmail.com
Wed Jun 25 12:59:48 UTC 2008
I got my multi-master setup working - needs some testing. But I have
here a problem with a following table:
CREATE TABLE anamnese_treatment
(
anamnese_id integer NOT NULL,
treatment_id integer NOT NULL,
CONSTRAINT anamnese_treatment_pkey PRIMARY KEY (anamnese_id, treatment_id),
CONSTRAINT fk9d501eb2b67e7ef8 FOREIGN KEY (anamnese_id)
REFERENCES patient (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT fk9d501eb2d45c904e FOREIGN KEY (treatment_id)
REFERENCES treatment (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (OIDS=FALSE);
ALTER TABLE anamnese_treatment OWNER TO postgres;
So the pk is (anamnese_id, treatment_id)... if i add a syn i get this
Jun 25 14:20:09 vetmed-bos postgres[29208]: [2-1] ERROR: column
"int4" does not exist at character 98
Jun 25 14:20:09 vetmed-bos postgres[29208]: [2-2] STATEMENT: CREATE
INDEX bucardo_delta_public_anamnese_treatment_rowid ON
bucardo.bucardo_delta((rowid::int4|int4)) WHERE
Jun 25 14:20:09 vetmed-bos postgres[29208]: [2-3] tablename = 33564
Jun 25 14:20:09 vetmed-bos postgres[29193]: [2-1] NOTICE: Issuing
rollback() for database handle being DESTROY'd without explicit
disconnect() at line 29.
Jun 25 14:20:09 vetmed-bos postgres[29193]: [2-2]
Jun 25 14:20:09 vetmed-bos postgres[29193]: [2-3] CONTEXT: SQL
statement "SELECT validate_sync('master_node1')"
Jun 25 14:20:09 vetmed-bos postgres[29193]: [3-1] ERROR: error from
Perl function "validate_sync": error from Perl function
"validate_sync": DBD::Pg::db do failed: ERROR:
Jun 25 14:20:09 vetmed-bos postgres[29193]: [3-2] column "int4" does not exist
Jun 25 14:20:09 vetmed-bos postgres[29193]: [3-3] LINE 1:
...tment_rowid ON bucardo.bucardo_delta((rowid::int4|int4)) WHE...
Jun 25 14:20:09 vetmed-bos postgres[29193]: [3-4]
^ at line 30.
Jun 25 14:20:09 vetmed-bos postgres[29193]: [3-5] STATEMENT: INSERT
INTO sync (source, targetdb, synctype, disable_triggers,
disable_rules, name) VALUES ('full_master'::text,
Jun 25 14:20:09 vetmed-bos postgres[29193]: [3-6] 'node1'::text,
'swap'::text, 'replica'::text, 'replica'::text, 'master_node1'::text)
Here is the goat entry for this table
16;"master";"public";"anamnese_treatment";"table";"anamnese_id|treatment_id";"anamnese_id|treatment_id";"int4|int4";f;;"";;;f;"latest";t;"2008-06-25
14:03:24.86082+02"
And here I see the problem: int4|int4 should be int4 or?
Thanks,
Christian Gmeiner
More information about the Bucardo-general
mailing list