Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id A9E43632AC5 for ; Mon, 14 Jun 2010 14:36:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 99075-04 for ; Mon, 14 Jun 2010 17:36:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 00AA2632ABB for ; Mon, 14 Jun 2010 14:36:28 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o5EHaRWU015795; Mon, 14 Jun 2010 13:36:27 -0400 (EDT) To: Robert Voinea cc: pgsql-admin@postgresql.org Subject: Re: Server crash when using dblink_build_sql_* after alter table In-reply-to: <201006141415.09471.robert.voinea@topex.ro> References: <201006111551.23382.robert.voinea@topex.ro> <7091.1276266088@sss.pgh.pa.us> <201006141415.09471.robert.voinea@topex.ro> Comments: In-reply-to Robert Voinea message dated "Mon, 14 Jun 2010 14:15:09 +0300" Date: Mon, 14 Jun 2010 13:36:27 -0400 Message-ID: <15794.1276536987@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/103 X-Sequence-Number: 34881 Robert Voinea writes: > I attached the server log (for the crash case) and a test case with logs. > For that test case this is the error I get, no server crash. > ERROR: invalid memory alloc request size 4294967293 > The scenario is this: > Create a table, drop a column, any column then add a varchar column and an int > column. Then use dblink_build_sql_update. Yeah, it looks like dblink is simply wrong about how to count the columns in a case with dropped columns. Thanks for the report, will fix. regards, tom lane