lazy vacuum blocks analyze

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: lazy vacuum blocks analyze
Date: 2009-05-06 18:58:57
Message-ID: 1241636337.1393.25.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

My colleague hit interesting problem. His transaction hanged for a
several days (PG8.3). We found that transaction (ANALYZE) command)
waited on relation lock which had been acquired by lazy vacuum.
Unfortunately, lazy vacuum on large table (38GB) takes veeeery long time
- several days.

The problem is that vacuum and analyze use same lock. If I understood
correctly comment in analyze_rel() function it is not necessary.

I think that it is very serious issue and dead space map does not help
much in this case, because affected table is heavily modified.

If there is not another problem I suggest to use two different locks for
vacuum and analyze.

Zdenek

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-05-06 19:11:56 Re: lazy vacuum blocks analyze
Previous Message Dickson S. Guedes 2009-05-06 18:53:10 Re: Patch to fix search_path defencies with pg_bench