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 1j9wDJ-0000yD-Cn for pgsql-general@arkaria.postgresql.org; Thu, 05 Mar 2020 19:31:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j9wDH-0006Rk-Rm for pgsql-general@arkaria.postgresql.org; Thu, 05 Mar 2020 19:31:19 +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 1j9wDH-0006Rd-ID for pgsql-general@lists.postgresql.org; Thu, 05 Mar 2020 19:31:19 +0000 Received: from mail-qv1-xf42.google.com ([2607:f8b0:4864:20::f42]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j9wDE-0003Ot-Qp for pgsql-general@lists.postgresql.org; Thu, 05 Mar 2020 19:31:19 +0000 Received: by mail-qv1-xf42.google.com with SMTP id r15so2967451qve.3 for ; Thu, 05 Mar 2020 11:31:16 -0800 (PST) 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=SrH91Ox/oUB3qtO+Bs1vgEewGJNbnwb/z024WFlFO7w=; b=piiARflvlfWunWMXZgkcPYiEglbnkxF/5Nw7YX2uT78YFG4CclsTPgWli2TO3A0Ozv /8ip+gQMtFQKn1M/AndKKV3zO0IC2tOdx+svi+Jd6zzQ7N+FFLH0aVxuL20S4CLPOzeS SzfjvK1lgr4yeqQVrZf2de4suY9PYu68eu0VN5d5ERmfDNbbTxRAfS8tvrO0vp9lMeqb vBHSY1oqLW7JDnlvnpOkjtH29hkHYjm1FekQCwn2RM21gMf8jh3IiUTUMtwCsH1IYk3W 1Z9RNHV+nxqE5am0ANObDPM5P/riqO6dHNGBrw1ecp9UjlaYS/k7U7nbAhqOf+jb9eVD 8Sbg== 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=SrH91Ox/oUB3qtO+Bs1vgEewGJNbnwb/z024WFlFO7w=; b=ZjUrNYbPqG3Ry+t5RoL1NxW6uRNWkDCrFIZaxObEvKWlzjG1o7JZQ6zOYN0BnMAXXC gyKnOrPSlcNhE4uw+6CEI1mwA/Yl4qbfD2doSWTrYEZpEsXEMpxIFF56L2pcwVCJesmR 4MqgQBo79XOTlzZeDfoh+x1G6T6TgfFGsyjRK1FdYOZ3TMWjtUmPMQRBpyppFOcc+ZqL TafCa+gHpFw2+HVvQablTaowhoa78e5o2+Vo3QSLCGxiELOSY8t2WTr1KDp+GatlqShk co0q68IL26nJ0aee9ErBbxtfU6VwQNw/f1m2xXAt64Eew5Pwzdwn64kqNnPtMCufAxPO pYJg== X-Gm-Message-State: ANhLgQ0hrl7vx7o3IspYiC6rj1p4SgCM7aWqHYFjOkdrAJO79SHR8Lwm KEgK8DcoTksJvgXk02oCL+cJ1Q== X-Google-Smtp-Source: ADFU+vvQqDYKNmG484ZTIFurpLeMjMBRFxXdvItq26AuS/1DGr4xDm3BlBmfxsMmn9vuAMalFlGGmw== X-Received: by 2002:a05:6214:11e6:: with SMTP id e6mr318880qvu.68.1583436674870; Thu, 05 Mar 2020 11:31:14 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([201.186.208.119]) by smtp.gmail.com with ESMTPSA id n4sm3040381qkk.88.2020.03.05.11.31.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2020 11:31:14 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 72C213007D2; Thu, 5 Mar 2020 16:31:12 -0300 (-03) Date: Thu, 5 Mar 2020 16:31:12 -0300 From: Alvaro Herrera To: Adrian Klaver Cc: nikhil raj , pgsql-general@lists.postgresql.org Subject: Re: Getting a error on creating a partition table index 12.2. Message-ID: <20200305193112.GA28464@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8d0faa8f-8daa-027f-1bca-b2e6b5705731@aklaver.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services