[Pgpool-general] Large insert queries

Lee Smith lee.smith at aionex.com
Fri Nov 3 22:29:12 UTC 2006


Hello,

   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.  

<snip>
        if (chunk->header.size > MAX_SIZE)
        {
                POOL_BLOCK *block, *ptr = NULL;

                for (block = pool->largeblocks; block; ptr = block)
                {
                        if (block->block == chunk)
                            break;
                }
<snip>

That loop seems broken, so I just changed MAX_SIZE to 65536 so it never reaches that branch of code, however things still seem to break elsewhere when using psql. 

psql gives:
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.

pgpool -d -n gives:

2006-11-03 16:26:58 DEBUG: pid 14305: new_connection: connecting 0 backend
2006-11-03 16:26:58 DEBUG: pid 14305: pool_read_message_length: slot: 0 length: 8
2006-11-03 16:26:58 DEBUG: pid 14305: pool_read_message_length2: master slot: 0 length: 25
2006-11-03 16:26:58 DEBUG: pid 14305: 0 th backend: name: client_encoding value: UTF8
2006-11-03 16:26:58 DEBUG: pid 14305: pool_read_message_length2: master slot: 0 length: 23
2006-11-03 16:26:58 DEBUG: pid 14305: 0 th backend: name: DateStyle value: ISO, MDY
2006-11-03 16:26:58 DEBUG: pid 14305: pool_read_message_length2: master slot: 0 length: 25
2006-11-03 16:26:58 DEBUG: pid 14305: 0 th backend: name: integer_datetimes value: on
2006-11-03 16:26:58 DEBUG: pid 14305: pool_read_message_length2: master slot: 0 length: 20
2006-11-03 16:26:58 DEBUG: pid 14305: 0 th backend: name: is_superuser value: on
2006-11-03 16:26:58 DEBUG: pid 14305: pool_read_message_length2: master slot: 0 length: 25
2006-11-03 16:26:58 DEBUG: pid 14305: 0 th backend: name: server_encoding value: UTF8
2006-11-03 16:26:58 DEBUG: pid 14305: pool_read_message_length2: master slot: 0 length: 25
2006-11-03 16:26:58 DEBUG: pid 14305: 0 th backend: name: server_version value: 8.1.4
2006-11-03 16:26:58 DEBUG: pid 14305: pool_read_message_length2: master slot: 0 length: 35
2006-11-03 16:26:58 DEBUG: pid 14305: 0 th backend: name: session_authorization value: postgres
2006-11-03 16:26:58 DEBUG: pid 14305: pool_read_message_length2: master slot: 0 length: 36
2006-11-03 16:26:58 DEBUG: pid 14305: 0 th backend: name: standard_conforming_strings value: off
2006-11-03 16:26:58 DEBUG: pid 14305: pool_read_message_length2: master slot: 0 length: 21
2006-11-03 16:26:58 DEBUG: pid 14305: 0 th backend: name: TimeZone value: CST6CDT
2006-11-03 16:26:58 DEBUG: pid 14305: pool_read_message_length: slot: 0 length: 12
2006-11-03 16:26:58 DEBUG: pid 14305: pool_send_auth_ok: send pid 9475 to frontend
2006-11-03 16:26:58 DEBUG: pid 14305: read_kind_from_backend: read kind from 0 th backend Z NUM_BACKENDS: 1
2006-11-03 16:26:58 DEBUG: pid 14305: cached kind(5a) or kind1(00) != 0
2006-11-03 16:26:58 DEBUG: pid 14305: pool_process_query: kind from backend: Z
2006-11-03 16:26:58 DEBUG: pid 14305: pool_read_message_length: slot: 0 length: 5
2006-11-03 16:26:58 DEBUG: pid 14305: ReadyForQuery: message length: 5
2006-11-03 16:26:58 DEBUG: pid 14305: ReadyForQuery: transaction state: I
2006-11-03 16:26:58 DEBUG: pid 14305: pool_process_query: num_fds: 7


Let me know if you need any more information.

Thanks


More information about the Pgpool-general mailing list