Re: Upgrade questions - Mailing list pgsql-general

From Tim Uckun
Subject Re: Upgrade questions
Date
Msg-id CAGuHJrPkjQkJDe19zLJk62jSFryK51uLLQnGOa9d6LMR=LDMOw@mail.gmail.com
Whole thread Raw
In response to Upgrade questions  (Carson Gross <carsongross@gmail.com>)
Responses Re: Upgrade questions  (John R Pierce <pierce@hogranch.com>)
List 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..

pgsql-general by date:

Previous
From: Tim Uckun
Date:
Subject: Re: full text search and ILIKE type clauses.
Next
From:
Date:
Subject: Re: full text search and ILIKE type clauses.