On Tue, Mar 9, 2021 at 3:35 PM Peter Geoghegan <p...@bowt.ie> wrote: > Speaking of line pointer bloat (and "irreversible" bloat), I came > across something relevant today. I believe that this recent patch from > Matthias van de Meent is a relatively easy way to improve the > situation: > > https://www.postgresql.org/message-id/flat/CAEze2WjgaQc55Y5f5CQd3L%3DeS5CZcff2Obxp%3DO6pto8-f0hC4w%40mail.gmail.com
I agree, but all you need is one long-lived tuple toward the end of the array and you're stuck never being able to truncate it. It seems like a worthwhile improvement, but whether it actually helps will be workload-dependant. Maybe it'd be OK to allow a much longer array with offsets > some constant being usable only for HOT. HOT tuples are not indexed, so it might be easier to rearrange things to allow compaction of the array if it does happen to get fragmented. But I'm not sure it's OK to relocate even a HOT tuple to a different TID. Can someone, perhaps even just the user, still have a reference to the old one and care about us invalidating it? Maybe. But even if not, I'm not sure this helps much with the situation you're concerned about, which involves non-HOT tuples. -- Robert Haas EDB: http://www.enterprisedb.com