Re: Upgrade questions

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Upgrade questions
Date: 2012-03-12 21:18:52
Message-ID: 4F5E683C.4090507@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/12/12 1:25 PM, Tim Uckun wrote:
> create a new bigint field.
> copy all the IDs to it.
> index it in the background
> at frequency of your choosing sync the id field to the new field to keep it up.
> at a time of your choosing set the default for the new field to be
> serial starting at max(id)
> drop the ID field
> rename the field to id

if there's other tables that have FK references to this table's ID, that
could be problematic.

--
john r pierce N 37, W 122
santa cruz ca mid-left coast

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Reichstadt 2012-03-12 21:19:46 Re: GROUP BY or alternative means to group
Previous Message Pavel Stehule 2012-03-12 21:14:47 Re: full text search and ILIKE type clauses.