Re: HELP!!!-----Need to Sql commands to monitoring Postgresql

From: Daniel Farina <daniel(at)heroku(dot)com>
To: charles_xie <xqwyy163(at)163(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: HELP!!!-----Need to Sql commands to monitoring Postgresql
Date: 2012-09-07 05:45:23
Message-ID: CAAZKuFYUtLePeyEcNZQ_MftRuKuV=MMuKa3EsgF-SMh6piF44A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Sep 6, 2012 at 6:50 PM, charles_xie <xqwyy163(at)163(dot)com> wrote:
> Hi,
> Thanks for your advice.i know the basic monitoring skill,because the
> postgresql database is used for the factory production , so I hope they can
> run normal and exert more perfect performance. so i need to be considered
> from the point of view ,eg : threading ,locks and so on.

I think the key structures you are looking for, then, are queries on
pg_stat_activity, pg_locks, the pg_statio table, and also "bloat" of
tables and indexes (the wiki has several slightly different relatively
large queries that help track bloat).

As others have mentioned, there are existing tools with an impressive
number of detailed queries, but knowing about these can help you
informally categorize what you are looking at. check_postgres.pl is
especially useful to copy queries from, if not using it in a Nagios
installation entirely.

--
fdr

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Albe Laurenz 2012-09-07 06:45:38 Re: libpq or postgresql performance
Previous Message Andreas Kretschmer 2012-09-07 05:35:34 Re: libpq or postgresql performance