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 1j9wJ7-00016b-AT for pgsql-general@arkaria.postgresql.org; Thu, 05 Mar 2020 19:37:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j9wJ5-0002gm-6t for pgsql-general@arkaria.postgresql.org; Thu, 05 Mar 2020 19:37:19 +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 1j9wJ2-0002ge-V1 for pgsql-general@lists.postgresql.org; Thu, 05 Mar 2020 19:37:18 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j9wIv-00027P-S9 for pgsql-general@lists.postgresql.org; Thu, 05 Mar 2020 19:37:15 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B321A21E92; Thu, 5 Mar 2020 14:37:08 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 05 Mar 2020 14:37:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=z BAHfrjq2t7N02zYEctM870tqgldm/AuUP3SFsuKmik=; b=dR/9ZpZVxuINIHn0T SCzH/xmhD71pPdc1UzoRTcsU95G8PawTK6DC8D6h31sBuDGNlr3j28rNPcDKkNpO RcErUdvtB+a4JIt+PuQvcIrXWRnQ837SUq2mGFWCFyO/9tUTTV58anh8ownRzRH9 MZNWQjpZ/vVGF2ivtKMhVeHI96VJvcwffi5KcLOlz5w3OCQlLeZ4ZboKMALKLocv V8ErTvkz2GC/SOInpCBAnRqarl05pw36lWsEJgNoiiaKW07tT3vOyoHvAyQ0ZX0I 7NyMaS9gKO7CfumcBc1csEcnfVmca9EIpv7v+Ng0YnV7MSjVpZx6DO1WpYB9uvbW xD8fw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=zBAHfrjq2t7N02zYEctM870tqgldm/AuUP3SFsuKm ik=; b=uMiUsIi5WGiJlMQQoZE8agA4KrsbD5OC2sya5vird2v7tOu9/aGwBRu51 s/5KWZEp2EkgdafffnwLHDlvQxdiTrPJc0KCnTOmZd6bjG58pIidJGXQ9voAn4am 07ldFnRr6cOlYSUpcMze+pdwKpzuIwXj6jly7F75rN1+5Yq94B5XceI6RF2FDy1P McFrUYSoY1QXOFFc/38fQ95UcTqWXijUiic+c9hYXNLRz4LynnUENVS/3GgW5/Vj eloHmvk43oA9oFvYCDAH3Pl8FmeS0sSR4h7xkb8PFpWnCbiI6cVI/9on0u+l3fn4 QMy344ZIlcY3do/MQb7FvimXbonlw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedruddutddgudefudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucfkphepjeegrdel fedruddthedrudekieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from ranger.suse (74-93-105-186-washington.hfc.comcastbusiness.net [74.93.105.186]) by mail.messagingengine.com (Postfix) with ESMTPA id 096B83061363; Thu, 5 Mar 2020 14:37:07 -0500 (EST) Subject: Re: Getting a error on creating a partition table index 12.2. To: Alvaro Herrera Cc: nikhil raj , pgsql-general@lists.postgresql.org References: <20200305193112.GA28464@alvherre.pgsql> From: Adrian Klaver Message-ID: <0df4e42e-33e5-bfa5-fe51-5d3a932e2f82@aklaver.com> Date: Thu, 5 Mar 2020 11:37:06 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200305193112.GA28464@alvherre.pgsql> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/5/20 11:31 AM, Alvaro Herrera wrote: > On 2020-Mar-05, Adrian Klaver wrote: > >> On 3/5/20 10:04 AM, nikhil raj wrote: > >>> *CREATE INDEX t_e20so1_doi_c_doid_idx >>>     ON public.t_e20so1_doi USING btree >>>     (i_doid ASC NULLS LAST) >>>     TABLESPACE pg_default;* > >>> *ERROR: cannot specify default tablespace for partitioned relations SQL >>> state: 0A00.* > >>> Note:- but the same query is executed in the 12.1 version.its working fine. >> >> Well this ERROR appeared here: >> >> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;f=src/backend/commands/indexcmds.c;h=87259588d0ab0b8e742e30596afa7ae25caadb18 > > The reason for the error is the expectation that creating an index on a > partitioned table with a tablespace specification will cause the > children indexes (ie. the indexes on the partitions) to use the same > tablespace. > > This does not work properly for the default tablespace, so I made that > particular condition an error. > The OP was wondering why it worked in 12.1 and not 12.2? I could not see any obvious reason for that, so: 1) There is a not obvious reason 2) It did not work in 12.1 either. -- Adrian Klaver adrian.klaver@aklaver.com