Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1834163269C for ; Sat, 24 Apr 2010 14:38:59 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 62089-06 for ; Sat, 24 Apr 2010 17:38:48 +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 952EC63265B for ; Sat, 24 Apr 2010 14:38:48 -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 o3OHck3r009453; Sat, 24 Apr 2010 13:38:46 -0400 (EDT) To: Robert Haas cc: Greg Sabino Mullane , pgsql-hackers@postgresql.org Subject: Re: global temporary tables In-reply-to: References: <7796.1272125493@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Sat, 24 Apr 2010 13:16:20 -0400" Date: Sat, 24 Apr 2010 13:38:46 -0400 Message-ID: <9452.1272130726@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: 201004/1121 X-Sequence-Number: 161233 [ forgot to respond to this part ] Robert Haas writes: > ... I don't see the problem with DROP. > Under the proposed design, it's approximately equivalent to dropping a > table that someone else has truncated. You just wait for the > necessary lock and then do it. And do *what*? You can remove the catalog entries, but how are you going to make the physical storage of other backends' versions go away? (To say nothing of making them flush their local buffers for it.) If you do remove the catalog entries, won't you be cutting the knees out from under whatever end-of-session cleanup processing might exist in those other backends? The idea of the global table as a template that individual sessions clone working tables from would avoid most of these problems. You rejected it on the grounds that ALTER would be too hard; but if you're blowing off ALTER anyway, that argument seems pretty unimpressive. regards, tom lane