alter table to multi partitions

Поиск
Список
Период
Сортировка
От Catalin Maftei
Тема alter table to multi partitions
Дата
Msg-id 618793701.1030887.1645706935094@mail.yahoo.com
обсуждение исходный текст
Ответы Re: alter table to multi partitions  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список 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_Part
step 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_Old
If 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 Orders
here 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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: pg_upgrade from Postgresql-12 to Postgresql-13 fails with "Creating dump of database schemas postgres *failure*"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: tsvector string representation and parsing