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.89) (envelope-from ) id 1hV78O-00020E-7T for pgsql-hackers@arkaria.postgresql.org; Mon, 27 May 2019 04:21:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hV78L-0000zM-7S for pgsql-hackers@arkaria.postgresql.org; Mon, 27 May 2019 04:21:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hV78K-0000zE-Pk for pgsql-hackers@lists.postgresql.org; Mon, 27 May 2019 04:21:12 +0000 Received: from mail-io1-xd43.google.com ([2607:f8b0:4864:20::d43]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hV78B-0003Ew-L3 for pgsql-hackers@lists.postgresql.org; Mon, 27 May 2019 04:21:12 +0000 Received: by mail-io1-xd43.google.com with SMTP id f22so12187362iol.11 for ; Sun, 26 May 2019 21:21:03 -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=9sJKg27MZ92yZTTkOuMrp68gpK90uWCCxo8q0IbBPJo=; b=uf4rmIO47En4IOkZ/Uc5chU/VRD0tER7lbcI3Ul+QfxavhpIZOuc6nxLDy4trYsowT i6fUQQ+rwMaezXlxCwXoyf+WbMz4ypuE1auIuJhDBeQ88Jcriii5cJFIg+Kk8TGZ7dkb 5CGYR/Wj/nGIOf1P/Ts2hn1MmKNGh4gNu4dE6L+t4SbXlvGsxwW6pDVELnDO5VxP67Vd 52TQKEMtbIv6GyPWXfG6cMnYDys26CHBZrTxIcWDX1/JAY49GvYXvYGPSi+TBAfRbJE/ pOwTY88DseFVCEn/U7mr+qPWrzgB45ZSndUKT27WmuhgA0HC6glS78A7q7OQkHucDzTU UZcg== 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=9sJKg27MZ92yZTTkOuMrp68gpK90uWCCxo8q0IbBPJo=; b=bWJ4AujtzJarfr1+BKGREUQJIALVlaeRnxwOZhzUI+kK/ldoqhOCZbVlAJyaRLmkm2 7u8I8hG8tuaHlZ3EKTnzjkmHQG6VAX7HnvE9xg+iHVQk8dX9U4//ZautdEwHy6RwNPTG 2Qct6KpS9oxaZf+xEFhFbcPyeNqpIjLiT9IY9z3le0igSSsvMJK5yZUlQCdrBrKyS4V5 Lwr/opfIGAMhob4G6HM0dJ5loHVFj0q0p4RLDJU6R1orZ4yrREsZEfYKQPo5wP9o9DH9 u4WXdwykd74DJPy+3o/iAxz5WkGdqdbGS2oXORyVN7hGKnfWKDwgCMO6C+6R+R43detC 5zaw== X-Gm-Message-State: APjAAAXWyewuYt8WmuSGDzLM/EHo//ZjcTW39yXFtuE9lZ+XY8pqzSE9 nbkEx2x9Dk0BJqzQjPuP/7avciGUS3JY0BXqqFFcZE87fuz8v8TRF0A6+Rt4UF35aM39Bkd6ayT itreo3o6x2HFKxWcsdvNBy3pTjOWATpI7uqhLWrV2YRyxg+y9v4uOUqRE1yPGqHCN3NqWa6ZNAj Q6aPqc9hVI6uTldvJn X-Google-Smtp-Source: APXvYqwtFik+4cT+qpzthVV6QUKqQr/xlHxlQkwl/9/EdNyvL4Is72VmjjEsL8yX/HepJTMpRP+MDA== X-Received: by 2002:a6b:6e07:: with SMTP id d7mr43152876ioh.88.1558930861217; Sun, 26 May 2019 21:21:01 -0700 (PDT) Received: from nimloth.alvh.no-ip.org (otwaon1243w-lp130-01-67-70-6-3.sympatico.ca. [67.70.6.3]) by smtp.gmail.com with ESMTPSA id q142sm4631407itb.17.2019.05.26.21.21.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 May 2019 21:21:00 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id E550F120CE5; Mon, 27 May 2019 00:20:58 -0400 (-04) Date: Mon, 27 May 2019 00:20:58 -0400 From: Alvaro Herrera To: Michael Paquier Cc: Tom Lane , pgsql-hackers@lists.postgresql.org Subject: Re: Inconsistent error message wording for REINDEX CONCURRENTLY Message-ID: <20190527042058.GA18098@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190527015418.GD1963@paquier.xyz> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-May-27, Michael Paquier wrote: > On Wed, May 15, 2019 at 11:17:51AM +0900, Michael Paquier wrote: > > Perhaps something like the attached for the REINDEX portion would make > > the world a better place? What do you think? > > Alvaro, do you have extra thoughts about this patch improving the > error message consistency for REINDEX CONCURRENTLY. I quite like the > suggestions you made and this makes the error strings more > project-like, so I would like to apply it. I wonder if we really want to abolish all distinction between "cannot do X" and "Y is not supported". I take the former to mean that the operation is impossible to do for some reason, while the latter means we just haven't implemented it yet and it seems likely to get implemented in a reasonable timeframe. See some excellent commentary about about the "can not" wording at https://postgr.es/m/CA+TgmoYS8jKhETyhGYTYMcbvGPwYY=qA6yYp9B47MX7MweE25w@mail.gmail.com I notice your patch changes "catalog relations" to "system catalogs". I think we predominantly prefer the latter, so that part of your change seems OK. (In passing, I noticed we have a couple of places using "system catalog tables", which is weird.) I think reindexing system catalogs concurrently is a complex enough undertaking that implementing it is far enough in the future that the "cannot" wording is okay; but reindexing partitioned tables is not so obviously out of the question. We do have "is not yet implemented" in a couple of other places, so all things considered I'm not so sure about changing that one to "cannot". -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services