From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-admin@postgresql.org
Subject: Re: database running slow
Date: Wed, 14 May 2003 13:46:06 -0400
Message-ID: <20030514174606.GR20729@libertyrms.info> (raw)
In-Reply-To: <20030513171955.37103.qmail@web21101.mail.yahoo.com>
References: <20030513121419.GC17278@libertyrms.info>
<20030513171955.37103.qmail@web21101.mail.yahoo.com>
On Tue, May 13, 2003 at 10:19:55AM -0700, Shankar K wrote:
>
> Define "run-away". You can look for long-running
> transactions; that might be helpful.
>
> ++ i meant a backend process taking most of the cpu
> cycles and running for ever. so i wanted to figure out
> what those processes were doing and what made them to
> hog the cpu cycles.
You can use the pid of a process to look it up in the system tables.
There's no simple way to identify long-running ones, except to look
for back ends that have been hanging around for a long time (but if
you're using pooling, it won't help you). Tools like top will be
helpful in identifying processor hogs.
> ++ how to identify those queries. once i have the
If you can identify the process, then you can identify the pid, and
use the pid in the stats tables to get the query.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: andrew@libertyrms.info
Subject: Re: database running slow
In-Reply-To: <20030514174606.GR20729@libertyrms.info>
References: <20030513121419.GC17278@libertyrms.info> <20030513171955.37103.qmail@web21101.mail.yahoo.com> <20030514174606.GR20729@libertyrms.info>
* 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