Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 9924EB600B5; Thu, 2 Jun 2011 12:57:39 -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 12589-02; Thu, 2 Jun 2011 15:57:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id 991E5B5DE08; Thu, 2 Jun 2011 12:57:32 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id E7E48348046; Thu, 2 Jun 2011 08:57:31 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NotMa4EY+TEN; Thu, 2 Jun 2011 08:57:26 -0700 (PDT) Received: from perhan.alvh.no-ip.org (unknown [190.95.16.242]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id DCBC0348044; Thu, 2 Jun 2011 08:57:25 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 57CA86E3F8; Thu, 2 Jun 2011 11:57:23 -0400 (CLT) Content-Type: text/plain; charset=UTF-8 Cc: Andrew Chernow , Pavel Golub , Pavel Golub , PostgreSQL Hackers , pgsql-interfaces Subject: Re: [HACKERS] PQdeleteTuple function in libpq From: Alvaro Herrera To: Merlin Moncure In-reply-to: References: <147534417.20110601184310@gf.microolap.com> <4DE6A5B7.2070700@esilo.com> <707574086.20110602112826@gf.microolap.com> <4DE79A58.4010608@esilo.com> <1307026778-sup-415@alvh.no-ip.org> Date: Thu, 02 Jun 2011 11:57:23 -0400 Message-Id: <1307030194-sup-4091@alvh.no-ip.org> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201106/9 X-Sequence-Number: 6954 Excerpts from Merlin Moncure's message of jue jun 02 11:33:28 -0400 2011: > On Thu, Jun 2, 2011 at 10:02 AM, Alvaro Herrera > wrote: > > Seems pretty wasteful if you want to delete a single tuple from a large > > result.  I think if you desired to compact the result to free some > > memory after deleting a large fraction of the tuples in the result it > > could be useful to do that, otherwise just live with the unused holes in > > the storage area as suggested by Pavel. > > That would work, but it would potentially invalidate external pointers > to internal result data. If you wanted to do this, it might be better > to expose a compaction feature which can be invoked directly. Wouldn't that also invalidate external pointers? -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support