pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: ashok raj <ashokexplorer@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: procpid for temp schema
Date: Tue, 31 Mar 2009 10:34:24 -0400
Message-ID: <20090331143424.GR23023@alvh.no-ip.org> (raw)
In-Reply-To: <399c75c20903310100q2dfb449cn3f501a58144baf4c@mail.gmail.com>
References: <399c75c20903310100q2dfb449cn3f501a58144baf4c@mail.gmail.com>

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



view thread (3+ messages)

Message-ID: <20090331143424.GR23023@alvh.no-ip.org>
Permalink:  ../20090331143424.GR23023@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20090331143424.GR23023@alvh.no-ip.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: alvherre@commandprompt.com, ashokexplorer@gmail.com
  Subject: Re: procpid for temp schema
  In-Reply-To: <20090331143424.GR23023@alvh.no-ip.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox