From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: nikhil raj <nikhilraj474@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Getting a error on creating a partition table index 12.2.
Date: Thu, 5 Mar 2020 16:31:12 -0300
Message-ID: <20200305193112.GA28464@alvherre.pgsql> (raw)
In-Reply-To: <8d0faa8f-8daa-027f-1bca-b2e6b5705731@aklaver.com>
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=87...
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: alvherre@2ndquadrant.com, adrian.klaver@aklaver.com, nikhilraj474@gmail.com
Subject: Re: Getting a error on creating a partition table index 12.2.
In-Reply-To: <20200305193112.GA28464@alvherre.pgsql>
References: <8d0faa8f-8daa-027f-1bca-b2e6b5705731@aklaver.com> <20200305193112.GA28464@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox