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 1k5tAk-0001pI-3b for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2020 16:00:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k5tAi-0005ND-Uz for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2020 16:00:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5tAi-0005N6-La for pgsql-hackers@lists.postgresql.org; Wed, 12 Aug 2020 16:00:12 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k5tAg-0004Eu-6f for pgsql-hackers@lists.postgresql.org; Wed, 12 Aug 2020 16:00:11 +0000 Received: by mail-qt1-x844.google.com with SMTP id k18so1817998qtm.10 for ; Wed, 12 Aug 2020 09:00:10 -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=iFSc8pUD03vw6J/ZnWyJzH2/nSLQpK2Oi2jXLZDfHN4=; b=YTdqzl/meIHF2a0VmotNTELs8KV5+blOkhmocQAJq80QepcqXm51Q33LdTxsQ22iFE 9KLgYEzKEy2kwSY88nDU2yziCazkbyPyhcgArc5GArIRCz1C2COSoH8egUHxmmfb4WbC HIaQkeXdR1kBtQokrJHsDdHLgC2uyGUgzB5t7AjKdZdCFQvy+FAWIsdaR9U+/0D70+RA w1HjIkkMCMub9zPRvPQS8VLGwgww15B97yeVas4Ofu48DTbtnWMBDM5wFgwXGpv83CKJ sfXO8e9LfoYe6YI7go8kzMLDjFcO+p0LialxqiKnH+K4O0jW9sPkHGZko77Tz38szx7V v4nQ== 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=iFSc8pUD03vw6J/ZnWyJzH2/nSLQpK2Oi2jXLZDfHN4=; b=A4f5aFzEc1Nl6c91lqM6zksdTOWuPRHxOWk0bfgWvlO8EkX1vojb3UJ5Gfc7TXfG5O eIzjnuAatexsJ7TMN+dI/xOZs+lP922m/jfSHy32vWpY9hb7JQrTg4HgeF3nZFwXFpPN k8NBBlCMfLe5kjUJzXb+oQ9S2+x00nWkJvNtmQX+xbsQ8j5e7WE6H4IYk5Iv40SWZo+U OA9nPj6fCZV1Bv0AP0+nKFV2AC6wZZgPhGwttUs4eRoa5x/zcqd45yUOhZQmuNfj29NB rTCt3Cx3wuJUzFlUkgSPpcuL9orrZyIrvViJ4wsv2QvTZgsz783Vl+ySBTHoHHGJOd6l r5gQ== X-Gm-Message-State: AOAM532+sPbNcW78F9N8eId1Fo8LxeJUO3ZIcfypDRbmkeRarZ/THshS VjbYSkLHWCiI5PV/evbx5wMRIGTFzPw= X-Google-Smtp-Source: ABdhPJzQw5c8rWw4dmAuB/P7pGYO9YrxNHJTgz9Ijglkjx8sEiCXwzw7RuRAHKF6l1Y/hdhv/GB5kw== X-Received: by 2002:ac8:f73:: with SMTP id l48mr283732qtk.296.1597248008734; Wed, 12 Aug 2020 09:00:08 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id 15sm2493347qkm.112.2020.08.12.09.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2020 09:00:08 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 5DF7E2A1526; Wed, 12 Aug 2020 12:00:06 -0400 (-04) Date: Wed, 12 Aug 2020 12:00:06 -0400 From: Alvaro Herrera To: Peter Geoghegan Cc: Anastasia Lubennikova , PostgreSQL Hackers Subject: Re: [BUG] Error in BRIN summarization Message-ID: <20200812160006.GA24770@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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-Jul-28, Peter Geoghegan wrote: > On Mon, Jul 27, 2020 at 10:25 AM Alvaro Herrera > wrote: > > (I was also considering whether it needs to be a loop to reobtain root > > tuples, in case a concurrent transaction can create a new item while > > we're checking that item; but I don't think that can really happen for > > one individual tuple.) > > I wonder if something like that is the underlying problem in a recent > problem case involving a "REINDEX index > pg_class_tblspc_relfilenode_index" command that runs concurrently with > the regression tests: > > https://postgr.es/m/CAH2-WzmBxu4o=pMsniur+bwHqCGCmV_AOLkuK6BuU7ngA6evqw@mail.gmail.com > > We see a violation of the HOT invariant in this case, though only for > a system catalog index, and only in fairly particular circumstances > involving concurrency. Hmm. As far as I understand, the bug Anastasia reports can only hit an index build that occurs concurrently to heap updates; and that cannot happen for a regular index build, only for CREATE INDEX CONCURRENTLY and REINDEX CONCURRENTLY. So unless I miss something, it's not related to that other bug. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services