pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mahadevan, Mridula <Mridula.Mahadevan@ironmountain.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Analyze on temp table taking very long
Date: Tue, 22 Mar 2011 18:56:59 -0400
Message-ID: <9218.1300834619@sss.pgh.pa.us> (raw)
In-Reply-To: <300035A46398FC4D8251A684DE0416737D3B81F3@mvmexp01.tpt.imtn.com>
References: <300035A46398FC4D8251A684DE0416737D3B81F3@mvmexp01.tpt.imtn.com>

"Mahadevan, Mridula" <Mridula.Mahadevan@ironmountain.com> writes:
> This has been running fine for a while on multiple setups, large and small volumes. The setups all have the same hardware configuration.

> On one particular setup with about 200k records and this analyze runs for 45min and then times out(statement timeout is set to 45 min). typically this takes a few seconds at best. But when I move the analyze outside the loop everything runs fine.

Is it actually *running*, as in doing something, or is it just blocked?
I can't immediately think of any reason for some other process to have
a lock on a temp table that belongs to your process; but it seems
unlikely that ANALYZE would randomly take much longer than expected
unless something was preventing it from making progress.

Look into pg_locks and/or watch the backend with strace next time this
happens.

			regards, tom lane



view thread (3+ messages)  latest in thread

Message-ID: <9218.1300834619@sss.pgh.pa.us>
Permalink:  ../9218.1300834619@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9218.1300834619@sss.pgh.pa.us

 · 

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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Mridula.Mahadevan@ironmountain.com
  Subject: Re: Analyze on temp table taking very long
  In-Reply-To: <9218.1300834619@sss.pgh.pa.us>

* 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