From: | Catalin Maftei <catalinmaftei(at)yahoo(dot)com> |
---|---|
To: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | alter table to multi partitions |
Date: | 2022-02-24 12:48:55 |
Message-ID: | 618793701.1030887.1645706935094@mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
hello,
on a project I have large tables, with more than 2-5.000.000 rows, and the system is starting to be slow,This tables have many dependencies functions, procedures and views.
I want to partition this tables.
I think for this scenario for table Orders:
step1: create new table with same structure -> Orders_Partstep 2: create all the partitions&triggers on new table Orders_Part
step 3: copy/moved data from Orders to Orders_Part
step 4: rename Orders to Orders_OldIf i want to drop Orders, it's necessary to drop all dependencies (and that's not what I want)
step 5: rename Orders_Part to Ordershere is the problem - when rename Orders to Orders_old, postgres automatically change Orders to Orders_old in all dependencies (views, functions, sp)
is there any postgres setting I can use to not automatically change the in all the depandencies?
--
-----------------
Best regards,
Catalin Maftei
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-02-24 15:46:14 | Re: tsvector string representation and parsing |
Previous Message | Aleksander Alekseev | 2022-02-24 08:56:36 | Re: Support logical replication of DDLs |