Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayiPi-0003aW-RA for pgsql-admin@arkaria.postgresql.org; Fri, 06 May 2016 16:15:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ayiPi-0008UN-EA for pgsql-admin@arkaria.postgresql.org; Fri, 06 May 2016 16:15:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ayiO2-0006Tu-7a for pgsql-admin@postgresql.org; Fri, 06 May 2016 16:13:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ayiNz-0005jz-Le for pgsql-admin@postgresql.org; Fri, 06 May 2016 16:13:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u46GDlgH005088; Fri, 6 May 2016 12:13:47 -0400 From: Tom Lane To: Alvaro Herrera cc: =?utf-8?B?T25kxZllaiBTdsSbdGzDrWs=?= , pgsql-admin@postgresql.org Subject: Re: Autovacuum of pg_database In-reply-to: <20160506160547.GA212152@alvherre.pgsql> References: <20160506160547.GA212152@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 06 May 2016 13:05:47 -0300" Date: Fri, 06 May 2016 12:13:47 -0400 Message-ID: <5087.1462551227@sss.pgh.pa.us> X-Pg-Spam-Score: -4.0 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Alvaro Herrera 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 -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin