Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ajUw8-0005aG-EY for pgsql-bugs@arkaria.postgresql.org; Fri, 25 Mar 2016 16:50:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ajUw8-0001sJ-1F for pgsql-bugs@arkaria.postgresql.org; Fri, 25 Mar 2016 16:50:12 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ajUvU-00019b-Kf for pgsql-bugs@postgresql.org; Fri, 25 Mar 2016 16:49:32 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ajUvR-0006ZW-S2 for pgsql-bugs@postgresql.org; Fri, 25 Mar 2016 16:49:31 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id B7C1E20712 for ; Fri, 25 Mar 2016 12:49:28 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Fri, 25 Mar 2016 12:49:28 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=HfzXYdExw0djsxfD8R3aZeIPmaU=; b=M/rWK uL+t43ZmRaDSiuZfpkH/6vAHXkaTiRSf8RpQb9dr+g7wlE3lPskWA21dB4tTZG3S 1c271nt/XOieYMAtja9x/00gU3qILeatxRtp73LKAEwYff1z7WVBeMbGYABuGi49 hYYFl7U/O9yOfMeDzbC5pPB1ATYe76JZjw2GwE= X-Sasl-enc: PX+ImDTiRe+fKqJp5Nr/NqcxPu+MzUyvf230/6Oom9Ie 1458924568 Received: from intern.anarazel.de (pd9f6a955.dip0.t-ipconnect.de [217.246.169.85]) by mail.messagingengine.com (Postfix) with ESMTPA id 64E516801E0; Fri, 25 Mar 2016 12:49:28 -0400 (EDT) Date: Fri, 25 Mar 2016 17:49:27 +0100 From: Andres Freund To: Robert Haas Cc: Michael Paquier , Haribabu Kommi , Thom Brown , pgsql-bugs , Fabien COELHO Subject: Re: Breakage with VACUUM ANALYSE + partitions Message-ID: <20160325164927.c522xd7nw2a74yu5@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2016-03-25 12:02:05 -0400, Robert Haas wrote: > On Fri, Mar 25, 2016 at 8:41 AM, Michael Paquier > wrote: > > On Thu, Mar 24, 2016 at 9:40 PM, Robert Haas wrote: > >> On Thu, Mar 24, 2016 at 12:59 AM, Haribabu Kommi > >> wrote: > >>> So further operations on the table uses the already constructed smgr relation > >>> and treats that there are RELSEG_SIZE number of blocks in the page and try > >>> to do the scan. But there are 0 pages in the table thus it produces the error. > >>> > >>> The issue doesn't occur from another session. Because of this reason only > >>> if we do only vacuum operation, the error not occurred. > >> > >> Yeah, I had a suspicion that this might have to do with invalidation > >> messages based on Thom's description, but I think we still need to > >> track down which commit is at fault. > > > > I could reproduce the failure on Linux, not on OSX, and bisecting the > > failure, the first bad commit is this one: > > commit: 428b1d6b29ca599c5700d4bc4f4ce4c5880369bf > > author: Andres Freund > > date: Thu, 10 Mar 2016 17:04:34 -0800 > > Allow to trigger kernel writeback after a configurable number of writes. > > > > The failure is a little bit sporadic, based on my tests 1/2 runs out > > of 10 could pass, so one good commit was recognized as such after > > passing the SQL sequence sent by Thom 5 times in a row. I also did > > some manual tests and those are pointing to this commit as well. > > > > I am adding Fabien and Andres in CC for some feedback. > > Gosh, that's surprising. I wonder if that just revealed an underlying > issue rather than creating it. I think that might be the case, but I'm not entirely sure yet. It appears to me that the current backend - others don't show the problem - still has the first segment of pgbench_accounts open (in the md.c mdfdvec sense); likely because there were remaining flush requests. Thus, when mdnblocks is called to get the size of the relation we return the size of the first segment (131072) plus the size of the second segment (0, doesn't exist). That then leads to this error. I don't really understand yet how the "open segment" thing happens. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs