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 1mFBm6-0003Go-NO for pgsql-bugs@arkaria.postgresql.org; Sun, 15 Aug 2021 08:45:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mFBm3-00010y-Hw for pgsql-bugs@arkaria.postgresql.org; Sun, 15 Aug 2021 08:45:43 +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 1mFBm3-00010k-4Q for pgsql-bugs@lists.postgresql.org; Sun, 15 Aug 2021 08:45:43 +0000 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mFBm0-00051z-Hs for pgsql-bugs@lists.postgresql.org; Sun, 15 Aug 2021 08:45:41 +0000 Received: by mail-qk1-x729.google.com with SMTP id t66so15926586qkb.0 for ; Sun, 15 Aug 2021 01:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=spuQD30Wer4hPoH8hkCVNEAMNm+atUSmNYCi3OaCa9w=; b=HTF5KkX+1hrCL5Hmphei/4ISKKGtDXvyjbK5J5fcbysOmJK1twxt/xxb7MkJ5zpugu Vi373+L//HKjNyRfHHmcrNIQRGP3/EIM66xkoXR19OY4XX6IKlvn1nOZaOoA08fcg3dX GXpptH1chX3FPnbMRUHmBqSLQ8D771KCV6Z2c= 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=spuQD30Wer4hPoH8hkCVNEAMNm+atUSmNYCi3OaCa9w=; b=kYA54QgF/we19Eh1/7yqgaFRO92dWR7n95RPqJBqRwf6XSZCCsU1c55P7m3kPLBDCs ymQPI97KkA6Ru6AaFdT0LTu4wRy58Wpcd30vSg7xbPKaaYtQdbp93jtWoWhDTH6Yw4jZ lZ/k4l4lvoJAbU47+d0RWaOjGJJ2uVNTbYfHUW32cYZPPgBPTiRFYmERL6r/3J6aTLPa MO4VSMnGIsZ6s0AwqigFPSfVe8bOUwwdDmHPYPRqCVXpl/nApD54FYjEAvrWmnLyiIev N+Lkr+6LFgF0zMXsxmjW785SYdp4c41mNNxu04gn/ZMj26uuvNdBN3uw51H/UDHDEi+u //eg== X-Gm-Message-State: AOAM530B5hzpyk+2bGybtE4dmlaWTfrMcl4AU/CgafDnafQSv3WKBhJC /WBus1c8K2OakwfSLFdiYY4zeg== X-Google-Smtp-Source: ABdhPJz3aWin9r9NuHtvH5ui0QeG3uUQIbxANTdZg/MYH1qV1ausoJL4E6r+QzWg0D1pjeqxg/hEsQ== X-Received: by 2002:a05:620a:2101:: with SMTP id l1mr10314768qkl.104.1629017139624; Sun, 15 Aug 2021 01:45:39 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::46]) by smtp.gmail.com with ESMTPSA id r19sm2837606qtt.86.2021.08.15.01.45.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Aug 2021 01:45:38 -0700 (PDT) Date: Sun, 15 Aug 2021 01:45:35 -0700 From: Noah Misch To: Andrey Borodin Cc: PostgreSQL mailing lists , Michael Paquier , Tom Lane , Peter Geoghegan Subject: Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data Message-ID: <20210815084535.GA1227376@rfd.leadboat.com> References: <20210730184126.GA2018234@gust.leadboat.com> <85D32B53-FB25-4F2F-A253-0D7B26F72881@yandex-team.ru> <341252AE-B633-471E-9FF4-B09FC5D036E2@yandex-team.ru> <20210807221957.GA169359@rfd.leadboat.com> <5E041A70-4946-489C-9B6D-764DF627A92D@yandex-team.ru> <20210808163752.GB23176@rfd.leadboat.com> <20210814221328.GA146778@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210814221328.GA146778@rfd.leadboat.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Aug 14, 2021 at 03:13:28PM -0700, Noah Misch wrote: > On Sun, Aug 08, 2021 at 09:37:52AM -0700, Noah Misch wrote: > > On Sun, Aug 08, 2021 at 04:31:07PM +0500, Andrey Borodin wrote: > > > Step 1. Test for CIC with regular transactions. > > > Step 2. Fix > > > Step 3. Test for CIC with 2PC > > > Step 4. Part of the fix that I'm sure about > > > Step 5. Dubious part of fix... > > When I applied all five to commit b33259e^ (shortly before the PostgresNode > compatibility break) and ran your tests in a loop, I got more 2PC "lacks > matching index tuple" within one minute. Here's how I ran the tests: > > make -j20 && while make -C contrib/amcheck check REGRESS= PROVE_FLAGS=--timer PROVE_TESTS='t/002_cic.pl t/003_cic_2pc.pl' NO_TEMP_INSTALL=1; do date; done > > Do you see failures with that loop? If so, can you diagnose them? See below. > (So far, I've not seen a failure from the 1PC test.) I eventually did see one. Just one 1PC failure in six hours of 1PC test runtime, though. > On Thu, Jul 29, 2021 at 10:25:48PM -0400, Noah Misch wrote: > > I haven't checked whether other inval message types have the same hazard. > > I will look into this next. (It probably doesn't explain 2PC failures.) Now that I've looked, other inval hazards might indeed explain the remaining 2PC and 1PC failures. I'll plug those holes and see what failures, if any, continue to happen.