pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
fix prev link in docs
8+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2026-06-18 f0a5c4fbfc 5562b2657f 1fec5ddfdc 6776978ce8 cfeb0b2b30 1d216f1e77  doc: Fix "Prev" link, take 2.
  2026-06-15 9fc2f1995f 6678b58d78 85e6624c06 924172c565 1c4ba21685 d018e927bc  doc: Fix "Prev" link.
* fix prev link in docs
@ 2026-06-10 19:16  Nathan Bossart <nathandbossart@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Nathan Bossart @ 2026-06-10 19:16 UTC (permalink / raw)
  To: pgsql-hackers

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.patch (text/plain, 854B) download From b874600ab6df9252b04ea4b9d98ece2e1f917850 Mon Sep 17 00:00:00 2001 From: Nathan Bossart <nathan@postgresql.org> Date: Wed, 10 Jun 2026 14:14:45 -0500 Subject: [PATCH v1 1/1] fix prev link in docs --- doc/src/sgml/stylesheet-speedup-xhtml.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/sgml/stylesheet-speedup-xhtml.xsl b/doc/src/sgml/stylesheet-speedup-xhtml.xsl index da0f2b5a970..a3b3692ba03 100644 --- a/doc/src/sgml/stylesheet-speedup-xhtml.xsl +++ b/doc/src/sgml/stylesheet-speedup-xhtml.xsl @@ -208,7 +208,7 @@ |ancestor::article[1] |ancestor::topic[1] |preceding::sect1[1] - |ancestor::sect1[1])[last()]"/> + |ancestor::sect1[1])[position()=last()]"/> <xsl:variable name="next" select="(following::book[1] -- 2.50.1 (Apple Git-155)
^ permalink raw reply [nested|flat] 8+ messages in thread

* Re: fix prev link in docs
@ 2026-06-12 20:44  Ayush Tiwari <ayushtiwari.slg01@gmail.com>
  parent: Nathan Bossart <nathandbossart@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Ayush Tiwari @ 2026-06-12 20:44 UTC (permalink / raw)
  To: Nathan Bossart <nathandbossart@gmail.com>; +Cc: pgsql-hackers

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

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: fix prev link in docs
@ 2026-06-15 17:20  Nathan Bossart <nathandbossart@gmail.com>
  parent: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Nathan Bossart @ 2026-06-15 17:20 UTC (permalink / raw)
  To: Ayush Tiwari <ayushtiwari.slg01@gmail.com>; +Cc: pgsql-hackers

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





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: fix prev link in docs
@ 2026-06-17 17:40  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Nathan Bossart <nathandbossart@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Tom Lane @ 2026-06-17 17:40 UTC (permalink / raw)
  To: Nathan Bossart <nathandbossart@gmail.com>; +Cc: Ayush Tiwari <ayushtiwari.slg01@gmail.com>; pgsql-hackers

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:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=guaibasaurus&dt=2026-06-15%2012%3A20%3A0...

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=guaibasaurus&dt=2026-06-15%2020%3A20%3A0...

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





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: fix prev link in docs
@ 2026-06-17 17:47  Nathan Bossart <nathandbossart@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 8+ messages in thread

From: Nathan Bossart @ 2026-06-17 17:47 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Ayush Tiwari <ayushtiwari.slg01@gmail.com>; pgsql-hackers

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%3A0...
> 
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=guaibasaurus&dt=2026-06-15%2020%3A20%3A0...
> 
> 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





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: fix prev link in docs
@ 2026-06-17 19:16  Nathan Bossart <nathandbossart@gmail.com>
  parent: Nathan Bossart <nathandbossart@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Nathan Bossart @ 2026-06-17 19:16 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Ayush Tiwari <ayushtiwari.slg01@gmail.com>; pgsql-hackers

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.patch (text/plain, 3.1K) download From 35799a190e8a43a78df7ce1ef3f53ebea97dffe0 Mon Sep 17 00:00:00 2001 From: Nathan Bossart <nathan@postgresql.org> Date: Wed, 17 Jun 2026 14:14:43 -0500 Subject: [PATCH v2 1/1] fix prev link, take 2 --- doc/src/sgml/stylesheet-speedup-xhtml.xsl | 52 +++++++++++------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/doc/src/sgml/stylesheet-speedup-xhtml.xsl b/doc/src/sgml/stylesheet-speedup-xhtml.xsl index a3b3692ba03..0700023c47b 100644 --- a/doc/src/sgml/stylesheet-speedup-xhtml.xsl +++ b/doc/src/sgml/stylesheet-speedup-xhtml.xsl @@ -183,32 +183,32 @@ </xsl:if> <xsl:variable name="prev" - select="(preceding::book[1] - |preceding::preface[1] - |preceding::chapter[1] - |preceding::appendix[1] - |preceding::part[1] - |preceding::reference[1] - |preceding::refentry[1] - |preceding::colophon[1] - |preceding::article[1] - |preceding::topic[1] - |preceding::bibliography[parent::article or parent::book or parent::part][1] - |preceding::glossary[parent::article or parent::book or parent::part][1] - |preceding::index[$generate.index != 0] - [parent::article or parent::book or parent::part][1] - |preceding::setindex[$generate.index != 0][1] - |ancestor::set - |ancestor::book[1] - |ancestor::preface[1] - |ancestor::chapter[1] - |ancestor::appendix[1] - |ancestor::part[1] - |ancestor::reference[1] - |ancestor::article[1] - |ancestor::topic[1] - |preceding::sect1[1] - |ancestor::sect1[1])[position()=last()]"/> + select="(preceding::*[self::book + or self::preface + or self::chapter + or self::appendix + or self::part + or self::reference + or self::refentry + or self::colophon + or self::article + or self::topic + or self::bibliography[parent::article or parent::book or parent::part] + or self ::glossary[parent::article or parent::book or parent::part] + or self::index[$generate.index != 0] + [parent::article or parent::book or parent::part] + or self::setindex[$generate.index != 0] + or self::sect1][1] + |ancestor::*[self::set + or self::book + or self::preface + or self::chapter + or self::appendix + or self::part + or self::reference + or self::article + or self::topic + or self::sect1][1])[last()]"/> <xsl:variable name="next" select="(following::book[1] -- 2.50.1 (Apple Git-155)
^ permalink raw reply [nested|flat] 8+ messages in thread

* Re: fix prev link in docs
@ 2026-06-17 19:25  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Nathan Bossart <nathandbossart@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Tom Lane @ 2026-06-17 19:25 UTC (permalink / raw)
  To: Nathan Bossart <nathandbossart@gmail.com>; +Cc: Ayush Tiwari <ayushtiwari.slg01@gmail.com>; pgsql-hackers

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





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: fix prev link in docs
@ 2026-06-18 14:34  Nathan Bossart <nathandbossart@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 8+ messages in thread

From: Nathan Bossart @ 2026-06-18 14:34 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Ayush Tiwari <ayushtiwari.slg01@gmail.com>; pgsql-hackers

On Wed, Jun 17, 2026 at 03:25:41PM -0400, Tom Lane wrote:
> Fixes the build-time problem for me, thanks!

Committed.

-- 
nathan





^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2026-06-18 14:34 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-06-10 19:16 fix prev link in docs Nathan Bossart <nathandbossart@gmail.com>
2026-06-12 20:44 ` Ayush Tiwari <ayushtiwari.slg01@gmail.com>
2026-06-15 17:20   ` Nathan Bossart <nathandbossart@gmail.com>
2026-06-17 17:40     ` Tom Lane <tgl@sss.pgh.pa.us>
2026-06-17 17:47       ` Nathan Bossart <nathandbossart@gmail.com>
2026-06-17 19:16         ` Nathan Bossart <nathandbossart@gmail.com>
2026-06-17 19:25           ` Tom Lane <tgl@sss.pgh.pa.us>
2026-06-18 14:34             ` Nathan Bossart <nathandbossart@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox