Help to review the with X cursor option.

Поиск
Список
Период
Сортировка
От alex lock
Тема Help to review the with X cursor option.
Дата
Msg-id CALi0+Bo_QDZ5GtbrAhnMvNN+-Xfjdf_65Ei2xx=OME=MyTH50Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Help to review the with X cursor option.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
The cursor means  something like  declare c cursor for select * from t;
The holdable cursor means declare c cursor WITH HOLD for select * from t;

Holdable cursor is good at transaction,  user can still access it after the transaction is commit.  But it is bad at it have to save all the record to tuple store before we fetch 1 row.

what I want is:
1.   The cursor is still be able to fetch after the transaction is committed. 
2.   the cursor will not fetch the data when fetch statement is issue (just like non-holdable cursor).

I called this as with X cursor.. 

I check the current implementation and think it would be possible with the following methods:
1.   allocate the memory  in a  {LongerMemoryContext}, like EState  to prevent they are 
2.   allocate a more bigger resource owner to prevent the LockReleaseAll during CommitTransaction.
3.   add the "with X" option to cursor so that Precommit_portals will not drop it during CommitTransaction.

Before I implement it,  could you give some suggestions?  

Thanks!

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: finding changed blocks using WAL scanning
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: block-level incremental backup