On 06/09/2014 03:46 PM, Andres Freund wrote:
>> >I haven't thought particularly much about this, but I don't really see
>> >why the heap_page_is_all_visible() bit needs to be in a critical
>> >section? Can't we just do that entire bit after the log_heap_clean()?
>> >Then the heap_page_is_all_visible() can be done outside a critical
>> >section.
> Before I start working on a patch along those lines, do you see any
> problems with making the critical section smaller?
One subtle difference is that the PD_ALL_VISIBLE flag will not be
included in the full-page-image that log_heap_page() might take. But
that seems OK. visibilitymap_set() writes a WAL record that sets it at
replay.
- Heikki