Re: Moving child tables to partitions?

Keith Fiske <[email protected]> Tue, 7 Jan 2020 14:44:58 -0500
Newsgroups gmane.comp.db.postgresql.admin
Message-ID <CAODZiv60=GLEH+z+zvz7HNrAKLaVkex0KV1yqT74VKe=wvoMiQ@mail.gmail.com>
--00000000000051c3a6059b9204dd
Content-Type: text/plain; charset="UTF-8"

On Tue, Jan 7, 2020 at 1:54 PM Wells Oliver <[email protected]> wrote:

> Is this a possible thing? I'd like to consolidate some older child/parent
> style relationships into the newer partition style.
>
> --
> Wells Oliver
> [email protected] <[email protected]>
>

Yes, this is certainly possible. Whether it's easy or complex really
depends on your original partitioning setup, though. I've got an initial
draft up for doing this sort of migration when using pg_partman. While some
of the steps use things specific to pg_partman, the overall process
should be the same for any migration. I'll be including the finalized doc
in my next release.

https://github.com/pgpartman/pg_partman/blob/migrate/doc/migrate_to_native.md


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

--00000000000051c3a6059b9204dd
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Tue, Jan 7, 2020 at 1:54 PM Wells =
Oliver &lt;<a href=3D"mailto:[email protected]">[email protected]=
</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
<div dir=3D"ltr">Is this a possible thing? I&#39;d like to consolidate some=
 older child/parent style relationships into the newer partition style.<br =
clear=3D"all"><div><br>-- <br><div dir=3D"ltr"><div dir=3D"ltr"><div>Wells =
Oliver<br><a href=3D"mailto:[email protected]" target=3D"_blank">wells.=
[email protected]</a></div></div></div></div></div>
</blockquote></div><br clear=3D"all"><div>Yes, this is certainly possible. =
Whether it&#39;s easy or complex really depends on your original partitioni=
ng setup, though. I&#39;ve got an initial draft up for doing this sort of m=
igration when using pg_partman. While some of the steps use things specific=
 to pg_partman, the overall process should=C2=A0be the same for any migrati=
on. I&#39;ll be including the finalized doc in my next release.</div><div><=
br></div><div><a href=3D"https://github.com/pgpartman/pg_partman/blob/migra=
te/doc/migrate_to_native.md">https://github.com/pgpartman/pg_partman/blob/m=
igrate/doc/migrate_to_native.md</a>=C2=A0</div><div>=C2=A0<br></div>-- <br>=
<div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=
=3D"ltr">Keith Fiske<br>Senior Database Engineer<br>Crunchy Data - <a href=
=3D"http://crunchydata.com" target=3D"_blank">http://crunchydata.com</a></d=
iv></div></div></div></div>

--00000000000051c3a6059b9204dd--