Re: Use of ActiveSnapshot
От | Jan Wieck |
---|---|
Тема | Re: Use of ActiveSnapshot |
Дата | |
Msg-id | 4648C427.5010509@Yahoo.com обсуждение исходный текст |
Ответ на | Re: Use of ActiveSnapshot (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Use of ActiveSnapshot
|
Список | pgsql-hackers |
On 5/14/2007 3:35 PM, Tom Lane wrote: > Jan Wieck <JanWieck@Yahoo.com> writes: >> The only problem with that is that there are code paths that set >> ActiveSnapshot to palloc()'d memory that is released due to a >> MemoryContextDelete() without resetting ActiveSnapshot to NULL. > > Only at the very end of a transaction (where ActiveSnapshot *is* reset > to null, in FreeXactSnapshot); otherwise we'd have bugs unrelated to > RevalidateCachedPlan. Eventually I would like to have reference-counted > snapshots managed by a centralized module, as was discussed a month or > two back; but right at the moment I don't think it's broken and I don't > want to spend time on intermediate solutions. Which means that the 8.3 fix for the reproducible backend crash, I posted earlier, is to have SPI_cursor_open() save and restore ActiveSnapshot while calling RevalidateCachedPlan(). I'll cross check that this fixes this symptom and commit later today. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #
В списке pgsql-hackers по дате отправления: