Re: BUG #16162: create index using gist_trgm_ops leads to panic
От | Alexander Lakhin |
---|---|
Тема | Re: BUG #16162: create index using gist_trgm_ops leads to panic |
Дата | |
Msg-id | d869f537-abe4-d2ea-0510-38cd053f5152@gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #16162: create index using gist_trgm_ops leads to panic (Heikki Linnakangas <hlinnaka@iki.fi>) |
Ответы |
Re: BUG #16162: create index using gist_trgm_ops leads to panic
|
Список | pgsql-bugs |
Hello Heikki, 14.12.2019 1:02, Heikki Linnakangas wrote: > Like Tom suspected at [1], the bug was that the parent page got split, > and the stacked information wasn't updated. The code called > gistFindCorrectParent(), which should've updated the stack, but that > function checked the LSN of the page and did nothing if it matched. To > trigger the bug, you needed to have an insertion that split a page > into three (or more) pages, and inserting the downlink caused the > parent page to split, too. > > Committed a fix. Many thanks for the reproducer scripts, Andreas and > Alexander! The script that I presented in [0] still reproduces assertion failure for me on REL_12_STABLE (fd005e1a): iteration 6 psql:/tmp/test_gist_intarray.sql:2: NOTICE: extension "intarray" already exists, skipping CREATE EXTENSION DROP TABLE CREATE TABLE COPY 7000 INSERT 0 7000 INSERT 0 14000 INSERT 0 28000 INSERT 0 56000 psql:/tmp/test_gist_intarray.sql:10: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. psql:/tmp/test_gist_intarray.sql:10: fatal: connection to server was lost Core was generated by `postgres: law regression [local] CREATE INDEX '. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007f10c0ed4801 in __GI_abort () at abort.c:79 #2 0x000055cfe1d476a6 in ExceptionalCondition ( conditionName=conditionName@entry=0x55cfe1db42a8 "!(((((ItemId) (&((PageHeader) (page))->pd_linp[(todelete) - 1])))->lp_len != 0))", errorType=errorType@entry=0x55cfe1d9e788 "FailedAssertion", fileName=fileName@entry=0x55cfe1db4250 "gistutil.c", lineNumber=lineNumber@entry=70) at assert.c:54 #3 0x000055cfe18e3dc0 in gistnospace (page=page@entry=0x7f10b8705d00 "", itvec=itvec@entry=0x7ffec1b676e0, len=len@entry=2, todelete=todelete@entry=5, freespace=freespace@entry=819) at gistutil.c:70 #4 0x000055cfe18e1301 in gistplacetopage (rel=0x7f10c2006500, freespace=819, giststate=giststate@entry=0x55cfe3934ec0, buffer=920, itup=itup@entry=0x7ffec1b676e0, ntup=ntup@entry=2, oldoffnum=5, newblkno=0x0, leftchildbuf=897, splitinfo=0x7ffec1b67670, markfollowright=true, heapRel=0x7f10c20107a0, is_build=true) at gist.c:257 ... [0] https://www.postgresql.org/message-id/16134-0423f729671dec64%40postgresql.org > > [1] https://www.postgresql.org/message-id/9409.1574617130%40sss.pgh.pa.us > > - Heikki Best regards, Alexander
В списке pgsql-bugs по дате отправления: