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 1oH5CR-0003JY-By for pgsql-admin@arkaria.postgresql.org; Thu, 28 Jul 2022 15:13:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oH5CP-0002qq-Cd for pgsql-admin@arkaria.postgresql.org; Thu, 28 Jul 2022 15:13:17 +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 1oH5CO-0002qg-W8 for pgsql-admin@lists.postgresql.org; Thu, 28 Jul 2022 15:13:17 +0000 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oH5CL-00075b-NN for pgsql-admin@lists.postgresql.org; Thu, 28 Jul 2022 15:13:16 +0000 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-10d845dcf92so2642873fac.12 for ; Thu, 28 Jul 2022 08:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:to:content-language:from :subject; bh=pYO03hEElCUQ6x8dv7hEJREEycP1NzgYAvUutX3PCtc=; b=WHPGmHNKBP4j/7mSC0qf5t+Nb5Gw4pLwMd0aHzIKOpIvT70Zl2Jh3lummZvO7FZ7eH LuZOwUlUMlOVJEwHCLx3X5QaMQXBG1nY61TrbS3APuxPTIv1Xz2gkcdghuNsLHlKzW4O M/xki3+eW7gwTl1aV8cbMToJ6jKTbQDqQlKX0cLupU/yiVrphMn10nXaVh/i9TogtG/K w0dtIifmP1X8GGTrhjN03BoYRkd3sG8VHI1M2zXFSw4k6F9HVYVmNtx08ACivKfSTceE VbMqFmggDG6zNx+1J2XRI5/Jbm6Is3743+KvZzUhPyuz9MsGKZWTKvtftjc4YboumH3G gTFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:to :content-language:from:subject; bh=pYO03hEElCUQ6x8dv7hEJREEycP1NzgYAvUutX3PCtc=; b=zHlovcZegPqe4aUBOc2NKnZMRUp1TX6C8KhehzINhnORb1qGZwBB8+XC1jeUnu4j40 2PZnWEPuLICzYkzBzNTNbYGUPmIGeRyddC421njHryFTpAbHbghJeYecYmLrgxCTTW56 9R8wcmjC0HywnFwzJCb0PFiiBWl9vwJ79dn/czCk0xzdLPdabFIYiXhzG1lxhw5C0Muo pCgr3zCW+5gKzU0hX+TTV0Q9sK4+OSlzodX0e3dboKEGUaqEcoW5F88tywIvJaoycO5J bwFDK17/goYw94IQAQnIpUD8G0VLYInSnyueOU57dtLypbd8m32xf1Ht2bsM0wF6Ij1J E29Q== X-Gm-Message-State: AJIora9bfRCmw607HOiBJxq4oGOBfCaWDOXRsM5Gd9A0vrY8o1hYccHA 4teO69uhy26hCalubMP7lxOKuc5Xs/k= X-Google-Smtp-Source: AGRyM1twiRkTGv8rHff5C5eHPcaollHyyLKR8LFcMC4CS8vTMf4A7ntMB4y1rEUr4V/QDaKy7Cv5QQ== X-Received: by 2002:a05:6871:84:b0:ec:4559:86e1 with SMTP id u4-20020a056871008400b000ec455986e1mr4947642oaa.225.1659021191383; Thu, 28 Jul 2022 08:13:11 -0700 (PDT) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id l6-20020a056871068600b0010e20d0b2e3sm531155oao.44.2022.07.28.08.13.10 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Jul 2022 08:13:11 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------C689zDZQlPA5mKTLq0lQSBQM" Message-ID: Date: Thu, 28 Jul 2022 10:13:10 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 To: pgsql-admin Content-Language: en-US From: Ron Subject: What to watch out for when ALTERing NUMERIC(38,0) to BIGINT? List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------C689zDZQlPA5mKTLq0lQSBQM Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit AWS RDS Postgresql 12.10 We've got tables with columns of data type NUMERIC(38,0) which are a legacy from an Oracle migration. Besides what's mentioned in https://www.postgresql.org/docs/12/ddl-alter.html#id-1.5.4.8.10, what happens *internally* when I run: ALTER TABLE foo ALTER COLUMN bar TYPE BIGINT; I'm thinking mostly of record fragmentation. -- Angular momentum makes the world go 'round. --------------C689zDZQlPA5mKTLq0lQSBQM Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit AWS RDS Postgresql 12.10


We've got tables with columns of data type NUMERIC(38,0) which are a legacy from an Oracle migration.

Besides what's mentioned in https://www.postgresql.org/docs/12/ddl-alter.html#id-1.5.4.8.10, what happens internally when I run:
ALTER TABLE foo ALTER COLUMN bar TYPE BIGINT;

I'm thinking mostly of record fragmentation.

--
Angular momentum makes the world go 'round.
--------------C689zDZQlPA5mKTLq0lQSBQM--