On 02.12.25 02:11, Chao Li wrote:
<0001-Use-PG_IO_ALIGN_SIZE-for-aligning-WAL-buffers.patch><0002-Use-PGAlignedXLogBlock-in-BootStrapXLOG.patch><0003-pg_test_fsync-Align-test-data-using-PGAlignedXLogBlo.patch>
Overall the patch looks good to me:
I have committed these all as one patch. Initially I thought the first
patch might be worth backpatching, but it seems that's not needed.
0001 fixes two overlooked alignment to PG_IO_ALIGN_SIZE
0002 switches BootStrapXLOG to use PGAlignedXLogBlock, which is aligned to
PG_IO_ALIGN_SIZE
0003 does the same for pg_test_fsync
My only nit comment is in 0002:
```
- memset(page, 0, XLOG_BLCKSZ);
+ memset(&buffer, 0, sizeof buffer);
```
I know “sizeof” is an operator instead of a function, “sizeof buffer” is
grammatically correct. However, most of places do “sizeof(buffer)”, so unless
we want to prompt the syntax of “sizeof buffer” (without the braces), it’s
better to keep a consistent syntax.
The style without parentheses is not non-existent in PostgreSQL code, so
I think we can use it when appropriate.