Re: Partitioning without downtime

From: Keith Fiske <keith(dot)fiske(at)crunchydata(dot)com>
To: Loles <lolesft(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Partitioning without downtime
Date: 2022-04-22 15:38:08
Message-ID: CAODZiv6XDLy3n=WPU3a=Ra27M=sgiwQP=FX=2mW7FzJnVChLBw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, Apr 22, 2022 at 11:28 AM Loles <lolesft(at)gmail(dot)com> wrote:

> Hi!
>
> Is there a way to partition a table in production without downtime? Or
> extension that allows it.
>
> Thanks!
>

Zero downtime (or without a table lock at some point) is not possible with
native partitioning since you cannot convert an existing table into a
natively partitioned table. However, it is possible to do it with very
little downtime if the circumstances allow. I've laid out a method of doing
this with pg_partman here -
https://github.com/pgpartman/pg_partman/blob/master/doc/pg_partman_howto_native.md

--
Keith Fiske
Senior Database Engineer
Crunchy Data - http://crunchydata.com

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message ravi k 2022-04-22 16:42:49 Re: Partitioning without downtime
Previous Message Loles 2022-04-22 15:27:44 Partitioning without downtime