Do not emit FPW for unlogged relations in BRIN empty-page - Mailing list pgsql-hackers

From Kirill Reshke
Subject Do not emit FPW for unlogged relations in BRIN empty-page
Date
Msg-id CALdSSPhpZXVFnWjwEBNcySx_vXtXHwB2g99gE6rK0uRJm-3GgQ@mail.gmail.com
Whole thread Raw
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Fwd: [PATCH] Add zstd compression for TOAST using extended header format
Next
From: Peter Eisentraut
Date:
Subject: Re: pg_dump: Remove trivial usage of PQExpBuffer