Re: [GENERAL] Speed of conversion from int to bigint

2017-09-29 Thread Jehan-Guillaume (ioguix) de Rorthais
On Wed, 27 Sep 2017 11:31:54 +0200 Tomas Vondra wrote: > On 09/27/2017 10:08 AM, Jonathan Moules wrote: > > Hi, > > (Postgres 9.5 and 9.6) > > We have a table of about 650million rows. It's a partitioned table, with > > two "child" tables. We want to change its primary key type from int to > > bi

Re: [GENERAL] Speed of conversion from int to bigint

2017-09-27 Thread George Neuner
Tomas's suggestion definitely is the better if you're altering the type of a single column. If you need to make more extensive changes to the table structure, copying usually is the better way to go. George -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Speed of conversion from int to bigint

2017-09-27 Thread George Neuner
On Wed, 27 Sep 2017 09:08:25 +0100, Jonathan Moules wrote: >Hi, >(Postgres 9.5 and 9.6) >We have a table of about 650million rows. It's a partitioned table, >with two "child" tables. We want to change its primary key type >from int to bigint while retaining the current values. > >We're using this

Re: [GENERAL] Speed of conversion from int to bigint

2017-09-27 Thread Tomas Vondra
On 09/27/2017 10:08 AM, Jonathan Moules wrote: > Hi, > (Postgres 9.5 and 9.6) > We have a table of about 650million rows. It's a partitioned table, with > two "child" tables. We want to change its primary key type from int to > bigint while retaining the current values. > > We're using this: >

[GENERAL] Speed of conversion from int to bigint

2017-09-27 Thread Jonathan Moules
Hi, (Postgres 9.5 and 9.6) We have a table of about 650million rows. It's a partitioned table, with two "child" tables. We want to change its primary key type from int to bigint while retaining the current values. We're using this: ALTER TABLE dta.my_table ALTER column table_id TYPE bigint; Bu