Re: Question about the holdable cursor

2019-04-18 Thread Andy Fan
On Thu, Apr 18, 2019 at 10:09 PM Tom Lane wrote: > Andy Fan writes: > > when I fetch from holdable cursor, I found the fact is more complex > than I > > expected. > > ... > > why the 3rd time is necessary and will the performance be bad due to this > > design? > > If you read the whole cursor o

Re: Question about the holdable cursor

2019-04-18 Thread Tom Lane
Andy Fan writes: > when I fetch from holdable cursor, I found the fact is more complex than I > expected. > ... > why the 3rd time is necessary and will the performance be bad due to this > design? If you read the whole cursor output, then close the transaction and persist the cursor, yes we'll

Question about the holdable cursor

2019-04-18 Thread Andy Fan
when I fetch from holdable cursor, I found the fact is more complex than I expected. suppose we fetched 20 rows. 1). It will fill a PortalStore, the dest is not the client, it is the DestTupleStore, called ExecutePlan once and receiveSlot will be call 20 times. 2). the portal for client then