> So you would like locate those index tablespaces into the same > tablespace as its parent relation when the index is created for a > unique index or as a primary key?
Yes, and I'd like this behavior take effect when default_tablespace is set to something like "parent". > But what would be the difference with default_tablespace? What do you mean? AFAIK, default_tablespace option cannot tell which tablespace the parent table is in. > I think that you are looking for a replacement for something that is > already doable. Hmm, I've done my research and asked around IRC channels. There is little info come to my mind. could you give me some hint? Michael Paquier writes: > On Fri, Nov 25, 2016 at 4:48 PM, Amos Bird <amosb...@gmail.com> wrote: >> I've been using postgres for a long time. Recently I'm doing table >> sharding over a bunch of pgsql instances. I'm using multiple tablespaces >> one per disk to utilize all the IO bandwidth. Things went on pretty >> well, however there is a troublesome problem I have when adding >> auxiliary structures to sharded tables, such as Indexes. These objects >> have their storage default to the database's tablespace, and it's >> difficult to shard them by hand. >> >> I'd like to implement this small feature --- making table's auxiliary >> structures store their data to the target table's tablespace by default. >> I've done a thorough search over the mailing list and there is nothing >> relevant. Well I may miss some corners :-) > > So you would like locate those index tablespaces into the same > tablespace as its parent relation when the index is created for a > unique index or as a primary key? Perhaps we could have a > session-level parameter that enforces the creation of such indexes on > the same tablespace as the table... But what would be the difference > with default_tablespace? I think that you are looking for a > replacement for something that is already doable. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers