fix prev link in docs
Right now, if you go to the following page and click "Prev", it'll send you
to the middle of the previous chapter:
https://www.postgresql.org/docs/devel/bgworker.html
My research indicates that this might caused by a bug in libxml2, but
regardless, a minimal fix is to change the link generation code to use
[position()=last()] instead of [last()] in the predicate on the union of
reverse axes. Patch attached.
--
nathan
Attachments:
v1-0001-fix-prev-link-in-docs.patchtext/plain; charset=us-asciiDownload+1-2
Hi,
On Thu, 11 Jun 2026 at 00:46, Nathan Bossart <nathandbossart@gmail.com>
wrote:
Right now, if you go to the following page and click "Prev", it'll send you
to the middle of the previous chapter:https://www.postgresql.org/docs/devel/bgworker.html
My research indicates that this might caused by a bug in libxml2, but
regardless, a minimal fix is to change the link generation code to use
[position()=last()] instead of [last()] in the predicate on the union of
reverse axes. Patch attached.
Thanks for the patch.
I tested it and with patch the Prev tab works fine towards 45.6.
(previous chapter's end)
Regards,
Ayush
On Sat, Jun 13, 2026 at 02:14:26AM +0530, Ayush Tiwari wrote:
Thanks for the patch.
I tested it and with patch the Prev tab works fine towards 45.6.
(previous chapter's end)
Thanks for reviewing. Committed.
--
nathan
Nathan Bossart <nathandbossart@gmail.com> writes:
On Sat, Jun 13, 2026 at 02:14:26AM +0530, Ayush Tiwari wrote:
I tested it and with patch the Prev tab works fine towards 45.6.
(previous chapter's end)
Thanks for reviewing. Committed.
I noticed that building the HTML docs got really painfully slower
recently, and the reason seems to be this patch. If you look
at guaibasaurus' runtimes for instance:
the time for the "make-doc" step went from 00:46 right before
this patch to 3:39 right afterward. That's consistent with
what I'm seeing locally. I don't find that acceptable.
(Oddly, the time to make PDFs hasn't increased, per BF member
alabio.)
regards, tom lane
On Wed, Jun 17, 2026 at 01:40:07PM -0400, Tom Lane wrote:
I noticed that building the HTML docs got really painfully slower
recently, and the reason seems to be this patch. If you look
at guaibasaurus' runtimes for instance:the time for the "make-doc" step went from 00:46 right before
this patch to 3:39 right afterward. That's consistent with
what I'm seeing locally. I don't find that acceptable.
Oh, interesting. I somehow hadn't noticed that in my testing. I had a
more invasive form of the patch that I think might improve matters.
Double-checking...
--
nathan
On Wed, Jun 17, 2026 at 12:47:04PM -0500, Nathan Bossart wrote:
Oh, interesting. I somehow hadn't noticed that in my testing. I had a
more invasive form of the patch that I think might improve matters.
Double-checking...
The attached should resolve the issue without regressing build time.
--
nathan
Attachments:
v2-0001-fix-prev-link-take-2.patchtext/plain; charset=us-asciiDownload+26-27
Nathan Bossart <nathandbossart@gmail.com> writes:
The attached should resolve the issue without regressing build time.
Fixes the build-time problem for me, thanks!
(I didn't look at the output, except for the head page.)
regards, tom lane