Thread

  1. Do not emit FPW for unlogged relations in BRIN empty-page

    Kirill Reshke <reshkekirill@gmail.com> — 2025-12-17T15:13:22Z

    Hi hackers.
    
    I have been reviewing other patches, and spotted code in
    `brin_initialize_empty_new_buffer`. This function emits FPW for
    newly-initialized BRIN bufferafter `MarkBufferDirty`. It seems to me
    that this is unnecessary for UNLOGGED relations.
    
    I have re-checked instances of `MarkBufferDirty` and it seems to me
    that we always do WAL-logging stuff under RelationNeedsWAL marco,
    except for ambuildempty and few other cases.
    
    This code is hard to hit, so no reproducer here. In my understanding,
    this function executes under some concurrent patterns for index write
    activity. But I did not get when exactly.
    WDYT?
    
    -- 
    Best regards,
    Kirill Reshke