Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jW3Ji-0000ps-3U for pgsql-general@arkaria.postgresql.org; Tue, 05 May 2020 19:33:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jW3Jg-0002eM-TF for pgsql-general@arkaria.postgresql.org; Tue, 05 May 2020 19:33:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jW3Jg-0002dw-MA for pgsql-general@lists.postgresql.org; Tue, 05 May 2020 19:33:20 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jW3JY-0000BN-Sz for pgsql-general@lists.postgresql.org; Tue, 05 May 2020 19:33:20 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 401352F7A; Tue, 5 May 2020 21:33:11 +0200 (CEST) Date: Tue, 5 May 2020 21:33:11 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Thoughts on how to avoid a massive integer update. Message-ID: <20200505193311.GA10626@hjp.at> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mYCpIKhGyMATD0i+" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-05-04 21:32:56 +0000, Fehrle, Brian wrote: > I have a database with hundreds of terabytes of data, where every table h= as an > integer column referencing a small table. For reasons out of my control a= nd > cannot change, I NEED to update every single row in all these tables, cha= nging > the integer value to a different integer. >=20 > =20 >=20 > 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 --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --mYCpIKhGyMATD0i+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAl6xv3IACgkQ8g5IURL+ KF0YwA//VtlB8+6LKWi7ronyOjG1tWTMroNHNeZmP6NfmsqzIlsa4cLX/u26yYB3 /VC3YRlpkh+EEaqK9HpFDSvPVRzmDhrpFuAzHxAbjMVZ1lDpbNNTdBFhZG2xVeEC +Up+ex0Yb5Dg34u5IQAhHjJlLuz1h/uyF8REY6zPltu2GI8J52S1OYq/XjwtlsRD R8x9jsiu3ykl+OnK0chPu6t5s3vbC+Mq5TYadg8HE4j0/vkI3k0RpVvXu3535KbA zDF2wwLRBw2hFkEdX7ZR0PiQEO1shGY53AmqysRPgKA2CfJ9xF6NpdLe8ufLqJfP oiIlWm/LXS7WiCFxlAA31QS+/LJi8wSaP6WaEbF5zRyIXcVRa1pdWLI3mByFuHzw B/sZeoKjy1efxTAP2iYyCJvs8f5+7EHSv2mLiOuKaHGmRkbIEqGeDFrWHaY9BWH1 05GvC3b/ppsdhGtWIxO7Dla1gLLQ9iimhGl0nRvLN8W5kpNlb7+RSPFtGolMAujG pryQIM1sgnkIABzq4PkerPgAy0Gxr0r/sbN/FqosHy4VQ6IojWg+EmIuElYiJJzB EVLp8g3vuMx0feHuYJZlU7KCUE1IKdBH21eb5BCXr/VXE4QlN5t71PvNPbd7JQzJ UFC2/xuhojOZvDEw76wgyDN94dh2BDFrO4LL2g6ORoMwhS+Ofqo= =NMNr -----END PGP SIGNATURE----- --mYCpIKhGyMATD0i+--