[Pgpool-general] Large insert queries

Lee Smith lee.smith at aionex.com
Thu Nov 9 21:16:30 UTC 2006


Yoshiyuki Asaba,  Sorry for the double post, but I forgot to send those last 2 emails to the list as well.  For the list, here is some more meat to chew on:

Hello,

   It would appear as though you did in fact fix the loop from looping infinitely, there is still an issue in this function when the size is > MAX_SIZE.  The for loop does not guarantee that block will not be NULL when it exits any longer.  The assignment a few lines later:

...
                else
                {
                      ptr->next = block->next;
                }
...

Is causing a sigsegv as block is NULL.  I added a quick check right after the for loop exits as so:

...
                if(block == NULL)
                  return;
...

However I am not sure if just returning is the proper behavior as there are some free's that were probably intended to be executed a few lines lower..Even with my half fix, the behavior of large queries is still a little flaky, but that could just as easily be caused by the fix not managing the memory pool properly.






----- Original Message -----
From: Yoshiyuki Asaba <y-asaba at sraoss.co.jp>
To: lee smith <lee.smith at aionex.com>
Cc: pgpool-general at pgfoundry.org
Sent: Saturday, November 4, 2006 1:43:17 AM GMT-0600 US/Central
Subject: Re: [Pgpool-general] Large insert queries

Hi,

From: Lee Smith <lee.smith at aionex.com>
Subject: [Pgpool-general] Large insert queries
Date: Fri, 3 Nov 2006 14:29:12 -0800 (PST)

>    There seems to be some issues with really large insert queries (~50k into a text column, its not my fault ;)).  The first issue is in parser/pool_memory.c in the function pool_memory_free.  

Thank you for the report. I fixed it.

http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgpool/pgpool-II/parser/pool_memory.c.diff?r1=1.1&r2=1.2&f=u

--
Yoshiyuki Asaba
y-asaba at sraoss.co.jp



More information about the Pgpool-general mailing list