Re: [HACKERS] Autovacuum improvements - Mailing list pgsql-patches

From Matthew T. O'Connor
Subject Re: [HACKERS] Autovacuum improvements
Date
Msg-id 45AC3A11.3050602@zeut.net
Whole thread Raw
In response to Re: [HACKERS] Autovacuum improvements  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: [HACKERS] Autovacuum improvements  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Alvaro Herrera wrote:
> Alvaro Herrera wrote:
> New version of the patch attached.
>
> I'll probably apply this tomorrow morning unless there are objections.
>
> An important difference from the previous patch is that
> DatabaseHasActiveBackends (now renamed to
> DatabaseCancelAutovacuumActivity) cycles through the whole ProcArray
> instead of stopping at the first occurence of a backend in that
> database.  This is to be able to fulfill its mission of cancelling *any*
> autovacuum activity that may be taking place on the database (not just
> the one that happens to be below the first process in the ProcArray).

Is there any chance of a race condition here?  That is, can the launcher
process start a new autovacuum process against that database that your
code will miss since it was started after you began your search?


pgsql-patches by date:

Previous
From: "Takayuki Tsunakawa"
Date:
Subject: Re: O_DIRECT support for Windows
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Autovacuum improvements