X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5BB619FB1E9 for ; Thu, 10 Aug 2006 13:17:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 31123-07 for ; Thu, 10 Aug 2006 13:17:15 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id E93389FA502 for ; Thu, 10 Aug 2006 13:17:14 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Thu, 10 Aug 2006 16:17:13 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 10 Aug 2006 11:17:13 -0500 Subject: Re: Tempdb From: Scott Marlowe To: "Sharma;G.S." Cc: pgsql-admin@postgresql.org In-Reply-To: <002b01c6bc94$ec1cf420$be05a8c0@ng3024> References: <002b01c6bc94$ec1cf420$be05a8c0@ng3024> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1155226633.20252.164.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 10 Aug 2006 11:17:13 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.093 tagged_above=0 required=5 tests=AWL, SPF_PASS, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200608/139 X-Sequence-Number: 22682 On Thu, 2006-08-10 at 10:52, Sharma;G.S. wrote: > Hi, > can anybody tell me the How temporary tablespace management is done by > postgres . > where the temdb is located , how to find out the space taken by tempdb Slowly step away from the Oracle and everything will be OK. :) Seriously though, PostgreSQL doesn't use a separate temporary database for temp stuff, it uses a set of temporary schemas for temporary things. If you have temporary stuff, you'll see the schemas. test=> create temporary table abc (a int); CREATE TABLE test=> \dn List of schemas Name | Owner --------------------+---------- daily20051021 | postgres information_schema | postgres pg_catalog | postgres pg_temp_3 | postgres pg_toast | postgres public | smarlowe (8 rows) You can change your search path to one: test=> set search_path='pg_temp_1'; SET test=> \d List of relations Schema | Name | Type | Owner -----------+------+-------+---------- pg_temp_3 | abc | table | smarlowe (1 row) Note that tablespace management (quotas, etc.) are MUCH more primitive in PostgreSQL than in Oracle. This partly reflects the eras in which the two dbs grew up and what they were doing. Oracle grew up when 500 Meg RAID arrays were quite large, and space was expensive, and controlling the use of it was important. PostgreSQL "grew up" much later, when 500 Meg hard drives were door stops and controlling the use of disk space was often more bother than just adding on more drives to an array. Not that there's no need for quotes in postgresql, there is. It's just not been a priority for anyone to jump into. Now that we have table spaces, you can use those to control space usage by putting different things on differently sized drive arrays. Still kinda primitive, but it works.