Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PostgreSQL partitioned table and partitions in different schemas

I'm planning to partition a huge table in postgresql. I'm using pgsql-13.

I'm evaluating the possibility to create the master table in schema "public" and the partitions in a new different schema (schema "parts").

I have tested the idea and it works fine. Even with all of its triggers and everything.

The question is: will this cause any performance issues or something?

I couldn't really find much about it in the web or the docs.

Thanks in advance!

like image 982
Victor Duran Avatar asked Nov 01 '25 20:11

Victor Duran


1 Answers

No problem at all, a schema is just a namespace. All tables are registered in pg_class, no matter what schema they use. I do it all the time, for clarity.

like image 62
Frank Heikens Avatar answered Nov 03 '25 23:11

Frank Heikens