Re: Improving and extending int128.h to more of numeric.c

From: Andres Freund <andres(at)anarazel(dot)de>
To: John Naylor <johncnaylorls(at)gmail(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Improving and extending int128.h to more of numeric.c
Date: 2025-10-24 14:23:41
Message-ID: da4wqngd6gwz5s4yf5y5f75xj7gpja62l4dbp6w4j3vs7fcjue@upvolcu4e6o2
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2025-07-14 17:22:38 +0700, John Naylor wrote:
> On Thu, Jul 10, 2025 at 9:06 PM Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
> >
> > On Wed, 9 Jul 2025 at 22:31, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
> > >
> > > On Wed, 9 Jul 2025 at 18:27, Andres Freund <andres(at)anarazel(dot)de> wrote:
> > > >
> > > > I think we should wire this up to the buildsystem and our testsuite... Having
> > > > testcode that is not run automatically may be helpful while originally
> > > > developing something, but it doesn't do anything to detect portability issues
> > > > or regressions.
> > >
> > > Yes, perhaps we should convert src/tools/testint128.c into a new test
> > > extension, src/test/modules/test_int128
> >
> > Here's an update doing that (in 0001). 0002-0005 are unchanged.
>
> (Looking at v3) The new test module runs 10 million rather than a
> billion iterations. That still takes 1.2s (after 0005), which seems
> excessive for regular buildfarm testing. It seems like we could get by
> with fewer than that, by using the time of day for the PRNG seed
> (which would also need to be logged on error).

FWIW, there are a few interesting messages on the host of my buildfarm animal:

Aug 19 02:05:31 andres-postgres-buildfarm-v6 kernel: traps: test_int128[1678696] trap divide error ip:55764d59802c sp:7fffc378f7f8 error:0 in test_int128[402c,55764d595000+4000]
Oct 15 03:08:28 andres-postgres-buildfarm-v6 kernel: traps: test_int128[1984641] trap divide error ip:405a8c sp:7ffc41a93c88 error:0 in test_int128[5a8c,401000+5000]
Oct 15 20:02:15 andres-postgres-buildfarm-v6 kernel: traps: test_int128[3346617] trap divide error ip:404b4c sp:7ffc709ab658 error:0 in test_int128[4b4c,401000+4000]

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ivan Bykov 2025-10-24 14:33:22 Re: IPC/MultixactCreation on the Standby server
Previous Message Nathan Bossart 2025-10-24 14:20:38 Re: Feature: psql - display current search_path in prompt