Re: Analyze on temp table taking very long - Mailing list pgsql-performance

From Tom Lane
Subject Re: Analyze on temp table taking very long
Date
Msg-id 9218.1300834619@sss.pgh.pa.us
Whole thread Raw
In response to Analyze on temp table taking very long  ("Mahadevan, Mridula" <Mridula.Mahadevan@ironmountain.com>)
Responses Re: Analyze on temp table taking very long  ("Mahadevan, Mridula" <Mridula.Mahadevan@ironmountain.com>)
List pgsql-performance
"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
hardwareconfiguration. 

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

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

pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Performance on AIX
Next
From: felix
Date:
Subject: good old VACUUM FULL