pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Catalin Maftei <catalinmaftei@yahoo.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: alter table to multi partitions
Date: Thu, 24 Feb 2022 12:48:55 +0000 (UTC)
Message-ID: <618793701.1030887.1645706935094@mail.yahoo.com> (raw)
References: <618793701.1030887.1645706935094.ref@mail.yahoo.com>

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

view thread (2+ messages)  latest in thread

Message-ID: <618793701.1030887.1645706935094@mail.yahoo.com>
Permalink:  ../618793701.1030887.1645706935094@mail.yahoo.com/
Also on:    postgresql.org/message-id/618793701.1030887.1645706935094@mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: catalinmaftei@yahoo.com
  Subject: Re: alter table to multi partitions
  In-Reply-To: <618793701.1030887.1645706935094@mail.yahoo.com>
  References: <618793701.1030887.1645706935094.ref@mail.yahoo.com> <618793701.1030887.1645706935094@mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox