Re: Autovacuum of pg_database - Mailing list pgsql-admin

From Tom Lane
Subject Re: Autovacuum of pg_database
Date
Msg-id 5087.1462551227@sss.pgh.pa.us
Whole thread Raw
In response to Re: Autovacuum of pg_database  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Autovacuum of pg_database
List pgsql-admin
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Tom Lane wrote:
>> I think it's pretty obvious: autovacuum.c's rule for detecting whether
>> some other worker is already processing table X is wrong when X is a
>> shared table.  I propose the attached patch.

> Hmm, I have pretty much the same patch, except I added the flag to
> struct autovac_table and have it populated by table_recheck_autovac.
> Haven't tested this yet, which is why I hadn't posted it.

Actually, I realized after looking at it that the new wi_tableshared
field is unnecessary in my patch.  The only important part is that
knowledge of relisshared be available when we're looking for conflicting
workers, and that is entirely local in do_autovacuum().  I'd started the
patch by adding wi_tableshared, on the expectation that it would be
necessary, but it ain't ...

            regards, tom lane


pgsql-admin by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Autovacuum of pg_database
Next
From: Alvaro Herrera
Date:
Subject: Re: Autovacuum of pg_database