Re: Dealing with dangling index pointers

From: Hannu Krosing <hannu(at)skype(dot)net>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Dealing with dangling index pointers
Date: 2007-07-16 14:33:51
Message-ID: 1184596431.6422.6.camel@hannu-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ühel kenal päeval, E, 2007-07-16 kell 15:23, kirjutas Heikki
Linnakangas:
> While looking at the HOT patch, I noticed that if there's an index tuple
> pointing to a non-existing heap tuple, we just silently ignore it.
>
> Such dangling index entries of course means that your database is
> corrupt, but we ought to handle that better. In the worst case, the heap
> slot is inserted to in the future, and then the bogus index entry points
> to a wrong tuple.
>
> ISTM we should print a warning suggesting a REINDEX, and kill the index
> tuple. Killing tuples in the face of corruption is dangerous, but in
> this case I think it's the right thing to do. We could also just emit
> the warning, but that could fill the logs quickly if the index tuple is
> accessed frequently.

maybe issue a warning and set the DELETED index bit ?

marking the invalid pointer as deleted should make it effectively
disappear from use, without adding too much complexity

-------------
Hannu

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-07-16 14:39:07 Re: Dealing with dangling index pointers
Previous Message Tom Lane 2007-07-16 14:32:18 Re: Dealing with dangling index pointers