Re: BUG #9606: pg_class relhaspkey column not updated on removal of primary key

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Frost <jeff(at)pgexperts(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9606: pg_class relhaspkey column not updated on removal of primary key
Date: 2014-03-18 01:21:19
Message-ID: 14341.1395105679@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jeff Frost <jeff(at)pgexperts(dot)com> writes:
> Interestingly, on 9.1.11, I have a table where the pkey was added after the fact, then dropped, but it still shows as relhaspkey even though I manually vacuumed it:

IIRC, VACUUM only clears relhaspkey if there are *no* indexes left --- it
doesn't bother to check whether there's one calling itself indisprimary.
We could possibly change that but it's not clear that it's worth any
effort, given that the column would still have to be defined the same
way.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message YAMAMOTO Takashi 2014-03-18 01:30:42 Re: relcache reference leak on refresh materialized view concurrently
Previous Message Tom Lane 2014-03-18 01:18:28 Re: pg 9.3 exists subselect with limit brakes query plan