| От | Tom Lane |
|---|---|
| Тема | Re: Cursors and Transactions, why? |
| Дата | |
| Msg-id | 6930.1081388801@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Cursors and Transactions, why? (Eric Ridge <ebr@tcdi.com>) |
| Список | pgsql-general |
Eric Ridge <ebr@tcdi.com> writes:
> wow. I should go back and read the archives to see if this was
> discussed already, but I can't help but wonder if there's a way to only
> copy pointers to the tuples. I realize VACUUM could screw it up, but
> maybe something could be invented (or re-used) to help guard against
> that.
Still looking for that free lunch, eh?
If you want to leave the tuples on-disk, then you hold a transaction
open to ensure that VACUUM won't whisk them out from under you. That's
what the normal non-HOLD cursor case will do.
If you don't want to leave the tuples on-disk, you have to copy them
someplace. You can do that with a HOLD cursor.
AFAICS any other solution will simply reinvent one or the other of these
techniques.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера