Re: Return value of XLogInsertRecord() for XLOG_SWITCH record
cca5507 <cca5507@qq.com>
From: cca5507 <cca5507@qq.com>
To: 반지현 <rring0727@gmail.com>, pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-21T11:35:58Z
Lists: pgsql-hackers
Attachments
- v2-0001-Keep-the-return-value-of-XLogInsertRecord-for-XLO.patch (application/octet-stream) patch v2-0001
Hi, thanks for the test! > One question: > The original code did not apply MAXALIGN() to SizeOfXLogRecord before > adding it. In practice SizeOfXLogRecord is likely already MAXALIGN'd > (given typical record header layout), but could you confirm whether > MAXALIGN() here is a correctness fix, a defensive no-op, or something > that requires a separate note in the commit message? > > Otherwise the change looks good to me, and I think it's a reasonable > cleanup. I apply the MAXALIGN() to keep it consistent with ReserveXLogSwitch(), the value seems unchanged though. Attach v2 which is more efficient. -- Regards, ChangAo Chen
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Undo thinko in commit e78d1d6d4.
- 9d141466ff08 19 (unreleased) cited
-
Fix orphaned processes when startup process fails during PM_STARTUP
- 9b43e6793b0f 19 (unreleased) cited