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 1nw11H-0007T8-QR for pgsql-hackers@arkaria.postgresql.org; Tue, 31 May 2022 12:30:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nw11G-0000hU-7K for pgsql-hackers@arkaria.postgresql.org; Tue, 31 May 2022 12:30:42 +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 1nw11F-0000fX-Tm for pgsql-hackers@lists.postgresql.org; Tue, 31 May 2022 12:30:41 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nw11D-00072p-9Y for pgsql-hackers@postgresql.org; Tue, 31 May 2022 12:30:40 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 811A13200929; Tue, 31 May 2022 08:30:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 31 May 2022 08:30:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1654000237; x=1654086637; bh=W CKgSyv7KX3GzMuvnOXlMUE7RQm/EkQHvbrGgZzO7j0=; b=Nf5GT85CfktRVKCKx 413LCqXOZHKiBVF3Z/SLttYBuxBv04ow/74RxHN24lrqPTQzORYBl8Z5wJm14tQG aRlrYIvc/WyrxKZGLHOfxVeW8KIECWuyUScfPjHEhczsAvM+XKLxYRJoO0czY2a/ rASvxmM9p+C/oLEEax/e1tJPv6KWAXoGaDhzeDaaiRglaUc48wRl/pf/4xVoHfSk dZsIDw75J7CJLhEvv0vG5irlNblSYtTvSysV4Fljy4ZgA1vSYK9P5TsBd7sOdlWg fTtGfFgudKI8CRcmiDkNphcdp4HqsDiwx2hiSGLkUlcVvdX3xeDY0qFzOQSY81KI JHHNg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrkeekgdehfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeejkeff gfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 31 May 2022 08:30:36 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 4C9802A0843; Tue, 31 May 2022 14:30:32 +0200 (CEST) Date: Tue, 31 May 2022 14:30:32 +0200 From: Alvaro Herrera To: Michael Paquier Cc: Bernd Helmle , Simon Riggs , Ashutosh Bapat , PostgreSQL Hackers , Ashutosh Bapat Subject: Re: Allowing REINDEX to have an optional name Message-ID: <202205311230.5dc4ztvncsck@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-May-31, Michael Paquier wrote: > The case with CONCURRENTLY is different though: the option will never > work on system catalogs so we have to skip them. Echoing with others > on this thread, I don't think that we should introduce a different > behavior on what's basically the same grammar. That's just going to > lead to more confusion. So REINDEX DATABASE with or without a > database name appended to it should always mean to reindex the > catalogs on top of the existing relations. I was thinking the opposite: REINDEX DATABASE with or without a database name should always process the user relations and skip system catalogs. If the user wants to do both, then they can use REINDEX SYSTEM in addition. The reason for doing it like this is that there is no way to process only user tables and skip catalogs. So this is better for composability. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Most hackers will be perfectly comfortable conceptualizing users as entropy sources, so let's move on." (Nathaniel Smith)