Re: BUG #17888: Incorrect memory access in gist__int_ops for an input array with many elements
От | Richard Guo |
---|---|
Тема | Re: BUG #17888: Incorrect memory access in gist__int_ops for an input array with many elements |
Дата | |
Msg-id | CAMbWs48s6Uhv9wngJVtv=7DGEyN9a-SzwBKsfz2hY7yS6z7ZQw@mail.gmail.com обсуждение исходный текст |
Ответ на | BUG #17888: Incorrect memory access in gist__int_ops for an input array with many elements (PG Bug reporting form <noreply@postgresql.org>) |
Ответы |
Re: BUG #17888: Incorrect memory access in gist__int_ops for an input array with many elements
|
Список | pgsql-bugs |
On Fri, Apr 7, 2023 at 4:21 AM PG Bug reporting form <noreply@postgresql.org> wrote:
The following script:
CREATE EXTENSION intarray;
CREATE TABLE test__int(a int[]);
CREATE INDEX test_idx on test__int using gist (a gist__int_ops);
INSERT INTO test__int SELECT array(SELECT x FROM generate_series(1, 1001) x)
FROM generate_series(1, 10);
causes a server crash:
CREATE INDEX
NOTICE: input array is too big (199 maximum allowed, 1001 current), use
gist__intbig_ops opclass instead
NOTICE: input array is too big (199 maximum allowed, 1001 current), use
gist__intbig_ops opclass instead
NOTICE: input array is too big (199 maximum allowed, 1001 current), use
gist__intbig_ops opclass instead
In g_int_compress,
if (ARRNELEMS(r) >= 2 * num_ranges)
elog(NOTICE, "input array is too big (%d maximum allowed, %d current), use gist__intbig_ops opclass instead",
2 * num_ranges - 1, ARRNELEMS(r));
Wondering why elog with NOTICE rather than Error here.
Thanks
Richard
if (ARRNELEMS(r) >= 2 * num_ranges)
elog(NOTICE, "input array is too big (%d maximum allowed, %d current), use gist__intbig_ops opclass instead",
2 * num_ranges - 1, ARRNELEMS(r));
Wondering why elog with NOTICE rather than Error here.
Thanks
Richard
В списке pgsql-bugs по дате отправления: