Re: lazy detoasting
От | Amit Kapila |
---|---|
Тема | Re: lazy detoasting |
Дата | |
Msg-id | CAA4eK1J3acTsfmf8Ufyw0C_rN0OdSo07HnOixKbna+z2YKn7RA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: lazy detoasting (Chapman Flack <chap@anastigmatix.net>) |
Ответы |
Re: lazy detoasting
|
Список | pgsql-hackers |
On Wed, Apr 11, 2018 at 2:34 AM, Chapman Flack <chap@anastigmatix.net> wrote: > On 04/10/2018 04:03 PM, Robert Haas wrote: > >> I suspect you want, or maybe need, to use the same snapshot as the >> scan that retrieved the tuple containing the toasted datum. > > I'm sure it's worth more than that, but I don't know if it's > implementable. > > If I'm a function, and the datum came to me as a parameter, I may > have no way to determine what snapshot the enclosing query used to > obtain the thing passed to me. > Before query execution, we push the active snapshot, so any time during execution, if you get the active snapshot via GetActiveSnapshot(), you can access it. So, I think during a function execution, if you use GetActiveSnapshot, you should get the snapshot used by enclosing query. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: