From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Legacy GiST invalid tuples |
Date: | 2018-07-04 20:48:05 |
Message-ID: | 20180704204805.hz22dxueaz5kadrp@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2018-07-04 16:43:19 -0400, Alvaro Herrera wrote:
> On 2018-Jul-04, Tom Lane wrote:
>
> > Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > > 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.
> >
> > Perhaps VACUUM could be taught to clean up invalid entries? That
> > wouldn't help Andrey's unstated goal of being able to re-use the bits
> > for some other purpose in v12, but it might be practical to re-use
> > them sometime sooner than v17.
>
> We tried to clean up HEAP_MOVED_IN / HEAP_MOVED_OFF a long time ago, but
> gave up :-) I recall Andres posted a write-up about adding columns to
> pg_class to indicate "what version did last vacuum this whole table", as
> a marker for features that are no longer needed.
Right. I plan to pick that up as soon as I've some free cycles. I'd not
object to somebody else working on it first though.
> Maybe that idea can be reused for this purpose.
Yes, I think that's explicitly in scope.
> I'm thinking pg_upgrade can use its --check phase to look for indexes
> marked as older than X (possibly containing invalid tuples), so it
> instructs the user to run vacuum on it prior to the upgrade.
I kinda wondered about making the feature back-patchable (by storing the
version in reloptions or such), but I think that'd just make it less
likely to get in.
> I think the soonest this can work is to add the column in pg12 so that
> it can be used to upgrade to pg13.
I don't think we can easily require that everyone pg_upgrading to v13+
upgrades to v12 first?
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-07-04 21:00:56 | Re: Should contrib modules install .h files? |
Previous Message | Simon Muller | 2018-07-04 20:44:32 | Re: Allow COPY's 'text' format to output a header |