| From: | Lok P <loknath(dot)73(at)gmail(dot)com> |
|---|---|
| To: | yudhi s <learnerdatabase99(at)gmail(dot)com> |
| Cc: | pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Partition boundary messed up |
| Date: | 2024-07-27 08:47:26 |
| Message-ID: | CAKna9VbvovPsOibzPVNxw88vP+=fCZpQ8A=Vvacpw4=8+-X6mQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Thank you. I understand that is going to take a lot of time as we
already have billions of rows in the main table spread across 40+
partitions.
Also this table is child to another parent partition table and so, it will
take a lot of time to validate the FK constraint back for the new table.
Is there a less disruptive way(zero to minimal downtime) possible to fix
this mess?
On Sat, Jul 27, 2024 at 2:08 PM yudhi s <learnerdatabase99(at)gmail(dot)com> wrote:
> If you were thinking of some ALTER command which will just alter the
> boundaries of the incorrect partition and make it correct , I don't think
> there exists any such. You may have to create a whole new table and run the
> partman.create_parent block with the UTC time zone set so that all the
> subsequent partitions will be created with correct boundaries and then move
> the data into it from the existing table.
>
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Durgamahesh Manne | 2024-07-30 08:59:36 | Scheduling pg_repack job with pg_cron |
| Previous Message | yudhi s | 2024-07-27 08:38:11 | Re: Partition boundary messed up |