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 1pLVj9-00032Q-Jw for pgsql-general@arkaria.postgresql.org; Fri, 27 Jan 2023 20:53:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pLVj8-0005At-Cc for pgsql-general@arkaria.postgresql.org; Fri, 27 Jan 2023 20:53:38 +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 1pLVj8-0005Aj-2A for pgsql-general@lists.postgresql.org; Fri, 27 Jan 2023 20:53:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pLVj5-0001yr-Uw for pgsql-general@lists.postgresql.org; Fri, 27 Jan 2023 20:53:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 30RKrYHZ3567882; Fri, 27 Jan 2023 15:53:34 -0500 From: Tom Lane To: Rumpi Gravenstein cc: PostgreSQL Subject: Re: Indexes mysteriously change to ON ONLY In-reply-to: References: Comments: In-reply-to Rumpi Gravenstein message dated "Fri, 27 Jan 2023 15:24:02 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3567880.1674852814.1@sss.pgh.pa.us> Date: Fri, 27 Jan 2023 15:53:34 -0500 Message-ID: <3567881.1674852814@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Rumpi Gravenstein writes: >> We have recently discovered that on some of our partitioned tables indexes >> that were created as: >> >> CREATE UNIQUE INDEX chapter_u01 USING btree (dur_uk, catalog_id) >> >> somehow changed to include the ON ONLY option: >> >> CREATE UNIQUE INDEX chapter_u01 *ON ONLY *chapter USING btree (dur_uk, >> catalog_id) What do you mean "somehow changed"? There is nothing in the system catalogs that stores that exact string, so I suppose what you mean is that some tool is presenting the indexes to you that way. If that tool is pg_dump, this is its normal behavior. There will be other commands in its output that build the rest of the partitioned index set. regards, tom lane