Re: Converting non-null unique idx to pkey

From: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
To: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: Postgres-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Converting non-null unique idx to pkey
Date: 2007-08-22 00:10:05
Message-ID: 200708211810.06165.pgsql@bluepolka.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 21 August 2007 1:45 pm, Scott Marlowe wrote:
> If you have a large db in 7.4.6, you should do two things.
>
> 1: Update to 7.4.19 or whatever the latest flavor of 7.4 is,
> right now. There are a few known data eating bugs in 7.4.6.

Sounds like good advice from a strictly technical viewpoint.
Unfortunately, in our particular real world, there are also
political, financial, and resource constraints and impacts from
downtime that at times outweigh the technical merits of
upgrading 'right now'.

> > update pg_index
> > set indisprimary = 't'
> > where indexrelid = <my non-null unique index oid>
>
> I wouldn't bet on that working right. Others know the
> internals of the db better than me, but that looks like a foot
> gun.

I'd still love to hear from any who know the internals well
enough to say if this should work or if it's a bad idea. It
appears to work in some cursory testing.

TIA.
Ed

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2007-08-22 01:27:32 Re: Pgcluster 1.7 Fail safe !!!
Previous Message Andrej Ricnik-Bay 2007-08-21 21:46:21 Re: PG Seg Faults Performing a Query