fix prev link in docs
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
Re: fix prev link in docs
От:
Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Дата:
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
Re: fix prev link in docs
От:
Nathan Bossart <nathandbossart@gmail.com>
Дата:
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
Re: fix prev link in docs
От:
Nathan Bossart <nathandbossart@gmail.com>
Дата:
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: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=guaibasaurus&dt=2026-06-15%2012%3A20%3A02 > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=guaibasaurus&dt=2026-06-15%2020%3A20%3A02 > > 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
Re: fix prev link in docs
От:
Nathan Bossart <nathandbossart@gmail.com>
Дата:
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