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.96) (envelope-from ) id 1wGCYc-005zCp-0i for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Apr 2026 09:10:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wGCYZ-005e9t-2k for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Apr 2026 09:10:39 +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.96) (envelope-from ) id 1wGCYZ-005e9j-0K for pgsql-hackers@lists.postgresql.org; Fri, 24 Apr 2026 09:10:39 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wGCYR-00000002YL9-159Q for pgsql-hackers@postgresql.org; Fri, 24 Apr 2026 09:10:38 +0000 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-2b2429f98d0so45092855ad.2 for ; Fri, 24 Apr 2026 02:10:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777021831; x=1777626631; darn=postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=QruCuEkneapBaMV6akHup5AWk7od+Uu3cld3BtUMWwk=; b=qE7W5zHpJD4kga5abd7eHFajrXaHKqg23WYyUUHDOaFk73pkOopw1IdwOzM3SatuT9 2mU0RZmhZQ4DLZbSWnWZIOi5mhu19554D5Dw/iNK7vz/q6QrsZsfNYKtaWlT0q4Yujgn oowxuHx7cHpDmPHwOk3FDrotoxP9alMSLjI+FysxLpHFQcTlHUnuPmzfjSmwGSM8FniG C8dxW+iQhgTTlpr4MtoDHNupu9RBf0S1mFhYTg+xjV4fRwZxMHohv0CMptINupvt63Jm 5OaDTQnuLAxAXGGTX1HESBjWELF3c5zVJzgTp1Sz/weV+AjSJmShqNxWGo2Ynrno8jGj btvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777021831; x=1777626631; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QruCuEkneapBaMV6akHup5AWk7od+Uu3cld3BtUMWwk=; b=btklK/wxh8goHQTKItUZdu9+qcy94wTqjQL4LaWQHfcmkoPHeXv1R8pSiNuSO+Lvol YRRLcHw81ocCgh3PeqIfcU8FOJxm1JXr91olkxoAPQD91gjlhxuIKgvaPRhroTbZHSWM /8WS375Yq7ucNq/nnsziBUfarHlcJE/RUbeUIJZt07DW0cR9bihIoMLU0SwyqCe0mX2x UEyfkAEcv/bYxa+59H7Nf8tgviZOS2LRpw7cYWgsxfhy++RlySQZK6nUf2hfd1ha8Xhx nimKqL6OFM+LWxs7nkoFoFpU8vxYxpD8X+UkOjH0mI18DuTqxLoSmFTSFXx3KQ8SYPPU +hnA== X-Forwarded-Encrypted: i=1; AFNElJ/xfkfo9orJYaSnjei2e/GpKN+h4MV2JamS+54m6rw0BMmTBoIU75yzNQjCF7skopo9lqZQYd5gH1z1mP35@postgresql.org X-Gm-Message-State: AOJu0YyDHQ6L4vYohpeaZW/5ft2WlbtQuJFnssJYLNvcIjJBk8E4s13A o6eggmy1V/uWGxeoxDNeJJMm7/dYOTbKginD882EMSxrWGjUpYRfkwAF X-Gm-Gg: AeBDiesy4T9PmsNPWBSexNjPWWGT5YlnyCy64ZbJEA3l7d8Xiyo5aHwr6/YaCirSJQd BjxeZRplwwf2OMQy6WPtP7TV9bsj4bV31TqXEqvChBEcs6Ts2MQqm2KCc9ba0oiuVKWWB1xF7u/ jLrJRVWQLfB3RRsy6J85xD1py28PxJ7ugnVZr7IN/IDb7DXn8CPpPKt1yMAfzOdztQQrLG+Z/Pw HrRK1LFzuoYUC9EpL6D5KRpulOxCkpiA7vh8JH88LjTeOrrUjfmhoJRu0mzMBJA0nSWMtmJNHz+ dpXsxVHg9SjrHuff/Ubk97W8esSvwBMufkfe/zOIcBcXjzjLWlFuRS3H6mSZfwRaWfk9JaT0Ha1 K1Cy3gftS16ZdQ4uHY36j7AeDPEctCzrVPAOgR3DUFPowTTbfHLRbJpwunVDpsFom7BGRaiYhGH UOLCKFsvmCkDTHsCnXwjZqN8twuXc1Tvl6Reug7g86Wzg8zgA= X-Received: by 2002:a17:903:2f08:b0:2b0:7d3d:756a with SMTP id d9443c01a7336-2b5f9f64c9cmr335357245ad.35.1777021830611; Fri, 24 Apr 2026 02:10:30 -0700 (PDT) Received: from localhost ([66.96.209.34]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab4cc47sm223804215ad.82.2026.04.24.02.10.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Apr 2026 02:10:29 -0700 (PDT) Date: Fri, 24 Apr 2026 17:10:22 +0800 From: Alberto Piai To: Alberto Piai , pgsql-hackers@postgresql.org Subject: Re: Adding a stored generated column without long-lived locks Message-ID: X-Mailer: aerc 0.21.0 References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="4wx636ozsu2eakgd" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --4wx636ozsu2eakgd Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Tue Apr 7, 2026 at 5:02 PM +08, Alberto Piai wrote: > On Tue Mar 17, 2026 at 5:31 PM +07, Alberto Piai wrote: > >> I recently needed to add a stored generated column to a table of >> nontrivial size, and realized that currently there is no way to do >> that without rewriting the table under an AccessExclusiveLock. Attached v3, just a rebase onto current master. Regards, Alberto -- Alberto Piai Sensational AG Zürich, Switzerland --4wx636ozsu2eakgd Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename="v3-0001-Support-changing-a-column-into-a-stored-generated.patch"