pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Alvaro Herrera <alvherre@2ndquadrant.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 11:37:06 -0800
Message-ID: <0df4e42e-33e5-bfa5-fe51-5d3a932e2f82@aklaver.com> (raw)
In-Reply-To: <20200305193112.GA28464@alvherre.pgsql>
References: <20200305193112.GA28464@alvherre.pgsql>

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=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.
> 

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





view thread (8+ messages)  latest in thread

Message-ID: <0df4e42e-33e5-bfa5-fe51-5d3a932e2f82@aklaver.com>
Permalink:  ../0df4e42e-33e5-bfa5-fe51-5d3a932e2f82@aklaver.com/
Also on:    postgresql.org/message-id/0df4e42e-33e5-bfa5-fe51-5d3a932e2f82@aklaver.com

 · 

reply

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: adrian.klaver@aklaver.com, alvherre@2ndquadrant.com, nikhilraj474@gmail.com
  Subject: Re: Getting a error on creating a partition table index 12.2.
  In-Reply-To: <0df4e42e-33e5-bfa5-fe51-5d3a932e2f82@aklaver.com>
  References: <20200305193112.GA28464@alvherre.pgsql> <0df4e42e-33e5-bfa5-fe51-5d3a932e2f82@aklaver.com>

* 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