bugzilla-daemon at main.slony.info bugzilla-daemon at main.slony.info
Mon Nov 14 15:33:54 PST 2011
http://www.slony.info/bugzilla/show_bug.cgi?id=247

--- Comment #2 from Christopher Browne <cbbrowne at ca.afilias.info> 2011-11-14 15:33:55 PST ---
I found what appeared a problem, as TRUNCATE requests seemed to generate extra
semicolons.

-> % grep TRUNCATE /tmp/archive/slony1_log_2_00000000000000000341.sql
TRUNCATE TABLE ONLY "public"."table5" CASCADE;;
TRUNCATE TABLE ONLY "public"."table5" CASCADE;;
TRUNCATE TABLE ONLY "public"."table5" CASCADE;;
TRUNCATE TABLE ONLY "public"."table5" CASCADE;;
TRUNCATE TABLE ONLY "public"."table5" CASCADE;;
TRUNCATE TABLE ONLY "public"."table5" CASCADE;;
TRUNCATE TABLE ONLY "public"."table5" CASCADE;;
TRUNCATE TABLE ONLY "public"."table5" CASCADE;;
TRUNCATE TABLE ONLY "public"."table5" CASCADE;;
TRUNCATE TABLE ONLY "public"."table5" CASCADE;;
TRUNCATE TABLE ONLY "public"."table5" CASCADE;;
TRUNCATE TABLE ONLY "public"."table5" CASCADE;;
TRUNCATE TABLE ONLY "public"."table5" CASCADE;;

This causes the log shipper to error out thus:

INFO  2011-11-14 18:21:54 > NOTICE:  Slony-I: Process archive with counter 341
created 2011-11-14 23:16:56.845883
ERROR 2011-11-14 18:21:54 >
/tmp/archive/slony1_log_2_00000000000000000341.sql:138: ERROR syntax error at
or near ;
WARN  2011-11-14 18:21:54 > waiting for resume

[Rummaging around to see where the spurious ; comes from...]

Ah.  I have half the change in place...

- you have removed the semicolon from src/backend/slony1_funcs.sql, at the
point at which it's generated.  And I'm not yet running that version of the
function; I only added in the updated log shipper binaries.

- you added semicolon to src/slon/remote_worker.c, at the point at which the
SQL is processed.  And I *am* running the newer slon...

So, with the caveat that we should watch out for 
   TRUNCATE TABLE ONLY "public"."table5" CASCADE;;
, I am happy with this one.

FYI, I noticed that the log shipper doesn't set the application name GUC; I
opened bug #250 for that.

-- 
Configure bugmail: http://www.slony.info/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the Slony1-bugs mailing list