Re: Thoughts on how to avoid a massive integer update.

From: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Thoughts on how to avoid a massive integer update.
Date: 2020-05-05 19:33:11
Message-ID: 20200505193311.GA10626@hjp.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2020-05-04 21:32:56 +0000, Fehrle, Brian wrote:
> I have a database with hundreds of terabytes of data, where every table has an
> integer column referencing a small table. For reasons out of my control and
> cannot change, I NEED to update every single row in all these tables, changing
> the integer value to a different integer.
>
>
>
> Since I have to deal with dead space, I can only do a couple tables at a time,
> then do a vacuum full after each one.

Do you have to change all the values at the same time? If you can change
them one (or a few) at a time, the tables shouldn't bloat much.

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Miles Elam 2020-05-05 20:11:11 RETURNING to_jsonb(...)
Previous Message Tom Lane 2020-05-05 19:11:00 Re: Lock Postgres account after X number of failed logins?