public inbox for pgsql-general@postgresql.org
help / color / mirror / Atom feedFrom: Adrian Klaver <adrian.klaver@aklaver.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Alter the datatype on all tables present in the database (bigint to varchar)
Date: Thu, 14 May 2026 10:00:28 -0700
Message-ID: <81c8a5b6-c640-465a-9b67-5c692af3fb70@aklaver.com> (raw)
In-Reply-To: <CAHOGQfVo0FWX8mS9FLTmpDOb5XC5-T4qx4ouhw0wOfNeLdahsA@mail.gmail.com>
References: <CAHOGQfVo0FWX8mS9FLTmpDOb5XC5-T4qx4ouhw0wOfNeLdahsA@mail.gmail.com>
On 5/11/26 5:31 AM, Gambhir Singh wrote:
> Hi,
>
> Please help me with the best way to change the datatype of a column in a
> all tables in DB from bigint to varchar. Please consider the following
> facts.
1) Do not cross post to multiple lists.
2) What is the purpose behind this change?
>
> * DB Size - 75 TB
> * Number of tables - ~100
> * Some tables are partitioned and some are not partitioned.
> * All partitioned tables are big in size.
> * For reference, the largest partition size is 4 TB, similarly the
> size of 10-12 partitions ranges between 1 to 4 TB.
> * We have indexes and FK on tables.
> * Physical Replication is configured with 2 standby DBs.
>
>
> --
> Thanks & Regards
> Gambhir Singh
>
--
Adrian Klaver
adrian.klaver@aklaver.com
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: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, pgsql-general@lists.postgresql.org
Subject: Re: Alter the datatype on all tables present in the database (bigint to varchar)
In-Reply-To: <81c8a5b6-c640-465a-9b67-5c692af3fb70@aklaver.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