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 1qos7B-003GVE-26 for pgsql-general@arkaria.postgresql.org; Fri, 06 Oct 2023 21:12:05 +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 1qos78-00CHwF-Nb for pgsql-general@arkaria.postgresql.org; Fri, 06 Oct 2023 21:12:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qos78-00CHsl-Bh for pgsql-general@lists.postgresql.org; Fri, 06 Oct 2023 21:12:03 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qos76-000esU-Gm for pgsql-general@lists.postgresql.org; Fri, 06 Oct 2023 21:12:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description; bh=tb/xdstQMGAtLXwhYVHVdoM38zBBIELF2FAOEaGmfk8=; b=rzTriW96aRt9YXkZIPTgvIn+4q 3eBBgaRzN3QgPgklTdcfyKaDH9Gdy1qW6qHWwfPDhnEvb4O+o1+abRAbT8kvgvdp9DtseXBwe60NU sHwZ1X/oK3AS0jl21rzCMXLe9q0kK+8/L/t7ooWRAHjyaKj8QCNy/z+o3sw4frLWr3f+qNlGZCSOq yn37A7m/oe0afJWrhktShbdqgl7ZKodJRXtUaIfmsNwRDCABYnQM3ih+Uzd8qL7hPDOSJ+ihVnHBL jeCeNw4sx9NUm1Kf9MK8Voqn4kGZa+QkIqiAxAU9MeNPpcMe0nv7EDrV3BrM/q4yHjuEd5MUhFN6+ L0oKFsvA==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qos73-006TAE-0d; Fri, 06 Oct 2023 17:11:57 -0400 Date: Fri, 6 Oct 2023 17:11:57 -0400 From: Bruce Momjian To: Ann Harrison Cc: Tom Lane , James Healy , pgsql-general@lists.postgresql.org Subject: Re: Gradual migration from integer to bigint? Message-ID: References: <1635509.1696131447@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 On Sun, Oct 1, 2023 at 05:30:39AM -0400, Ann Harrison wrote: > Other databases do allow that sort of gradual migration.  One example > has an internal table of record descriptions indexed the table identifier  > and a description number.  Each record includes a header with various  > useful bits including its description number. When reading a record,  > the system notes the description number and looks up the description  > before parsing the record into columns.   > > The transition is made easier if the database indexes are generic -  > for example, numbers rather than decimal[12,6], int32, etc., and string  > rather than varchar[12].   That way, increasing a column size doesn't > require re-indexing. > > But, those are decision that really had to be made early - making > a major format change 25+ years in would break too much. And the performance sounds terrible. ;-) -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.