Re: Legacy GiST invalid tuples

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Legacy GiST invalid tuples
Date: 2018-07-04 20:04:01
Message-ID: 20180704200401.ieilriwblpllpsuq@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018-Jul-04, Andrey Borodin wrote:

> Thanks, Tom!
>
> So, I can create the script for pg_upgrade that will walk through each old enough[0] GiST index, scan for invalid tuples and repair them. This procedure seems quite trivial, but there will be more code that we have now. Does it sound reasonable?
>
> [0] Actually, I do not know how to understand which index is old enough.

Requiring a scan of all indexes during pg_upgrade might increase the
upgrade time prohibitively for some sites, so I don't think that's a
good solution.

I think keeping track of which indexes might be old enough not to have
invalid tuples anymore is a good idea in the long run. If we start
doing it in pg12, then by the time pg17 comes about and we abandon pg11
(the one without the cataloguing) then we can retire the code to support
invalid tuples. Most people, come this point, say "naaah this too long,
this project is useless" so the cataloguing is never done :-)

*If* we make it to 2023, that is.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-07-04 20:10:20 Re: Legacy GiST invalid tuples
Previous Message Fujii Masao 2018-07-04 18:10:33 Re: Speedup of relation deletes during recovery