Skip site navigation (1) Skip section navigation (2)

Re: procpid for temp schema

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: ashok raj <ashokexplorer(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: procpid for temp schema
Date: 2009-03-31 14:34:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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                      
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

pgsql-admin by date

Next:From: Rafael DomicianoDate: 2009-03-31 16:04:15
Subject: Vacuum Full
Previous:From: Tom LaneDate: 2009-03-31 14:24:28
Subject: Re: PG Patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group