Re: Upgrade questions

From: Tim Uckun <timuckun(at)gmail(dot)com>
To: Carson Gross <carsongross(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Upgrade questions
Date: 2012-03-12 20:25:45
Message-ID: CAGuHJrPkjQkJDe19zLJk62jSFryK51uLLQnGOa9d6LMR=LDMOw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> However, given the size of this table, I have no idea how long something
> like this might take.  In general I've had a tough time getting feedback
> from postgres on the progress of a query, how long something might take,
> etc.
>

You can always do this which would result in minimum hassles.

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

That last bit could be done in a transaction and hopefully should not
take very long at a..

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mgould 2012-03-12 20:38:21 Re: full text search and ILIKE type clauses.
Previous Message Tim Uckun 2012-03-12 20:20:31 Re: full text search and ILIKE type clauses.