Re: Analyse - max_locks_per_transaction - why? - Mailing list pgsql-general

From Phil Endecott
Subject Re: Analyse - max_locks_per_transaction - why?
Date
Msg-id 41939870.3060507@chezphil.org
Whole thread Raw
In response to Re: Analyse - max_locks_per_transaction - why?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Analyse - max_locks_per_transaction - why?
List pgsql-general
I asked:

>>Naively I imagined that ANALYSE looks at each table in turn,
>>independently.  So why does it need more locks when there are more
>>tables?

Tom replied:

> 7.4 runs a database-wide ANALYZE as a single transaction, so the locks
> accumulate.  This was recognized to be a bad idea :-(.  8.0 is a bit
> smarter.

Thanks Tom.  I will upgrade to 8.0 one day but not soon.  In the
meantime, is there a way to judge a suficient setting for
max_locks_per_transaction so that a global ANALYZE will work?  It
doesn't seem to be one lock per table or anything as simple as that.

 > The best bet in 7.4 is probably to use VACUUM ANALYZE rather than
 > analyzing separately.  That will force it to use a transaction per
 > table.

That's another possibility.

Thanks.

--Phil.


pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Can't insert date in field with foreign key
Next
From: "Net Virtual Mailing Lists"
Date:
Subject: Re: Important Info on comp.databases.postgresql.general