Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5tCQ-0001xL-76 for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2020 16:01:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k5tCP-0001n7-6L for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2020 16:01:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5tCO-0001lM-VX for pgsql-hackers@lists.postgresql.org; Wed, 12 Aug 2020 16:01:56 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k5tCM-0002uP-En for pgsql-hackers@lists.postgresql.org; Wed, 12 Aug 2020 16:01:56 +0000 Received: by mail-qt1-x841.google.com with SMTP id w9so1836597qts.6 for ; Wed, 12 Aug 2020 09:01:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=qW3u0ElAPcqZ3ZR+QZB99M77NUYmT0u0wjnwoCmbckw=; b=ISYxRBOiKxINNMrTwceGFCTVWYS8RZcya75SYp8aHNhVc76p471lSUZV5WF18KEcC9 kq15trNdkbDXabrn2ZpDT+puDuKiUCUwioDmqmTNLuKfxE/KYUZudN9PyGiEHWbTwJ/+ K8k0w8JvOtcQtusUJUBxAQCnBnDnE03F/MgNXKRKnah1wD4azce1ZgnTYDnsY5CKe7fn dxWlhDpaEtQ0MnyvwaujD4ORzV3lmb5JQnPtdkk2FeNzCJtPHINKPpbz8pTzqlFkQbaz TBN6sExOPFSEou2kr/ZLlsmLOdAedeMfuyE54uD//7Nj+gqSuJWX6OntV4EbFGzp89NY ZtPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=qW3u0ElAPcqZ3ZR+QZB99M77NUYmT0u0wjnwoCmbckw=; b=oKQaaG+t4QJT1T4KZ+NxgmfG7wNoN8VhexeF97Q6+DbwsA7+0A/onqJZoC/tkocNEV Njug5cxqF32UStIYxe2GFcpHyjR1OBaz0RDBuoBZcmPtZbvt6KWWB2nWqa7XbtkgD7WG V3G+dw/E1YgfJtJkpNQXCQb3C5t8OZATkAbx6m6KaUdGPyvUWnidX0NHdNZEb+SLh7SQ 2Q9ZgBnggjJdlQv3coIDZ2BD5ul02PN+BquP7ypbKJwNlCDFn2QanmXxE2LqfIk4SF/u oJI3fd0D8hgtPufNXZGKUSHAWscgQlVhUtccJGDKXp042nvQUHbxRVQ3W6mCoBRS1CFe ENWw== X-Gm-Message-State: AOAM532e+LPANZPads3CjCRYQAmI/cUTaHKBRrM8JJ3ClDqqCgqz5Bo/ z27DXu3J4ErHR62RJaOuEDXTxcUeiyjlBtVOQSGXYSn6LkRhOxVHCSj5S67eyiJF7DwbOeVqQeZ b3+LB0Pb8k2Os3mVTR0XD4lVDjIlsIAnc8veB69uYBLyP54HRZdOBLKZICSqRcGbCOOIdMeSW/R ITt3JzKJsd+WqgKw== X-Google-Smtp-Source: ABdhPJxrMECSNufZT5JIRx+ucXYGWFEXHso01r7M+cr5urgA+pjTnf0HiIjomBWUtjWNbwTdfVZ7mQ== X-Received: by 2002:ac8:4e91:: with SMTP id 17mr303538qtp.284.1597248111995; Wed, 12 Aug 2020 09:01:51 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id t12sm2563800qkt.56.2020.08.12.09.01.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2020 09:01:51 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 935262A1526; Wed, 12 Aug 2020 12:01:49 -0400 (-04) Date: Wed, 12 Aug 2020 12:01:49 -0400 From: Alvaro Herrera To: Anastasia Lubennikova Cc: PostgreSQL Hackers Subject: Re: [BUG] Error in BRIN summarization Message-ID: <20200812160149.GA24920@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200812001952.GA2341@alvherre.pgsql> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Aug-11, Alvaro Herrera wrote: > I think this is more complicated than necessary. It seems easier to > solve this problem by just checking whether the given root pointer is > set to InvalidOffsetNumber, which is already done in the existing coding > of heap_get_root_tuples (only they spell it "0" rather than > InvalidOffsetNumber, which I propose to change). AFAIR this should only > happen in the 'anyvisible' mode, so I added that in an assert. 'anyvisible' mode is not required AFAICS; reading the code, I think this could also hit REINDEX CONCURRENTLY and CREATE INDEX CONCURRENTLY, which do not use that flag. I didn't try to reproduce it there, though. Anyway, I'm going to remove that Assert() I added. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services