Re: lazy vacuum blocks analyze - Mailing list pgsql-hackers

From Tom Lane
Subject Re: lazy vacuum blocks analyze
Date
Msg-id 24258.1241637375@sss.pgh.pa.us
Whole thread Raw
In response to lazy vacuum blocks analyze  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
List pgsql-hackers
Zdenek Kotala <Zdenek.Kotala@Sun.COM> writes:
> 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.

We would have to invent another lock type just for ANALYZE.  It does not
seem worth it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Patch to fix search_path defencies with pg_bench
Next
From: Tom Lane
Date:
Subject: Re: Patch to fix search_path defencies with pg_bench