Re: Analyse - max_locks_per_transaction - why?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Phil Endecott <spam_from_postgresql_general(at)chezphil(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Analyse - max_locks_per_transaction - why?
Date: 2004-11-10 17:46:29
Message-ID: 14022.1100108789@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Phil Endecott <spam_from_postgresql_general(at)chezphil(dot)org> writes:
> Naively I imagined that ANALYSE looks at each table in turn,
> independently. So why does it need more locks when there are more
> tables?

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.

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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Goutam Paruchuri 2004-11-10 18:12:11 Re: Error connecting using pgadmin from different computer
Previous Message Oleg Lebedev 2004-11-10 17:37:16 Re: Modifying FK constraints