Re: 8.4 -> 9.1 : ANALYSE VERBOSE; -> out of shared memory - Mailing list pgsql-general

From Tom Lane
Subject Re: 8.4 -> 9.1 : ANALYSE VERBOSE; -> out of shared memory
Date
Msg-id 21659.1399904656@sss.pgh.pa.us
Whole thread Raw
In response to Re: 8.4 -> 9.1 : ANALYSE VERBOSE; -> out of shared memory  (Souquieres Adam <adam.souquieres@axege.com>)
Responses Re: 8.4 -> 9.1 : ANALYSE VERBOSE; -> out of shared memory
List pgsql-general
Souquieres Adam <adam.souquieres@axege.com> writes:
> When i relaunch my ANALYSE VERBOSE, pg_locks table grows quickly from 20
> lines to more than 1000 lines and still growing, all the lines are owned
> by the same "virtual transaction" and the same "pid".

Hm.  I experimented a bit and looked at the code, and I find I was not
remembering ANALYZE's behavior exactly right: it only processes all the
tables inside one transaction if you start it inside a transaction block
(ie, after BEGIN, or inside a function).  If you just run it by itself
then it does a transaction per table, just like VACUUM.  So I'm thinking
there's something you're not telling us about exactly how you invoke
ANALYZE.

> When i finish to write this email, i juste hit more than 3200 lock owned
> by the same transaction !

Could you show us some of those locks (a few dozen lines from pg_locks)?

            regards, tom lane


pgsql-general by date:

Previous
From: Souquieres Adam
Date:
Subject: Re: 8.4 -> 9.1 : ANALYSE VERBOSE; -> out of shared memory
Next
From: Souquieres Adam
Date:
Subject: Re: 8.4 -> 9.1 : ANALYSE VERBOSE; -> out of shared memory