Tam McLaughlin tam.mclaughlin at gmail.com
Thu Mar 5 03:02:48 PST 2009
I have now updated to 2.0.1 so will check if this makes a difference.

On Thu, Mar 5, 2009 at 9:47 AM, Tam McLaughlin <tam.mclaughlin at gmail.com>wr=
ote:

> Hi,
>
> We have been getting the error:
>
> ERROR,XX000,"Slony-I: old key column lots_history_data.hold_name IS NULL =
on
> UPDATE",,,,,,"update UK4628.lots_history_data set next_txid =3D 63744 whe=
relot
> =3D 'K0099X10' and next_txid is null",,
>
> and after some research, this appears to be bug 73, which is a duplicate =
of
> bug 67.
>
> I copied the patch shown in the bugzilla page and tried to patch only for
> it to fail. It seems that the reason it failed was that the code already
> contained the patch as shown below. Am I missing something or there still=
 a
> problem with this bug?
>
> Thanks.
> Tam
>
>
> slony1_funcs.c : line 688
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> for (i =3D 0, attkind_idx =3D -1; i < tg->tg_relation->rd_att->natts; i++)
>                 {
>                         /*
>                          * Ignore dropped columns
>                          */
>                         if (tupdesc->attrs[i]->attisdropped)
>                                 continue;
>
>                         attkind_idx++;
>                         if (attkind[attkind_idx] !=3D 'k')
>                                 continue;
>
> ------------------------------------------
>
> The versions I am using are below, where slony was downloaded on 5th Feb.
>
> $ psql --version
> psql (PostgreSQL) 8.3.3
> contains support for command-line editing
> $ slon -v
> slon version 2.0.0
>
> The structure of the table is:
>
> SET default_with_oids =3D false;
>
> CREATE TABLE lots_history_data (
>     txid bigint NOT NULL,
>     next_txid bigint,
>     lot character varying(20) NOT NULL,
>     product character varying(30),
>     route character varying(20),
>     operation integer,
>     next_std_route character varying(20),
>     next_std_oper integer,
>     lot_is_parent character(1) DEFAULT 'N'::bpchar,
>     qty real,
>     owner character varying(20),
>     due_date date,
>     terminated character(1) DEFAULT 'N'::bpchar,
>     hot_lot character(1) DEFAULT 'N'::bpchar,
>     restricted character(1) DEFAULT 'N'::bpchar,
>     in_rework character(1) DEFAULT 'N'::bpchar,
>     kitt_comp character(1) DEFAULT 'N'::bpchar,
>     in_transit character(1) DEFAULT 'N'::bpchar,
>     in_non_seq_mode character(1) DEFAULT 'N'::bpchar,
>     on_hold character(1) DEFAULT 'N'::bpchar,
>     in_process character(1) DEFAULT 'Y'::bpchar,
>     unit_trace character(1) DEFAULT 'N'::bpchar,
>     sub_products character(1) DEFAULT 'N'::bpchar,
>     allo_comp character(1) DEFAULT 'N'::bpchar,
>     movein_reqd character(1) DEFAULT 'N'::bpchar,
>     script_id character varying(20),
>     script_ver numeric,
>     script_step integer,
>     next_script_id character varying(20),
>     next_script_ver numeric,
>     next_script_step integer,
>     child_of character varying(20),
>     hold_cat character varying(20),
>     hold_name character varying(20),
> hold_note character varying(80),
>     lotname character varying(20),
>     eng_owner character varying(40),
>     stores character(1) DEFAULT 'N'::bpchar,
>     own_entity character varying(20),
>     password character varying(20),
>     created timestamp without time zone,
>     updated timestamp without time zone,
>     main_route character varying(20),
>     main_seqno integer,
>     seqno integer
> );
>
> ALTER TABLE uk4628.lots_history_data OWNER TO mes;
>
> ALTER TABLE ONLY lots_history_data
>     ADD CONSTRAINT lots_history_data_pk PRIMARY KEY (txid, lot);
> CREATE INDEX lot_history_data_lot_next_txid_idx ON lots_history_data
> USINGbtree (lot, next_txid);
>
> CREATE INDEX lots_history_data_next_idx ON lots_history_data USING btree
> (next_txid);
>
> CREATE TRIGGER _mesrep_denyaccess
>     BEFORE INSERT OR DELETE OR UPDATE ON lots_history_data
>     FOR EACH ROW
>     EXECUTE PROCEDURE _mesrep.denyaccess('_mesrep');
>
> ALTER TABLE lots_history_data DISABLE TRIGGER _mesrep_denyaccess;
>
> CREATE TRIGGER _mesrep_logtrigger
>     AFTER INSERT OR DELETE OR UPDATE ON lots_history_data
>     FOR EACH ROW
>     EXECUTE PROCEDURE _mesrep.logtrigger('_mesrep', '83', 'kvk');
>
> ALTER TABLE ONLY lots_history_data
>     ADD CONSTRAINT lots_history_data_lot_fkey FOREIGN KEY (lot)
> REFERENCESlots(lot);
>
> REVOKE ALL ON TABLE lots_history_data FROM PUBLIC;
> REVOKE ALL ON TABLE lots_history_data FROM mes;
> GRANT ALL ON TABLE lots_history_data TO mes;
> GRANT SELECT ON TABLE lots_history_data TO mesview;
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20090305/=
5e311c24/attachment-0001.htm


More information about the Slony1-general mailing list