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 1ka0op-0000xU-Tm for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Nov 2020 18:14: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 1ka0oo-0006nv-Qs for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Nov 2020 18:14:06 +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 <9erthalion6@gmail.com>) id 1ka0oo-0006no-H8 for pgsql-hackers@lists.postgresql.org; Tue, 03 Nov 2020 18:14:06 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <9erthalion6@gmail.com>) id 1ka0om-0005my-DE for pgsql-hackers@lists.postgresql.org; Tue, 03 Nov 2020 18:14:05 +0000 Received: by mail-wr1-x42e.google.com with SMTP id w1so19544127wrm.4 for ; Tue, 03 Nov 2020 10:14:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=lLYhZInPO5SuskTkuxiPjn2qhhIM3uC3l5+9p7Npl0o=; b=htisQ4hqL0BS7RDUaULxNy9PSF7mcq+V9+ZvoIYtrbmKUIcb9rTMhXMEdo0kXw2/ep FftaCZP1Wfo5P9Ljek1bEANCuiQOFg+2LKXlvVXYJBM/f+0Anqt2618bSlsMOA2JMG1K 8roF6l7337xcV5ljGda+wO41inEojCOzGUMFngA7mNhL4sLXOImMCaCZXC9RZw49PtDD FcgJuoGOueZ+1N7dcK554S2q5lU1D1mMYq9nUs6pN/Wn2xMSAbsiekV9iA3Nt+lastNM EIRk7S0AN4ytUCgd3parSDCDKj9/R00l51Q/BB5yFNZ3d0EXiscRUlbLjxNH/0mLhFL+ FIqg== 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; bh=lLYhZInPO5SuskTkuxiPjn2qhhIM3uC3l5+9p7Npl0o=; b=Ty8+Bjron/uyyJ8e6831yOfNwEQPytzBRKM9A/pEabNyFRyUl0XdohnxLf2PQ9RYL0 1o8Gq1zFwIJGKoq68OWKGo8vmNc9g3yDzrKZ2FjqYLv3ZSTmEE/wu2ILASNu20m+3Lfm ReCZFCq3CQSQYg+U2Ar+JQUivTQiXdkarWsbopxkQJeXyexc+LPYBCaTbbKFRhlfOrtK S7dUcBIgNi7HTRBaSYY1rDXLeKoGcx1r4BVFLztilWsFHTK3nUvb7C0wRhEWC2pwh6vE vzo3JORzijKCt85YHRfuauArHj2EWqqPHLH39C7HlsXn/k/DrZIQHs5VRq5vLi8NjBTj amRw== X-Gm-Message-State: AOAM531/uJbxIYv5KZAtl9AaKsYjnNWxZ2igV7ngV7nXW75ZlaS35hle Y1NQZaAyk/OT2Eo5i9bE/9U= X-Google-Smtp-Source: ABdhPJwRwBYbIw15J0MrtOsAzMIujjzzINkxJm/Rh629Z3r5bxOb794jsv8XOa4N7j4LTiYo4EhUBw== X-Received: by 2002:a5d:60c4:: with SMTP id x4mr29322436wrt.175.1604427242491; Tue, 03 Nov 2020 10:14:02 -0800 (PST) Received: from localhost (dslb-178-005-232-008.178.005.pools.vodafone-ip.de. [178.5.232.8]) by smtp.gmail.com with ESMTPSA id m12sm25583910wrs.92.2020.11.03.10.14.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Nov 2020 10:14:01 -0800 (PST) Date: Tue, 3 Nov 2020 19:14:47 +0100 From: Dmitry Dolgov <9erthalion6@gmail.com> To: Michael Paquier Cc: Alvaro Herrera , James Coleman , Tom Lane , Pg Hackers Subject: Re: remove spurious CREATE INDEX CONCURRENTLY wait Message-ID: <20201103181447.54ctwnfdt5wztbqn@localhost> References: <20200819181646.GA1559@alvherre.pgsql> <20200820060929.GB3730@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200820060929.GB3730@paquier.xyz> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Thu, Aug 20, 2020 at 03:11:19PM +0900, Michael Paquier wrote: > On Wed, Aug 19, 2020 at 02:16:46PM -0400, Alvaro Herrera wrote: > > I did not set the flag in REINDEX CONCURRENTLY, but as I understand it > > can be done too, since in essence it's the same thing as a CIC from a > > snapshot management point of view. > > Yes, I see no problems for REINDEX CONCURRENTLY as well as long as > there are no predicates and expressions involved. The transactions > that should be patched are all started in ReindexRelationConcurrently. > The transaction of index_concurrently_swap() cannot set up that > though. Only thing to be careful is to make sure that safe_flag is > correct depending on the list of indexes worked on. Hi, After looking through the thread and reading the patch it seems good, and there are only few minor questions: * Doing the same for REINDEX CONCURRENTLY, which does make sense. In fact it's already mentioned in the commentaries as done, which a bit confusing. * Naming, to be more precise what suggested Michael: > Could we consider renaming vacuumFlags? With more flags associated to > a PGPROC entry that are not related to vacuum, the current naming > makes things confusing. Something like statusFlags could fit better > in the picture? which sounds reasonable, and similar one about flag name PROC_IN_SAFE_CIC - if it covers both CREATE INDEX/REINDEX CONCURRENTLY maybe just PROC_IN_SAFE_IC? Any plans about those questions? I can imagine that are the only missing parts.