From: | ilmari(at)ilmari(dot)org (Dagfinn Ilmari Mannsåker ) |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Daniel Verite" <daniel(at)manitou-mail(dot)org>, "movead(dot)li\(at)highgo(dot)ca" <movead(dot)li(at)highgo(dot)ca>, "ashutosh(dot)bapat" <ashutosh(dot)bapat(at)2ndquadrant(dot)com>, "pgsql-hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: A bug when use get_bit() function for a long bytea string |
Date: | 2020-04-02 21:56:39 |
Message-ID: | 87y2rdtuug.fsf@wibble.ilmari.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> "Daniel Verite" <daniel(at)manitou-mail(dot)org> writes:
>> These 2 tests need to allocate big chunks of contiguous memory, so they
>> might fail for lack of memory on tiny machines, and even when not failing,
>> they're pretty slow to run. Are they worth the trouble?
>
> Yeah, I'd noticed those on previous readings of the patch. They'd almost
> certainly fail on some of our older/smaller buildfarm members, so they're
> not getting committed, even if they didn't require multiple seconds apiece
> to run (even on a machine with plenty of memory). It's useful to have
> them for initial testing though.
Perl's test suite has a similar issue with tests for handling of huge
strings, hashes, arrays, regexes etc. We've taken the approach of
checking the environment variable PERL_TEST_MEMORY and skipping tests
that need more than that many gigabytes. We currently have tests that
check for values from 1 all the way up to 96 GiB.
This would be trivial to do in the Postgres TAP tests, but something
similar might feasible in the pg_regress too?
> It'd be great if there was a way to test get_bit/set_bit on large
> indexes without materializing a couple of multi-hundred-MB objects.
> Can't think of one offhand though.
For this usecase it might make sense to express the limit in megabytes,
and have a policy for how much memory tests can assume without explicit
opt-in from the developer or buildfarm animal.
- ilmari
--
"The surreality of the universe tends towards a maximum" -- Skud's Law
"Never formulate a law or axiom that you're not prepared to live with
the consequences of." -- Skud's Meta-Law
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2020-04-02 22:09:32 | Re: Add A Glossary |
Previous Message | David Zhang | 2020-04-02 21:52:35 | Re: Nicer error when connecting to standby with hot_standby=off |