Re: Thoughts on how to avoid a massive integer update. - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: Thoughts on how to avoid a massive integer update.
Date
Msg-id 20200505193311.GA10626@hjp.at
Whole thread Raw
In response to Thoughts on how to avoid a massive integer update.  ("Fehrle, Brian" <bfehrle@comscore.com>)
List 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@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Lock Postgres account after X number of failed logins?
Next
From: Miles Elam
Date:
Subject: RETURNING to_jsonb(...)