Re: COPY FREEZE and setting PD_ALL_VISIBLE/visibility map bits - Mailing list pgsql-hackers

From Andres Freund
Subject Re: COPY FREEZE and setting PD_ALL_VISIBLE/visibility map bits
Date
Msg-id 20190404214520.7rfufsubxekodypr@alap3.anarazel.de
Whole thread Raw
In response to Re: COPY FREEZE and setting PD_ALL_VISIBLE/visibility map bits  (Andres Freund <andres@anarazel.de>)
Responses Re: COPY FREEZE and setting PD_ALL_VISIBLE/visibility map bits
List pgsql-hackers
Hi,

On 2019-04-04 12:23:08 -0700, Andres Freund wrote:
> Also, how is this code even close to correct?
> CheckAndSetPageAllVisible() modifies the buffer in a crucial way, and
> there's no WAL logging? Without even a comment arguing why that's OK (I
> don't think it is)?

Peter Geoghegan just reminded me over IM that there's actually logging
inside log_heap_visible(), called from visibilitymap_set(). Still lacks
a critical section though.

I still think this is the wrong architecture.

Greetings,

Andres Freund

PS: We're going to have to revamp visibilitymap_set() soon-ish - the
fact that it directly calls heap routines inside is bad, means that
additional AMs e.g. zheap has to reimplement that routine.



pgsql-hackers by date:

Previous
From: "Bossart, Nathan"
Date:
Subject: Re: New vacuum option to do only freezing
Next
From: Thomas Munro
Date:
Subject: Re: Refactoring the checkpointer's fsync request queue