Re: queries problems

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Joÿffffffffffe3o Carvalho <joaocarvalho127(at)yahoo(dot)com(dot)br>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: queries problems
Date: 2005-09-02 02:03:46
Message-ID: 20050902020346.GA58397@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

[Please copy the mailing list on replies so others can contribute
to and learn from the discussion.]

On Thu, Sep 01, 2005 at 10:33:44PM -0300, João Carvalho wrote:
> Michael Fuhr <mike(at)fuhr(dot)org> escreveu:
> > http://www.postgresql.org/docs/8.0/static/monitoring.html
> > http://www.postgresql.org/docs/8.0/static/catalogs.html
>
> Tanks a lot, it is part of that information in there. I resolved
> the schema problem and probably the toast table problem. but I still
> can´t get any information in there about the users of the locks and
> wich atributes are part of each index.

For locks, you can join pg_locks.pid with pg_stat_activity.procpid
and get user names from pg_stat_activity.usename.

http://www.postgresql.org/docs/8.0/static/view-pg-locks.html
http://www.postgresql.org/docs/8.0/static/monitoring-stats.html#MONITORING-STATS-VIEWS-TABLE

For index attributes, see pg_index.indkey and pg_attribute.attnum,
or the pg_get_indexdef() function.

http://www.postgresql.org/docs/8.0/static/catalog-pg-index.html
http://www.postgresql.org/docs/8.0/static/catalog-pg-attribute.html
http://www.postgresql.org/docs/8.0/static/functions-info.html#FUNCTIONS-INFO-CATALOG-TABLE

--
Michael Fuhr

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Marc McIntyre 2005-09-02 02:58:07 Last access date for databases/users
Previous Message Michael Fuhr 2005-09-02 00:50:48 Re: queries problems