Re: Partitioning an existing table - pg10.6

2019-07-05 Thread Michael Lewis
I have not personally used this, but the write-up seems solid to minimize downtime to help you to shift data gradually. Be sure you understand the limitations of partitioning, particularly when you are still on 10x not yet on v11 where updates will shift a row to a new partition if the partition ke

Re: Partitioning an existing table - pg10.6

2019-07-05 Thread legrand legrand
Hello, Trying to do what I suggested, I understood it doesn't work ;o( Logical replication can only work between two distinct databases, and it seems that the replicated table name is the same as its source ... Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-

Re: Partitioning an existing table - pg10.6

2019-07-03 Thread legrand legrand
Hello, I didn’t test it myself but maybe using logical réplication could help ... See https://www.postgresql.org/docs/10/logical-replication.html Operations - create parttable - Feed it using réplication - when sync : stop app, stop réplication, rename tables - maybe you can réplicate from part

Re: Partitioning an existing table - pg10.6

2019-07-03 Thread Achilleas Mantzios
On 3/7/19 10:01 π.μ., Ayub M wrote: Hello, I am using postgres 10.6 and have a huge table with ~30m recs which needs to be partitioned. Whats the best strategy for it with minimal downtime? 1. Rename existing table and create new partitioned tables with orig name and keep inserting data from t