Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id AAF9F634E71 for ; Tue, 31 Mar 2009 11:34:33 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 95378-05 for ; Tue, 31 Mar 2009 11:34:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by mail.postgresql.org (Postfix) with ESMTP id D746A632365 for ; Tue, 31 Mar 2009 11:34:30 -0300 (ADT) Received: from perhan.alvh.no-ip.org (200-126-96-54.bk7-dsl.surnet.cl [200.126.96.54]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id n2VEfNKW014009 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 31 Mar 2009 07:41:26 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 2A83D17E81; Tue, 31 Mar 2009 10:34:24 -0400 (CLT) Date: Tue, 31 Mar 2009 10:34:24 -0400 From: Alvaro Herrera To: ashok raj Cc: pgsql-admin@postgresql.org Subject: Re: procpid for temp schema Message-ID: <20090331143424.GR23023@alvh.no-ip.org> References: <399c75c20903310100q2dfb449cn3f501a58144baf4c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <399c75c20903310100q2dfb449cn3f501a58144baf4c@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Tue, 31 Mar 2009 07:41:26 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/267 X-Sequence-Number: 31767 ashok raj escribió: > Hi , > > is there a way that we could find which procpid or connection that > has created a particular temporary schema (pg_temp_*) ?. > > In one of our db a temporary schema (pg_temp_48) was using more > than 200GB of disk space and how to find the connection which has created > the temp schema, ? Try this select backendid, pg_stat_get_backend_pid(backendid) as pid from pg_stat_get_backend_idset() as backendid; Look for backendid=48. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support