Re: [HACKERS] IndexBuild Function call fcinfo cannot access memory

2017-01-26 Thread Jia Yu
Dear Hackers, I have solved this problem. I just want to post my answer here for people who want to write their own backend index access method. When we write a backend index access method (Let's call this method ABC), we need to implement two interfaces: ABCbuild, ABCbuildcallback. ABCbuild is

Re: [HACKERS] IndexBuild Function call fcinfo cannot access memory

2017-01-23 Thread Jia Yu
Dear Hackers, Sorry for bothering you again! I have migrated my index method from PG 9.5 to PG 9.6.1 as Tom suggested. The same problem still exists. The index works fine if I just call it through my new SQL script in regression test (call "make check"). I am doubting whether this is caused by s

Re: [HACKERS] IndexBuild Function call fcinfo cannot access memory

2017-01-23 Thread Jia Yu
Dear Tom, BTW, my current implementation is on PG 9.5... Thanks, Jia Yu Jia Yu, Ph.D. Student Computer Science Arizona State University Reach me via Jia Yu's Homepage | GitHub Repositories

Re: [HACKERS] IndexBuild Function call fcinfo cannot access memory

2017-01-23 Thread Jia Yu
Dear Tom, Thanks for your reply! Actually, I already compiled the source code with "-O0" and then got those backtraces. The hippobuild function just starts building an index access method and it will call hippobuildcallback to iterate each parent table tuple in its function body. What makes me

Re: [HACKERS] IndexBuild Function call fcinfo cannot access memory

2017-01-23 Thread Tom Lane
Jia Yu writes: > However, these methods don't work in the normal PG server. It gave me > "segmentation fault" > ... > Here is my backtrace. It looks like I cannot access fcinfo. Can you help me > about this? Or just some hints? I have been struggling with this problem > for weeks. What's the prob

[HACKERS] IndexBuild Function call fcinfo cannot access memory

2017-01-23 Thread Jia Yu
Dear hackers, Currently, I am developing a backend index access method for my research project. I built corresponding routines such as MyIndexbuild, MyIndexInsert, and so on and put them in "src/backend/access/hippo" (hippo is my index's name). I also added new entries in corresponding catalog fi