From: | Floris Van Nee <florisvannee(at)Optiver(dot)com> |
---|---|
To: | Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com> |
Cc: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | RE: non-HOT update not looking at FSM for large tuple update |
Date: | 2021-03-09 13:40:29 |
Message-ID: | 9286b2cc8fb74ce3a95133ade715ed17@opammb0562.comp.optiver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
>
> This patch fails to consider that len may be bigger than MaxHeapTupleSize *
> 0.98, which in this case triggers a reproducable
> PANIC:
Good catch! I've adapted the patch with your suggested fix.
>
> One different question I have, though, is why we can't "just" teach vacuum
> to clean up trailing unused line pointers. As in, can't we trim the line pointer
> array when vacuum detects that the trailing line pointers on the page are all
> unused?
>
> The only documentation that I could find that this doesn't happen is in the
> comment on PageIndexTupleDelete and PageRepairFragmentation, both not
> very descriptive on why we can't shrink the page->pd_linp array. One is
> "Unlike heap pages, we compact out the line pointer for the removed tuple."
> (Jan. 2002), and the other is "It doesn't remove unused line pointers! Please
> don't change this." (Oct. 2000), but I can't seem to find the documentation /
> conversations on the implications that such shrinking would have.
>
This is an interesting alternative indeed. I also can't find any documentation/conversation about this and the message is rather cryptic.
Hopefully someone on the list still remembers the reasoning behind this rather cryptic comment in PageRepairFragmentation.
-Floris
Attachment | Content-Type | Size |
---|---|---|
v3-Allow-inserting-tuples-into-almost-empty-pages.patch | application/octet-stream | 3.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Steele | 2021-03-09 13:40:46 | Re: DROP relation IF EXISTS Docs and Tests - Bug Fix |
Previous Message | Euler Taveira | 2021-03-09 13:20:50 | Re: cleanup temporary files after crash |