Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 455FE9FBDE1 for ; Thu, 17 May 2007 10:20:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 70927-01-2 for ; Thu, 17 May 2007 10:20:51 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail1.sun.ac.za (mail1.sun.ac.za [146.232.64.12]) by postgresql.org (Postfix) with ESMTP id 742F09FB500 for ; Thu, 17 May 2007 10:20:41 -0300 (ADT) Received: from burger.sun.ac.za ([146.232.128.30]) by mail1.sun.ac.za with esmtp (Exim 4.50) id 1HofuD-0006WG-2K for pgsql-admin@postgresql.org; Thu, 17 May 2007 15:20:33 +0200 Received: from js by burger.sun.ac.za with local (Exim 4.63) (envelope-from ) id 1HofuD-0002Wp-0h for pgsql-admin@postgresql.org; Thu, 17 May 2007 15:20:33 +0200 Date: Thu, 17 May 2007 15:20:33 +0200 From: Johann Spies To: pgsql-admin@postgresql.org Subject: Re: ERROR: invalid memory alloc request size Message-ID: <20070517132033.GA9482@sun.ac.za> Mail-Followup-To: Johann Spies , pgsql-admin@postgresql.org References: <20070514131318.GA26537@sun.ac.za> <11217.1179153258@sss.pgh.pa.us> <20070515105042.GA8121@burger.sun.ac.za> <5221.1179337804@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5221.1179337804@sss.pgh.pa.us> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.282 tagged_above=0 required=5 tests=AWL=0.281, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200705/161 X-Sequence-Number: 25481 On Wed, May 16, 2007 at 01:50:04PM -0400, Tom Lane wrote: > You got the wrong process then --- maybe the postmaster itself rather > than the backend assigned to your psql session? You can identify the > backend PID via pg_backend_pid() within the psql session of interest, > or look in pg_stat_activity. Thanks. I have now activated gdb on three sub-process busy with the query as far as I can determine. The first one was the the writer process which reached a breakpoint before the query ended. Here is the output: Program received signal SIGINT, Interrupt. 0xffffe410 in __kernel_vsyscall () (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb7c5b03d in select () from /lib/tls/i686/cmov/libc.so.6 #2 0x082a8dff in pg_usleep () #3 0x081c1862 in BackgroundWriterMain () #4 0x080cbf71 in BootstrapMain () #5 0x081c6c87 in ClosePostmasterPorts () #6 0x081cab77 in PostmasterMain () #7 #8 0xffffe410 in __kernel_vsyscall () #9 0xb7c5b03d in select () from /lib/tls/i686/cmov/libc.so.6 #10 0x081c8037 in ClosePostmasterPorts () #11 0x081c9924 in PostmasterMain () #12 0x081823b5 in main () (gdb) q Another one that happened before an error message from psql. I typed 'cont' after this output and the error message from psql followed thereafter. Breakpoint 1, 0x0827eef6 in errfinish () (gdb) bt #0 0x0827eef6 in errfinish () #1 0x0828039c in elog_finish () #2 0x082993b3 in MemoryContextAlloc () #3 0x0828d437 in pg_mb2wchar () #4 0x0811c288 in CreateCopyDestReceiver () #5 0x0811ea43 in DoCopy () #6 0x081f9d00 in ProcessUtility () #7 0x081f6ed9 in PostgresMain () #8 0x081f7cac in FreeQueryDesc () #9 0x081f84d9 in PortalRun () #10 0x081f3b51 in pg_parse_query () #11 0x081f5296 in PostgresMain () #12 0x081c8a1f in ClosePostmasterPorts () #13 0x081c9924 in PostmasterMain () #14 0x081823b5 in main () Regards Johann -- Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "Jesus said unto her, I am the resurrection, and the life. He that believeth in me, though he were dead, yet shall he live." John 11:25