Re: CURRENT OF causes an error when IndexOnlyScan is used

2018-03-16 Thread Tom Lane
Yugo Nagata writes: > On Mon, 12 Mar 2018 13:56:24 -0400 > Tom Lane wrote: >> I took a quick look at this, but I'm concerned about a couple of points: > In addition, this patch fixes only nbtree indexes, but the simillar problem > will occur also on GIST

Re: CURRENT OF causes an error when IndexOnlyScan is used

2018-03-15 Thread Yugo Nagata
On Mon, 12 Mar 2018 13:56:24 -0400 Tom Lane wrote: > Anastasia Lubennikova writes: > > [ return_heaptuple_in_btree_indexonlyscan_v2.patch ] > > I took a quick look at this, but I'm concerned about a couple of points: > > 1. What's the

Re: CURRENT OF causes an error when IndexOnlyScan is used

2018-03-12 Thread Tom Lane
Anastasia Lubennikova writes: > [ return_heaptuple_in_btree_indexonlyscan_v2.patch ] I took a quick look at this, but I'm concerned about a couple of points: 1. What's the performance penalty of forming (and then deforming) the added heap tuple? We'd be paying it

Re: CURRENT OF causes an error when IndexOnlyScan is used

2018-02-21 Thread Anastasia Lubennikova
20.02.2018 12:52, Aleksander Alekseev: Hi Anastasia, I'd like to propose the patch that fixes the issue. We already have a way to return heaptuple from IndexOnlyScan, but it was not applied to b-tree for some reason. Attached patch solves the reported bug. Moreover, it will come in handy for

Re: CURRENT OF causes an error when IndexOnlyScan is used

2018-02-19 Thread Anastasia Lubennikova
01.02.2018 05:12, Tom Lane: Yugo Nagata writes: I'm sorry the patch attached in the previous mail is broken and not raises a compile error. I attached the fixed patch. This patch is almost certainly wrong: you can't assume that the scan-level state matches the tuple we

Re: CURRENT OF causes an error when IndexOnlyScan is used

2018-01-31 Thread Yugo Nagata
On Wed, 31 Jan 2018 21:12:51 -0500 Tom Lane wrote: > Yugo Nagata writes: > > I'm sorry the patch attached in the previous mail is broken and > > not raises a compile error. I attached the fixed patch. > > This patch is almost certainly wrong: you can't

Re: CURRENT OF causes an error when IndexOnlyScan is used

2018-01-31 Thread Tom Lane
Yugo Nagata writes: > I'm sorry the patch attached in the previous mail is broken and > not raises a compile error. I attached the fixed patch. This patch is almost certainly wrong: you can't assume that the scan-level state matches the tuple we are currently processing at

Re: CURRENT OF causes an error when IndexOnlyScan is used

2018-01-31 Thread Yugo Nagata
On Thu, 1 Feb 2018 01:33:49 +0900 Yugo Nagata wrote: I'm sorry the patch attached in the previous mail is broken and not raises a compile error. I attached the fixed patch. Regards, > Hi, > > I found that updating a cursor by using CURRENT OF causes the > following error

CURRENT OF causes an error when IndexOnlyScan is used

2018-01-31 Thread Yugo Nagata
Hi, I found that updating a cursor by using CURRENT OF causes the following error when the query is executed by IndexOnlyScan. ERROR: cannot extract system attribute from virtual tuple IndexOnlyScan returns a virtual tuple that doesn't have system column, so we can not get ctid in the same