Re: Fix some inconsistencies with open-coded visibilitymap_set() callers

2025-07-10 Thread Robert Haas
On Thu, Jul 10, 2025 at 9:57 AM Melanie Plageman wrote: > A direct translation of this would be to add a boolean parameter to > visibilitymap_set() like "heap_page_modified" or "set_heap_lsn". Is > that along the lines you were thinking? Yeah, something like that. I haven't thought through the de

Re: Fix some inconsistencies with open-coded visibilitymap_set() callers

2025-07-10 Thread Melanie Plageman
On Mon, Jul 7, 2025 at 11:38 AM Robert Haas wrote: > > On Wed, Jul 2, 2025 at 7:33 PM Melanie Plageman > wrote: > > > One thing we could do is check if the heap buffer is dirty before > > setting the LSN in visibilitymap_set(): > > I don't think this is the way. visibilitymap_set() shouldn't gues

Re: Fix some inconsistencies with open-coded visibilitymap_set() callers

2025-07-07 Thread Robert Haas
On Wed, Jul 2, 2025 at 7:33 PM Melanie Plageman wrote: > > I think this might actually be an underlying design problem with the > > patch -- heap_page_set_vm_and_log() seems to want to be in charge of > > both what we do with the heap page and what we do with the > > corresponding VM bit, but that

Re: Fix some inconsistencies with open-coded visibilitymap_set() callers

2025-07-02 Thread Melanie Plageman
On Mon, Jun 30, 2025 at 3:01 PM Robert Haas wrote: > > I'm pretty concerned about this change: > > /* > * If the page is all visible, need to clear that, unless we're only > * going to add further frozen rows to it. > * > * If we're only adding alre

Re: Fix some inconsistencies with open-coded visibilitymap_set() callers

2025-06-30 Thread Robert Haas
On Thu, Jun 26, 2025 at 3:56 PM Melanie Plageman wrote: > Here is a rebased version of this (it had some conflicts with recent commits). One general complaint is that the commit message complains about the status quo but isn't real clear about what the patch is actually fixing. I'm pretty concer

Re: Fix some inconsistencies with open-coded visibilitymap_set() callers

2025-06-26 Thread Melanie Plageman
On Tue, Jun 24, 2025 at 4:01 PM Melanie Plageman wrote: > > visibilitymap_set() arguably breaks a few of the coding rules for > modifying and WAL logging buffers set out in > src/backend/access/transam/README. Here is a rebased version of this (it had some conflicts with recent commits). - Melan

Fix some inconsistencies with open-coded visibilitymap_set() callers

2025-06-24 Thread Melanie Plageman
Hi, visibilitymap_set() arguably breaks a few of the coding rules for modifying and WAL logging buffers set out in src/backend/access/transam/README. In 4 of visibilitymap_set()'s 5 non-recovery callers, we set PD_ALL_VISIBLE and mark the heap buffer dirty outside of the critical section in which