Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 27D2F1337B47 for ; Wed, 4 May 2011 14:54:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 34827-08 for ; Wed, 4 May 2011 17:54:23 +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 213DD1337B4E for ; Wed, 4 May 2011 14:54:22 -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 p44HsKws014666; Wed, 4 May 2011 13:54:20 -0400 (EDT) To: Scott Marlowe cc: Mark Stosberg , pgsql-admin@postgresql.org Subject: Re: Re: best practice for moving millions of rows to child table when setting up partitioning? In-reply-to: References: <659395.83416.qm@web39708.mail.mud.yahoo.com> Comments: In-reply-to Scott Marlowe message dated "Wed, 04 May 2011 11:33:03 -0600" Date: Wed, 04 May 2011 13:54:20 -0400 Message-ID: <14665.1304531660@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.595 tagged_above=-10 required=5 tests=BAYES_00=-1.9, SARE_MILLIONSOF=0.315, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/46 X-Sequence-Number: 37483 Scott Marlowe writes: > On Wed, May 4, 2011 at 11:04 AM, Mark Stosberg wrote: >> Further, since TRUNCATE permanently and instantly deletes mass amounts >> of data, I would hope that it would provide "safety" by default, but >> only truncating one table unless I specify otherwise. The reason it works like that is that the SQL standard says so :-( There was considerable angst about this when we made TRUNCATE recurse to children, IIRC, but we decided we had to make it work that way. regards, tom lane