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 1mIP8R-0005QO-8n for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Aug 2021 05:38:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mIP8O-0008V3-Sm for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Aug 2021 05:38:04 +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 1mIP8O-0008Uo-Eb for pgsql-bugs@lists.postgresql.org; Tue, 24 Aug 2021 05:38:04 +0000 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mIP8J-0003XT-CR for pgsql-bugs@lists.postgresql.org; Tue, 24 Aug 2021 05:38:03 +0000 Received: by mail-qk1-x72b.google.com with SMTP id m21so21845520qkm.13 for ; Mon, 23 Aug 2021 22:37:59 -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:content-transfer-encoding:in-reply-to :user-agent; bh=25zhMvaGS1s4rRFAxIKIP5lZZ5KCYlYcVzAFosY82tU=; b=CUc6j72rgpGTSKPkDJyz32mz/MlZs2BJK94+M7vLGIsnkRwH3DayxZCagz56DYqya1 TpDS46bqOd80mJh0Gq66pUJ0zr7kUua2TV0xzTirPCk3GnulOXdhDOGKo/bkT6Wmx/Vc ybTlkl6H14hNhA9ocLsGshdt9ME4LuMIXLxFk= 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:content-transfer-encoding :in-reply-to:user-agent; bh=25zhMvaGS1s4rRFAxIKIP5lZZ5KCYlYcVzAFosY82tU=; b=PqzrU58xdc+dHdH4iIs+3vCCRFbqtbEMGoZKBbpVo/RXzDLXB/Zy8VbLFXiYXeNqRH uY3aDjHIseh8yLLW8iNfbHc3goT0HXX/8KT3RSNmECUSbexvUwRoxhC3J7N7/q2pEI36 NS6u1Vfze79qemLtWNJuVpFJeIv6j7DSDzUMuEJELfnu3B5r6fTKA1VjFomwc+6M/nm8 R/btj5adjNGZSXgGKZ+bNPERZDMo292p1g4a4qmf50hzx464LpV7nkZlRaW84zcJi6M3 ElnVyZ9kQZ8+3uRV/k9tCLI4Nyq+GozKECqNFmgLa+iPh1pk+UHna8GbW/B7StylEaQT 5y4Q== X-Gm-Message-State: AOAM530qZgbrU3HGOIQ4pLTxv+cxAtimqnofgM+UJ9W1OBYz7NvcZVAo wS51inh+A/31CguJadhKJWVhKg== X-Google-Smtp-Source: ABdhPJyeHANrLeJySj406HC52I37GTsxIEtEvbtXyoLRKo/Sbf3x/RvI1LLP55S8wx8DoI8tYga5PA== X-Received: by 2002:a05:620a:2544:: with SMTP id s4mr5882568qko.219.1629783477566; Mon, 23 Aug 2021 22:37:57 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::46]) by smtp.gmail.com with ESMTPSA id e10sm10316422qkg.18.2021.08.23.22.37.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Aug 2021 22:37:56 -0700 (PDT) Date: Mon, 23 Aug 2021 22:37:53 -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: <20210824053753.GA1887090@rfd.leadboat.com> References: <20210807221957.GA169359@rfd.leadboat.com> <5E041A70-4946-489C-9B6D-764DF627A92D@yandex-team.ru> <20210808163752.GB23176@rfd.leadboat.com> <20210814221328.GA146778@rfd.leadboat.com> <20210815084535.GA1227376@rfd.leadboat.com> <20210816051317.GA1409586@rfd.leadboat.com> <4A911574-5F35-4AED-BD88-8214C081CF71@yandex-team.ru> <5F423E04-BDAE-42AC-9CEF-1E37F6F345DF@yandex-team.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Mon, Aug 23, 2021 at 10:38:00PM +0500, Andrey Borodin wrote: > > 22 авг. 2021 г., в 22:42, Andrey Borodin написал(а): > > Currently when testing combination of all fixes I observe things like > > 'error running SQL: 'psql::1: ERROR: prepared transaction with identifier "a" is busy'' > > Looks like kind of race condition in tests. > > There was a race condition in deterministic 2PC test. Fixed with synchronisation points. > PFA patches that work on my machines. > I'm going to start fixing review notes if it will not break until tomorrow. That is great news. > BTW are subtransaction anything special wrt CIC? is it worth to sprinkle some SAVEPOINTs here and there, just to be sure? Not especially. The AssignTransactionId() "Ensure parent(s) have XIDs" behavior may be important to CIC. In the test pgbench runs for scripts 002_pgbench_concurrent_2pc and 002_pgbench_concurrent_transaction, it likely wouldn't hurt to pass two equal-weight test scripts, one of which uses savepoints.