Leon Mergen wrote:
Hello Steve,

Thanks for your help. In the meantime, is there anything I can do to
work around this issue?

Regards,

Attached is a patch that should resolve the issue with large rows. I would like to know if it fixes all of the utf8 issues discussed on this thread or if they are still outstanding.

When Jan reviews the patch and gives it an okay we can commit it to cvs.


I've also applied this patch against the REL_2_0_PROPOSED_ssinger branch of at github (http://github.com/ssinger/slony). In theory a tarball version of the 2_0 source with this change applied can be obtained at http://github.com/ssinger/slony/tarball/REL2_0_PROPOSED_ssinger





Leon Mergen


--
Steve Singer
Afilias Canada
Data Services Developer
416-673-1142
Index: src/slon/remote_worker.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_worker.c,v
retrieving revision 1.176.2.9
diff -u -r1.176.2.9 remote_worker.c
--- src/slon/remote_worker.c	11 Feb 2010 19:35:10 -0000	1.176.2.9
+++ src/slon/remote_worker.c	30 Apr 2010 18:17:14 -0000
@@ -4905,6 +4905,7 @@
 													 NULL, 10);
 					char	   *log_cmddata = PQgetvalue(res, tupno, 6);
 					int			largemem = 0;
+					res2=NULL;
 
 					tupno++;
 
@@ -4952,7 +4953,6 @@
 
 						log_cmddata = PQgetvalue(res2, 0, 0);
 						largemem = log_cmdsize;
-						PQclear(res2);
 					}
 
 					/*
@@ -5018,7 +5018,11 @@
 					if (line_ncmds >= SLON_COMMANDS_PER_LINE)
 					{
 						if (data_line_last >= data_line_alloc)
+						{
+							if(res2 != 0)
+								PQclear(res2);
 							break;
+						}
 						line_no = data_line_last++;
 
 						line = data_line[line_no];
@@ -5050,6 +5054,7 @@
 							break;
 						}
 						pthread_mutex_unlock(&(wd->workdata_lock));
+						PQclear(res2);
 					}
 				}
 
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general

Reply via email to