Open huey97 opened 2 months ago
CREATE INDEX idx ON public.test_table USING rum (h, m rum_tsvector_addon_ops) WITH (ATTACH='h', TO='m') WHERE a < 20000; will failed with "cannot store a toast pointer inside a range" in rumdatapage.c:115。
CREATE INDEX idx ON public.test_table USING rum (h, m rum_tsvector_addon_ops) WITH (ATTACH='h', TO='m') WHERE a < 40000 will coredump at "elog(ERROR, "cannot store a toast pointer inside a range");" in rumdatapage.c:115. The reason for coredump via ERROR here is that createPostingTree is in START_CRIT_SECTION() of ruminsert.c:67; The coredump is generated in subsequent errors.
Database Version: PostgreSQL 14.12 RUM extension version: rum 1.3 VECTOR extension: vector 0.6.2 Operating System: RHEL 8
The structure of the tables in the database is as follows: create extension rum; create extension vector; CREATE TABLE test_table ( a bigint, b character varying(32), c character varying(32), d character varying(32), e smallint, f character varying(64), g timestamp, h text[], i integer, j text, k public.vector(1536), l text, m tsvector, n smallint, p timestamp, q timestamp );
For security reasons, the data in the table cannot be provided directly. I found that when I inserted 40,000 or so rows into the table, the create index behaved differently as the amount of data changed.
CREATE INDEX idx ON public.test_table USING rum (h, m rum_tsvector_addon_ops) WITH (ATTACH='h', TO='m') WHERE id < 20000; will failed with "cannot store a toast pointer inside a range" in rumdatapage.c:115。
CREATE INDEX idx ON public.test_table USING rum (h, m rum_tsvector_addon_ops) WITH (ATTACH='h', TO='m') WHERE id < 40000 will coredump at "elog(ERROR, "cannot store a toast pointer inside a range");" in rumdatapage.c:115. The reason for coredump via ERROR here is that createPostingTree is in START_CRIT_SECTION() of ruminsert.c:67; The coredump is generated in subsequent errors.
The coredump stack is as follows: SQL: CREATE INDEX idx ON public.test_table USING rum (h, m rum_tsvector_addon_ops) WITH (ATTACH='h', TO='m');
0 0x00007efd1ad2b9d5 in raise () from /lib64/libc.so.6
1 0x00007efd1ad14894 in abort () from /lib64/libc.so.6
2 0x0000000000e352c0 in errfinish (filename=0x7efc90b5da77 "rumdatapage.c", lineno=115,
3 0x00007efc90b3aed9 in rumDatumWrite (ptr=0x7efca521402b "", datum=139623223228960, typbyval=false,
4 0x00007efc90b3b465 in rumPlaceToDataPageLeaf (ptr=0x7efca521402b "", attnum=2, item=0x3f2a560,
5 0x00007efc90b4a5d8 in createPostingTree (rumstate=0x7ffdc605c580, attnum=2, index=0x7efc90b898d0,
6 0x00007efc90b4afdc in buildFreshLeafTuple (rumstate=0x7ffdc605c580, attnum=2, key=139623223243288,
7 0x00007efc90b4b487 in rumEntryInsert (rumstate=0x7ffdc605c580, attnum=2, key=139623223243288,
8 0x00007efc90b4b9fb in rumBuildCallback (index=0x7efc90b898d0, tid=0x33879a4, values=0x33897f8,
9 0x000000000054ba31 in heapam_index_build_range_scan (heapRelation=0x7efc90b79f38,
10 0x00007efc90b4a297 in table_index_build_scan (table_rel=0x7efc90b79f38, index_rel=0x7efc90b898d0,
11 0x00007efc90b4bd16 in rumbuild (heap=0x7efc90b79f38, index=0x7efc90b898d0, indexInfo=0x329cc10)
12 0x00000000006917b0 in index_build (heapRelation=0x7efc90b79f38, indexRelation=0x7efc90b898d0,
13 0x000000000068dcd3 in index_create (heapRelation=0x7efc90b79f38,
14 0x000000000082722f in DefineIndex (relationId=18788, stmt=0x3243010, indexRelationId=0,