pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem with Altering a table column
2+ messages / 2 participants
[nested] [flat]

* Problem with Altering a table column
@ 2019-12-19 06:57 Douglas Reed <dougreed765@yahoo.com>
  2019-12-19 13:48 ` Re: Problem with Altering a table column Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Douglas Reed @ 2019-12-19 06:57 UTC (permalink / raw)
  To: pgsql-admin; +Cc: Douglas Reed <douglas@fsbtech.com>

Version 9.5
OS Centos 6 running on a VM
I have a large table (over 100Gb including indexes) 
The machine is slow
I have issued and alter column against the following;
 price_id         | integer                     | not null default nextval('bet.price_price_id_seq'::regclass) | plain   |              |

As;
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 validation etc?
- Is it safe to terminate the process?
Many thanks



Doug Reed dougreed765@yahoo.com 07973-132664https://uk.linkedin.com/pub/douglas-reed/33/326/2b

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Problem with Altering a table column
  2019-12-19 06:57 Problem with Altering a table column Douglas Reed <dougreed765@yahoo.com>
@ 2019-12-19 13:48 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2019-12-19 13:48 UTC (permalink / raw)
  To: Douglas Reed <dougreed765@yahoo.com>; +Cc: pgsql-admin; Douglas Reed <douglas@fsbtech.com>

Douglas Reed <dougreed765@yahoo.com> writes:
> I have issued and alter column against the following;
>  price_id         | integer                     | not null default nextval('bet.price_price_id_seq'::regclass) | plain   |              |
> 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 validation 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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-12-19 13:48 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19 06:57 Problem with Altering a table column Douglas Reed <dougreed765@yahoo.com>
2019-12-19 13:48 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox