Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rafFp-00ArfX-Ns for pgsql-general@arkaria.postgresql.org; Thu, 15 Feb 2024 17:10:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rafFo-00Ea9g-9A for pgsql-general@arkaria.postgresql.org; Thu, 15 Feb 2024 17:10:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rafFn-00Ea9X-56 for pgsql-general@lists.postgresql.org; Thu, 15 Feb 2024 17:10:31 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rafFk-006uey-4w for pgsql-general@lists.postgresql.org; Thu, 15 Feb 2024 17:10:29 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 195593200A28; Thu, 15 Feb 2024 12:10:25 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 15 Feb 2024 12:10:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1708017024; x=1708103424; bh=XiTk/g7tGvq4Dmj3zOq5V1dJ1HKXBlDAbm5IUhwEngQ=; b= f3up5+u86ZFvSei2RJ4IZ4lQ4L3AAh1MIAJE6z2vq/Szsk+d2f5vN6o3Rj8eAYkn tlQvBvQpU4vCnk8VWcmLL3tWNFFw3uOfV5MgZIh9dDOYBUDt5fHFBNTOtJ3k8ORx r9SmWlRwKB6O5dQCj8zbLjVP79JkLy88QGdgOixNolDRTa0+gVQV6XH/SXq56Qfk n2/4EvctmuRQJPLltlH89eEDgdBBK59bnuOlzhm6WhjGkGijW0rS0uHiWSvsYczK GzfoMy73OGwWsvTajWnMA7LG2s7SK2+nDR7XCs0EHA6GYyYmOeTy/5LEHlHMzRRh FV3bMP1lC3WB/z5dwaZlSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708017024; x= 1708103424; bh=XiTk/g7tGvq4Dmj3zOq5V1dJ1HKXBlDAbm5IUhwEngQ=; b=B bcRVLDXOvUpr+2Y8KxWA2xPrpB25ASspqpCFmI7+1NZgv1wa+ZK+lV9uTsmTAoyE Rf429lOykoFaaFcHreoOsz1uhipOKjdxD3cm5CsTK78LsfM1TpZLfXKpJW68nVcC 0SgTtK/kAf0pF6tbBTxP0luUZCAd4ln73yTT7GLIDHi1qvZUjurLzTIStS9Zl5b/ Z6Jd4D3JUJRNjw34JYzDd07qGuOpJZkBiA0fAe9rn3ZCdTXUyOnMVlWRuxhNmk+2 ybJEEpqgII0o4UNFZmOVZw2hPcagA47Y5nCBQ+zrgmBKWibsUHV3gwVhhkHnkmws fAK75/r9a/EPmhc3XLilA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddtgdelkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeefgeefieeutdfggfetgefgheekjeehteeileeigfet ieekjedvieeviefgheevtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Feb 2024 12:10:23 -0500 (EST) Message-ID: <1db40bdd-7c50-4d00-894d-c4b90414fa49@aklaver.com> Date: Thu, 15 Feb 2024 09:10:22 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: How to do faster DML Content-Language: en-US To: Greg Sabino Mullane Cc: veem v , Ron Johnson , "Peter J. Holzer" , Laurenz Albe , "pgsql-generallists.postgresql.org" References: <20240211222230.tt3mpjdvgrimeodu@hjp.at> <20240213150234.ydiitfoowojhj2n3@hjp.at> <9da45458-e5dc-44e2-80f3-6a0462443a1c@aklaver.com> From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/15/24 09:00, Greg Sabino Mullane wrote: > On Thu, Feb 15, 2024 at 11:43 AM Adrian Klaver > > wrote: > > That is a mixed bag: > > > Ha! Good point. Our contrived example table does suffer from that, so > perhaps the test should be: > > create table int_test(c1 int, c2 int); Alright now I see: test=# create table int_test(c1 int, c2 int); CREATE TABLE test=# select pg_relation_filenode('int_test'); pg_relation_filenode ---------------------- 70021 (1 row) test=# insert into int_test select a, a+1 from generate_series(1, 10000, 1) as t(a); INSERT 0 10000 test=# select pg_relation_size('int_test'); pg_relation_size ------------------ 368640 (1 row) test=# alter table int_test alter column c2 set data type bigint; ALTER TABLE test=# select pg_relation_filenode('int_test'); pg_relation_filenode ---------------------- 70024 (1 row) test=# select pg_relation_size('int_test'); pg_relation_size ------------------ 450560 (1 row) > > Cheers, > Greg > -- Adrian Klaver adrian.klaver@aklaver.com