Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ihwAb-0001K3-9W for pgsql-admin@arkaria.postgresql.org; Thu, 19 Dec 2019 13:48:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ihwAZ-0001uO-ST for pgsql-admin@arkaria.postgresql.org; Thu, 19 Dec 2019 13:48:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ihwAZ-0001uH-Fg for pgsql-admin@lists.postgresql.org; Thu, 19 Dec 2019 13:48:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ihwAX-0003L7-AZ for pgsql-admin@postgresql.org; Thu, 19 Dec 2019 13:48:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xBJDmh2l007123; Thu, 19 Dec 2019 08:48:43 -0500 From: Tom Lane To: Douglas Reed cc: "pgsql-admin@postgresql.org" , Douglas Reed Subject: Re: Problem with Altering a table column In-reply-to: <825474461.1387396.1576738664403@mail.yahoo.com> References: <825474461.1387396.1576738664403.ref@mail.yahoo.com> <825474461.1387396.1576738664403@mail.yahoo.com> Comments: In-reply-to Douglas Reed message dated "Thu, 19 Dec 2019 06:57:44 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <7121.1576763323.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 19 Dec 2019 08:48:43 -0500 Message-ID: <7122.1576763323@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Douglas Reed writes: > I have issued and alter column against the following; > =C2=A0price_id=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| integer=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| not null defa= ult nextval('bet.price_price_id_seq'::regclass) | plain=C2=A0 =C2=A0|=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | > ALTER TABLE bet.price ALTER COLUMN price_id TYPE bigint; > The process has taken a very long time, I know that it is rebuilding the= table and a lot of temp files have been created, deleted etc > It now seems to have gone quiet (no temp disk files etc), it still seems= to be clicking up CPU > - Is there a final part of the process where it may just be doing valida= tion etc? Foreign key revalidation maybe ... does this column participate in any foreign keys? > - Is it safe to terminate the process? Yeah, but you'd lose all the work done so far. regards, tom lane