| From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Do not emit FPW for unlogged relations in BRIN empty-page |
| Date: | 2025-12-17 15:13:22 |
| Message-ID: | CALdSSPhpZXVFnWjwEBNcySx_vXtXHwB2g99gE6rK0uRJm-3GgQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| v1-0001-Do-not-emit-FPW-for-unlogged-relations-in-BRIN-em.patch | application/octet-stream | 915 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2025-12-17 15:15:21 | Re: pg_dump: Remove trivial usage of PQExpBuffer |
| Previous Message | Peter Eisentraut | 2025-12-17 15:11:38 | Re: Fwd: [PATCH] Add zstd compression for TOAST using extended header format |