Re: behaviour change - default_tablesapce + partition table
Amit Langote <langote_amit_f8@lab.ntt.co.jp>
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Rushabh Lathia <rushabh.lathia@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>,
Alvaro Herrera <alvherre@2ndquadrant.com>
Date: 2019-05-20T04:45:10Z
Lists: pgsql-hackers
On 2019/05/20 13:42, Rushabh Lathia wrote: > On Fri, May 17, 2019 at 10:30 AM Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> >> Why not change it like this instead: >> >> @@ -681,7 +681,8 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid >> ownerId, >> Assert(list_length(inheritOids) == 1); >> tablespaceId = get_rel_tablespace(linitial_oid(inheritOids)); >> } >> - else >> + >> + if (!OidIsValid(tablespaceId)) >> tablespaceId = >> GetDefaultTablespace(stmt->relation->relpersistence, >> partitioned); > > Yes, sure we can do that. Here is the patch for the same. Thanks Rushabh. Regards, Amit
Commits
-
Fix default_tablespace usage for partitioned tables
- a36c84c3e4a9 12.0 landed
-
Fix tablespace inheritance for partitioned rels
- 87259588d0ab 12.0 cited
-
Make pg_dump emit ATTACH PARTITION instead of PARTITION OF
- 3b23552ad8bb 12.0 cited
-
Fix tablespace handling for partitioned tables
- ca4103025dfe 12.0 cited