public inbox for [email protected]
help / color / mirror / Atom feedFrom: akshay polji <[email protected]>
To: Gambhir Singh <[email protected]>
Cc: Pgsql-admin <[email protected]>
Subject: Re: alter the datatype of Partition Key
Date: Thu, 19 Jun 2025 12:31:51 +0530
Message-ID: <CAHecRemysNd-X8hrv_jEJ4OPMB6G2SwVV7dDZcmYbze4rmCXRQ@mail.gmail.com> (raw)
In-Reply-To: <CAHOGQfXU5Lks_xizETjXvnENFHafT2xT3wOB0D=8X_bL_as4rA@mail.gmail.com>
References: <CAHOGQfUDcr+ZRJ=q+7uNgU+qFzRx6uuwbzHsfyXtFxd9PYAV9Q@mail.gmail.com>
<CAHOGQfXU5Lks_xizETjXvnENFHafT2xT3wOB0D=8X_bL_as4rA@mail.gmail.com>
The cleanest way to do this would be to create a new table with varchar
datatype for the partition key along with the partitions and then move the
data partition-by-partition.
The rollback would be super easy as well in case some issues arise in
applications due to change of datatype.
Regards,
Akshay
On Mon, Jun 16, 2025 at 6:47 PM Gambhir Singh <[email protected]>
wrote:
> Please help me on this
>
> Thanks & Regards
> Gambhir Singh
>
>
>
> On Mon, 16 Jun 2025 at 12:45, Gambhir Singh <[email protected]>
> wrote:
>
>> Hi,
>>
>> We have a partition table with partitioning type range and got the
>> requirement from the application team to alter the datatype of partitioning
>> key from bigint to varchar. Please suggest to me the way how this can be
>> achieved.
>>
>> Data volume is quite huge in the table. ~50 Billion rows
>>
>> --
>> Thanks & Regards
>> Gambhir Singh
>>
>>
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: alter the datatype of Partition Key
In-Reply-To: <CAHecRemysNd-X8hrv_jEJ4OPMB6G2SwVV7dDZcmYbze4rmCXRQ@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