Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 3EB6063244A for ; Sun, 25 Apr 2010 18:54:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 03181-06 for ; Sun, 25 Apr 2010 21:54:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f202.google.com (mail-iw0-f202.google.com [209.85.223.202]) by mail.postgresql.org (Postfix) with ESMTP id 6950A631E46 for ; Sun, 25 Apr 2010 18:54:46 -0300 (ADT) Received: by iwn40 with SMTP id 40so2681211iwn.1 for ; Sun, 25 Apr 2010 14:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=UR0a1+DPm0v2vJtDgUaNywNKhTjVRilFzHpha4RU7oc=; b=JGkLb5Rk3S8S4vy5VVlarG0bHEtXrXTk1CnxSzZZozclHLE8uc66p/aa3YvIx/ki+d xXLdY9+0MT14BJnV0YJ7ogRkXRPYFdhUlMukL4VXrVnfJQpxplFDrucQOyVXDoXSWUBa zsGUW0uD/PHOCLHVV+ZrIJQnm9/M/v60hYquY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=V7wgkREpiR8MtCfGV0XRYR10Dt+sbuxMH/7+54CQg6P9GYOibTmefjwUgIfJ2kuRyB KMM3RlmLL/PlfiGubcWHhRmmAGU4eIlRyECRCmAKBV3UcMkPRxmfnN1x4WNllt0gz2mE iK0sDuSsMkAl7eLCQX4rL7pp8NFq4sTe8ZURU= MIME-Version: 1.0 Received: by 10.231.153.149 with SMTP id k21mr1073246ibw.17.1272232484965; Sun, 25 Apr 2010 14:54:44 -0700 (PDT) Received: by 10.231.11.11 with HTTP; Sun, 25 Apr 2010 14:54:44 -0700 (PDT) In-Reply-To: <4BD4B44B.6030406@agliodbs.com> References: <4BD4B44B.6030406@agliodbs.com> Date: Sun, 25 Apr 2010 17:54:44 -0400 Message-ID: Subject: Re: global temporary tables From: Robert Haas To: Josh Berkus Cc: pgsql-hackers@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.069 tagged_above=-10 required=5 tests=AWL=-0.169, BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201004/1178 X-Sequence-Number: 161290 On Sun, Apr 25, 2010 at 5:29 PM, Josh Berkus wrote: > Robert, > >> (1). =A0What I *think* it is supposed to mean is that the table is a >> permanent object which is "globally" visible - that is, it's part of >> some non-temp schema like public or $user and it's column definitions >> etc. are visible to all backends - and it's not automatically removed >> on commit, backend exit, etc. - but the *contents* of the table are >> temporary and backend-local, so that each new backend initially sees >> it as empty and can then insert, update, and delete data independently >> of what any other backend does. > > While closer to the standard, the above definition is a lot less useful t= han > what I believe a lot of people want, which is a table which is globally > visible, but has no durability; that is, it does not get WAL-logged or > recovered on restart. =A0Certainly this latter definition would be far mo= re > useful to support materialized views. I think it's arguable which one is more useful, but I think a good deal of the infrastructure can be made to serve both purposes, as I further expounded upon here. http://archives.postgresql.org/pgsql-hackers/2010-04/msg01123.php ...Robert