Re: Indexscan failed assert caused by using index without lock

2019-03-30 Thread Tom Lane
=?UTF-8?B?6auY5aKe55Cm?= writes: > Following example can reproduce the problem: Yeah, this is being discussed at https://www.postgresql.org/message-id/flat/19465.1541636...@sss.pgh.pa.us regards, tom lane

Indexscan failed assert caused by using index without lock

2019-03-29 Thread 高增琦
Following example can reproduce the problem: ``` create table d(a int); create index di on d(a); set enable_seqscan=off; set enable_bitmapscan to off; prepare p as delete from d where a=3; execute p; execute p; ``` The reason is that: ExecInitIndexScan will not lock index because it thinks InitPl