On 4/30/2010 3:34 PM, Jan Wieck wrote:
On 4/30/2010 2:37 PM, Jan Wieck wrote:
On 4/30/2010 2:17 PM, Steve Singer wrote:
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.
From just reading the patch, this looks slightly wrong. There seems to
be a code path that leaves a memory leak again. Let me create a slightly
different patch.
Attached.
Attached again. This time without adding another bug.
Jan
--
Anyone who trades liberty for security deserves neither
liberty nor security. -- Benjamin Franklin
? slony1.spec
? src/backend/avl_tree.c
? src/backend/avl_tree.h
? src/parsestatements/cstylecomments.log
? src/parsestatements/emptytestresult.log
? src/parsestatements/test-scanner
? src/parsestatements/test_sql.log
? src/xxid/all
Index: src/slon/remote_worker.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_worker.c,v
retrieving revision 1.185
diff -c -r1.185 remote_worker.c
*** src/slon/remote_worker.c 11 Feb 2010 19:36:31 -0000 1.185
--- src/slon/remote_worker.c 30 Apr 2010 20:07:52 -0000
***************
*** 4952,4958 ****
log_cmddata = PQgetvalue(res2, 0, 0);
largemem = log_cmdsize;
- PQclear(res2);
}
/*
--- 4952,4957 ----
***************
*** 4963,4969 ****
--- 4962,4972 ----
*/
if (log_tableid >= wd->tab_fqname_size ||
wd->tab_fqname[log_tableid] == NULL)
+ {
+ if (largemem > 0)
+ PQclear(res2);
continue;
+ }
/*
* If we are forwarding this set, add the insert into
***************
*** 5018,5024 ****
--- 5021,5032 ----
if (line_ncmds >= SLON_COMMANDS_PER_LINE)
{
if (data_line_last >= data_line_alloc)
+ {
+ if (largemem > 0)
+ PQclear(res2);
break;
+ }
+
line_no = data_line_last++;
line = data_line[line_no];
***************
*** 5037,5042 ****
--- 5045,5051 ----
*/
if (largemem > 0)
{
+ PQclear(res2);
pthread_mutex_lock(&(wd->workdata_lock));
wd->workdata_largemem += largemem;
if (wd->workdata_largemem >= sync_max_largemem)
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general