Re: Converting non-null unique idx to pkey - Mailing list pgsql-general

From Ed L.
Subject Re: Converting non-null unique idx to pkey
Date
Msg-id 200708211810.06165.pgsql@bluepolka.net
Whole thread Raw
In response to Re: Converting non-null unique idx to pkey  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Responses Re: Converting non-null unique idx to pkey  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Re: Converting non-null unique idx to pkey  (Alban Hertroys <alban@magproductions.nl>)
List 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

pgsql-general by date:

Previous
From: "Andrej Ricnik-Bay"
Date:
Subject: Re: PG Seg Faults Performing a Query
Next
From: "Merlin Moncure"
Date:
Subject: Re: Pgcluster 1.7 Fail safe !!!