Raghav ragavendra.dba at gmail.com
Tue Jul 2 09:11:06 PDT 2013
> What does your table stest look like on the replica?  Does it have a
> column "name" ?
>
> What DDL did you execute and in what order?  If you are adding or dropping
> the "name" column then this sounds like a bug, but more details so we can
> reproduce this would be helpful.
>

Sure. I have created a test case and implemented on both slony versions,
stabled(2.1.2) & BETA(2.2.0).

Steps:
1. Create a table with one column and few rows:
    create table stest(id int primary key);
    insert into stest values(generate_series(1,5));
2. Configure slony (initialization, create & subscribe) in SLON ARCHIVE
mode(slon -a).
3. Once sync catch up, execute DDL command without using EXECUTE SCRIPT
(like user error)
ALTER TABLE STEST ADD COLUMN NAME TEXT;
INSERT INTO STEST VALUES (10,'TEST);

Observations in Slony 2.1.2 on above scenario:

1. DDL caused replication to crash if its executed without using EXECUTE
SCRIPT(expected behavior) . Below log message is example of crash when I
executed a DDL.

2013-06-15 16:36:26 IST ERROR  remoteWorkerThread_1: "insert into
"public"."stest" ("id","name") values (10,'TEST');
" ERROR:  column "name" of relation "stest" does not exist
LINE 1: insert into "public"."stest" ("id","name") values ('1','...
....
2013-06-15 16:36:26 IST ERROR  remoteWorkerThread_1: SYNC aborted

2. Archives didn't captured the ALTER TABLE command, however an INSERT
immediate after ALTER has been captured in archives.
-bash-4.1$ fgrep -i alter *
-bash-4.1$ fgrep -i insert *
slony1_log_2_00000000000000000021.sql.tmp:insert into "public"."stest"
("id","name") values ('10','TEST');

Observation in 2.2.0B on above scenario:

1.  Executing DDL, didn't impact the replication whatsoever, in the sense
it didn't crashed. It just paused the replication. (I waited for almost 15
minuts and tried few DMLs on the table).
2.  Interesting, neither DDL nor DML's captured by archives in this version.
-bash-4.1$ fgrep -i alter *
-bash-4.1$ fgrep -i insert *
-bash-4.1$

Please let me know if any further information required from my end.

--Raghav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20130702/82be2358/attachment.htm 


More information about the Slony1-general mailing list