Re: walsender.c comment with no context is hard to understand
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, vignesh C <vignesh21@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-06-30T23:34:04Z
Lists: pgsql-hackers
Attachments
- v2-0001-Relocate-the-flushptr-checking-code.patch (application/octet-stream) patch v2-0001
On Fri, Jun 28, 2024 at 4:18 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > ... > Shouldn't the check for flushptr (if (flushptr < targetPagePtr + > reqLen)) be moved immediately after the call to WalSndWaitForWal(). > The comment seems to suggests the same: "Make sure we have enough WAL > available before retrieving the current timeline. .." OK, I have changed the code as suggested. Please see the attached v2 patch. make check-world was successful. ====== Kind Regards, Peter Smith. Fujitsu Australia
Commits
-
To improve the code, move the error check in logical_read_xlog_page().
- 571f7f70865c 18.0 landed
-
Allow logical decoding on standbys
- 0fdab27ad68a 16.0 cited
-
Fix walsender to exit promptly if client requests shutdown.
- fca85f8ef157 10.0 cited