Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jHCOW-0000Dl-45 for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2020 20:12:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jHCOU-0007Ss-Tk for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2020 20:12:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jHCOU-0007Sl-Br for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2020 20:12:54 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jHCOS-0002f1-1m for pgsql-hackers@postgresql.org; Wed, 25 Mar 2020 20:12:53 +0000 Received: by mail-qk1-x741.google.com with SMTP id i6so4086935qke.1 for ; Wed, 25 Mar 2020 13:12:51 -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=xE5Yu7wH/XSUbFWxTFLqpsF8xYNZ6shYPK3lm3kBex4=; b=KazwZdvUTYzordzwvS+4GlQSnVxgbVz8TcTHvKpTYS0+F74i1OIwEf6VZkkkIGP6ak 6D/yeOJkBKM+NgOCH8qlNDKmXvzS0iTVTvEG/oai5ymKRt5J4i0N9vGhJtMb9VRuPzho 3ylj864WWSA9LkkiRYVDW/A3souMQIM8Qpe1OGggBow3WafKlBNcdv11rFKiO2a8zLS/ C+O+Vix3eWrZDPSjKFVrljfLUvGzATH7Wll/1TM2mth5FA3vKCUpnWvIhAcnfVbgog2O FZMSwneZ6PACOD+p/bj7h8Mp0r216DFLKnFapHaYXRGH7HW39gL1NfsfujOnMiIyssvw T/gg== 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=xE5Yu7wH/XSUbFWxTFLqpsF8xYNZ6shYPK3lm3kBex4=; b=DmiLNYiG4/DDMP12ZlGkEJq0FIQo1DTS85XS8v2A9HL0OYkEI/JbAZiJh2Fngu5gws npACXrlCH/0YQ5064/rSKiL6WvOEJFdaz7bMPNifb04xiBOTfRP+oacyPi5TXBcpz6H3 FoCabygIbn78uZfGLh8X/UtD3kxLJC0XGk1DRZB49miE4AFCVTd84jsGNautntZzzCnn ZNplUZdo4Yv/7Zq8pSYP/r4pGxQ2kQWT4d11Zwe1YY2zUvmBAVjbn2ljcP1bzOrWLziX Qm7w2DU7EiA8nS+OZAVWAb7jy7Hp3oxMlMaU5NK6kVQMHp5NrcPD9QCiWsbWwagu4Rze Y+uQ== X-Gm-Message-State: ANhLgQ1GIRAawU2pC0nWjDY4e6NtovLz4O9VVNpXX4HKKurHgDdoSJlE sW3Tf3NgSWExMgzb2i4sFZxsAQ== X-Google-Smtp-Source: ADFU+vuIQHBzN+sNxvcALlEvLs34g670gSGjcdCywVB0pd7QPCi0NVpBXZeqayyUlcw98cpWl0QDHw== X-Received: by 2002:a37:5d8:: with SMTP id 207mr4771600qkf.80.1585167171123; Wed, 25 Mar 2020 13:12:51 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id s11sm13679qtj.65.2020.03.25.13.12.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 13:12:50 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 8827E3008CD; Wed, 25 Mar 2020 17:12:48 -0300 (-03) Date: Wed, 25 Mar 2020 17:12:48 -0300 From: Alvaro Herrera To: Andres Freund Cc: James Coleman , pgsql-hackers Subject: Re: [DOC] Document concurrent index builds waiting on each other Message-ID: <20200325201248.GA11538@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200325195841.gq4hpl25t6pxv3gl@alap3.anarazel.de> 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-Mar-25, Andres Freund wrote: > > I don't know if my approach is exactly what Andres has in mind > > Not quite. I don't think it's generally correct for CIC to set > PROC_IN_VACUUM. I'm doubtful it's the case even just for plain indexes - > we don't want rows to be pruned away from under us. I also think we'd > want to set such a flag during all of the CIC phases? > > What I was thinking of was a new flag, with a distinct value from > PROC_IN_VACUUM. It'd currently just be specified in the > GetCurrentVirtualXIDs() calls in WaitForOlderSnapshots(). That'd avoid > needing to wait for other CICs on different relations. Since CIC is not > permitted on system tables, and CIC doesn't do DML on normal tables, it > seems fairly obviously correct to exclude other CICs. Hmm, that sounds more promising. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services