public inbox for [email protected]  
help / color / mirror / Atom feed
From: Lok P <[email protected]>
To: yudhi s <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Partition boundary messed up
Date: Sat, 27 Jul 2024 14:17:26 +0530
Message-ID: <CAKna9VbvovPsOibzPVNxw88vP+=fCZpQ8A=Vvacpw4=8+-X6mQ@mail.gmail.com> (raw)
In-Reply-To: <CAEzWdqeWG2Ld7Y=_kdjBL0CdbRCSGzt+L4p3vzmHoNsxDk+POw@mail.gmail.com>
References: <CAKna9VZ=b6f-zei3RY4uiKq7xjt0Ox_oftySPRq8t0YRWDN+4g@mail.gmail.com>
	<CAEzWdqeWG2Ld7Y=_kdjBL0CdbRCSGzt+L4p3vzmHoNsxDk+POw@mail.gmail.com>

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 <[email protected]> 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.
>
>
>


view thread (3+ messages)

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Partition boundary messed up
  In-Reply-To: <CAKna9VbvovPsOibzPVNxw88vP+=fCZpQ8A=Vvacpw4=8+-X6mQ@mail.gmail.com>

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

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