Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Tom Lane wrote:
>> Sooner or later we are going to need to go to 8-byte TOAST object
>> identifiers. Maybe we should think about doing that sooner not later
>> rather than trying to invent some anti-wraparound solution here.
> Umm, it seems to me like we need this fixed in supported branches, not
> just 9.7, so I don't think 8-byte toast IDs are a reasonable solution at
> this point.
I think the problem is pretty hypothetical until you get to consuming a
substantial part of the OID space within any one toast table, at which
point you're going to need 8-byte toast OIDs. Improving that situation
seems like something we can define as a future feature.
(Note that I do not believe for a moment that Andres has actually
exhibited such a problem in his test case. He'd have needed several
TB worth of TOAST space to get to that point.)
>> In principle, you could support existing TOAST tables and pointers
>> containing 4-byte IDs in parallel with the new ones. Not sure how
>> pg_upgrade would handle it exactly though.
> I suppose the real problem is that there's no way to have a mix of 4-
> and 8-byte identifiers in the same toast table. I suppose we could have
> two toast tables for each regular table, but that sounds pretty painful.
Hmm. It's not impossible by any means, since you could tell by looking
at a toast OID which table it was in. And that way might provide a less
painful upgrade process for an existing table that grew to the point of
needing bigger OIDs.
regards, tom lane