Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecqE6-0001Lx-OG for pgsql-docs@arkaria.postgresql.org; Sat, 20 Jan 2018 10:18:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecqE6-0002QN-34 for pgsql-docs@arkaria.postgresql.org; Sat, 20 Jan 2018 10:18:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ecqE5-0002QD-Tt for pgsql-docs@lists.postgresql.org; Sat, 20 Jan 2018 10:18:17 +0000 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ecqE2-00042d-Q3 for pgsql-docs@lists.postgresql.org; Sat, 20 Jan 2018 10:18:17 +0000 Received: by mail-pf0-x243.google.com with SMTP id p1so3298846pfh.4 for ; Sat, 20 Jan 2018 02:18:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5CtkZDX+Hu0jUZ+f4h8CaQMTj2Brx/8toMaH0A8lr2o=; b=f74ti4X36wZ2kQKtAImoBK7oGYluEJoRYx+nKNm9JKb7xdBbEjLGWzK5O70r/K5rjo BaoDWaKuDWcT18K8zwTnYHEDChsOcYvOARYUicJa/RTtflx+69Z+p1F6U85XcOX4SfEY WHjNgNEd2cSyPlkO0iRXpBrTrOkuFKfMwmMIcGKoYcQNYouPxfwEmmKQaZ8nDYdkqWA2 qtlDfBe81q35SwhPPhGT0FnxwFq622D1LL84d7mxs8WP7yXegj7JCeTEID/27ts0winK 9NA/V2UuYcRQr0xJZpU24QG+OQ2vHEh5ltBpBH9B61tuH/8P8bj0gIQZRs/rd4yPWQ72 +mvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5CtkZDX+Hu0jUZ+f4h8CaQMTj2Brx/8toMaH0A8lr2o=; b=G6KfAtapNPgGHFQ9zOJ92xrivByXwhsjoNADKgOnCJozvRAuW3KXaki8P1snJ8qDsR UchiUpWLIsfMWvyDn4ijZHitS5EUpTsLzKHl8W4kKQ3cSELr9iX0hx4jZYV8R2cyMxBf 4nLAuIwWwnO0r23TYglizwwxvx8ZosnMBXDVwCh5mvHR4AWG1u+YRhbkQKvqduphjGS9 fU3dz4pIHIFgnt+ySRNEIFQhlXdBhcEakaT+dldauNsfdbQqtq80yctivkaIlI1O33Ex zRWP5P6CrKcnhlXBWHoZr2GdEGfQBydM1hvYWWsN4dc3humBWyZRuH9yW+LmAcHdKmVE C2mA== X-Gm-Message-State: AKwxytcpykY+6c8GmmllaR3YnZC+QVCizt2qnRvLuYooIevwVrdVGBRg cKKq5eGZkmM5iEpT5nhFanU= X-Google-Smtp-Source: AH8x226wlW7cogMS5sqgsVNFA8pT0uO3nmzaKTLhr2QhTKzAP3zn1Mxn9jg6yLRsy3oBrHlwK/SWuQ== X-Received: by 10.101.81.7 with SMTP id f7mr1500429pgq.451.1516443492250; Sat, 20 Jan 2018 02:18:12 -0800 (PST) Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp. [61.215.137.162]) by smtp.gmail.com with ESMTPSA id p68sm2610016pfp.30.2018.01.20.02.18.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 20 Jan 2018 02:18:10 -0800 (PST) Date: Sat, 20 Jan 2018 19:18:07 +0900 From: Michael Paquier To: Tom Lane Cc: ilsa@ilsadee.com, pgsql-docs@lists.postgresql.org Subject: Re: What does "Table rewrite" mean? Message-ID: <20180120101807.GB1311@paquier.xyz> References: <20180119160340.3623.98926@wrigleys.postgresql.org> <21887.1516379623@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xXmbgvnjoT4axfJE" Content-Disposition: inline In-Reply-To: <21887.1516379623@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --xXmbgvnjoT4axfJE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 19, 2018 at 11:33:43AM -0500, Tom Lane wrote: > It means reading the whole table and writing it out in some modified > form (for instance, with some column transformed into a new datatype). > It's not "dangerous" in any way ... but if you've got many GB of data in > the table and you can't afford to have the table locked for a long time, > then it's something to avoid. Yeah that can be costly. Note that WAL corresponding to this data needs to be generated as well. -- Michael --xXmbgvnjoT4axfJE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlpjF18ACgkQnvQgOdby QH30gw//WApV92AG1hVKR2BcN4ceFF4B44JKebhnAiUNU4hbKNRi/5IUW7jQEzG/ fTsZZzGOvpS+Z0XO4a7onjojIcVtOcO6N3Der3lRDz511kavUxG4ILK8Ccxwmd1r u+7/kxOl4PWQQZ3VhJ4hgZQfZ9R1K5jnOXJxbqz+QF9zt4PxFQBXITRQw3OLlU+b 7O0zJXonARoBQHKI3sOpJVMBwLK/IoR5dCSezNx5sT2o/uRoG4zsk9itrxhtKmqt oclK2kacepRL6m1ov6xioFYFa9YuWXI/sE9KzFBOUaeX7d366DSvyoGAJ7WYE1J3 4qmHwXygDvL6w1VFubI+7eZEL7r6+7iLbuGb8mg4YEtpPgkZ+Uz2mIrCwqvycrwh Z2T6KpQHhuUfEIxCSEH/eQiBaQm8fkPq/KIf8rybfLyvTE2sxZFcDRJ76j6Pn+aT QhnRdOEReqI19hxd+RGTqFU3H1di1E/wFzJ/fsLncTBxW7wsLg+bSqZWTLIyxwHk j32zP3L0x8wa/7b9NX9z+Sv/x/UNDe9LwWkpRUnszpltD7b72NOmVIXlipn5jbfs 7tjuXjGi9vgu6sfr9AuqvSvDtHJFetK+nWv2j/zoKO37hGRrIUPVDhLZKo1kws6e Z3vDySSqnrugqHEytjXLVaWRLQx7xzDQcTcBvUqwXtf30QBKAmU= =aGZN -----END PGP SIGNATURE----- --xXmbgvnjoT4axfJE--