Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 307F41337BDE for ; Tue, 8 Mar 2011 15:00:35 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 91349-05 for ; Tue, 8 Mar 2011 19:00:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og105.obsmtp.com (exprod7og105.obsmtp.com [64.18.2.163]) by mail.postgresql.org (Postfix) with ESMTP id F0B511337BDB for ; Tue, 8 Mar 2011 15:00:24 -0400 (AST) Received: from source ([209.85.215.174]) (using TLSv1) by exprod7ob105.postini.com ([64.18.6.12]) with SMTP ID DSNKTXZ8x10tS1EKwlyepGlRFZp2vjFoELlQ@postini.com; Tue, 08 Mar 2011 11:00:25 PST Received: by mail-ey0-f174.google.com with SMTP id 24so2322612eyx.33 for ; Tue, 08 Mar 2011 11:00:23 -0800 (PST) Received: by 10.213.28.3 with SMTP id k3mr3891564ebc.64.1299610822614; Tue, 08 Mar 2011 11:00:22 -0800 (PST) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id t5sm891910eeh.8.2011.03.08.11.00.20 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 11:00:21 -0800 (PST) Message-ID: <4D767CBE.4030904@enterprisedb.com> Date: Tue, 08 Mar 2011 21:00:14 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 MIME-Version: 1.0 To: daveg CC: PostgreSQL-development , Greg Stark , Maxim Boguk , bricklen@gmail.com Subject: Re: Re: PD_ALL_VISIBLE flag was incorrectly set happend during repeatable vacuum References: <20110303071208.GA4053@sonic.net> <4D6F4E5D.6080507@enterprisedb.com> <20110304090031.GE4053@sonic.net> <4D710ABD.5090103@enterprisedb.com> <20110307235340.GA21941@sonic.net> <4D75E201.20402@enterprisedb.com> <4D75EAC4.7090008@enterprisedb.com> <20110308084956.GE21941@sonic.net> In-Reply-To: <20110308084956.GE21941@sonic.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.2 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201103/569 X-Sequence-Number: 183819 On 08.03.2011 10:49, daveg wrote: > On Tue, Mar 08, 2011 at 10:37:24AM +0200, Heikki Linnakangas wrote: >> On 08.03.2011 10:00, Heikki Linnakangas wrote: >>> Another idea is to give up on the warning when it appears that >>> oldestxmin has moved backwards, and assume that it's actually fine. We >>> could still warn in other cases where the flag appears to be incorrectly >>> set, like if there is a deleted tuple on the page. >> >> This is probably a better idea at least in back-branches. It also >> handles the case of twiddling vacuum_defer_cleanup_age, which tracking >> two xmins per transactions would not handle. >> >> Here's a patch. I also changed the warning per Robert's suggestion. >> Anyone see a hole in this? > > It would be helpful to have the dbname and schema in the message in addition > to the relname. I added those to the original diagnostic patch as it was not > clear that the messages were all related to the same page/table/dg. Hmm, we don't usually include database name and schema in messages like this. There's a couple of other warnings in vacuum, too, that only print the table name. I have to admit that the database name was crucial in tracking this down, but in hindsight you could've added database name to log_line_prefix for the same effect. If you have several databases with same schema, that's a good idea anyway. So in the end, I decided not to include it. > Also, in your comment you might mention that multiple databases are one way > we could see oldestxmin move backwards. Ok, I added a comment to GetOldestXmin() explaining that. Committed. Thanks David for your help in debugging this! And thanks to everyone else for helping out too. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com