relcache refcount
От | Alvaro Herrera |
---|---|
Тема | relcache refcount |
Дата | |
Msg-id | 20040513035229.GA25233@dcc.uchile.cl обсуждение исходный текст |
Ответы |
Re: relcache refcount
|
Список | pgsql-hackers |
Hackers, I'm stuck trying to figure out how to decrease reference counting for relcache entries at subtransaction abort. Initially I thought I could just drop them all to zero, because a subtransaction boundary should be enough warranty that the entries are no longer needed. However I now think this is bogus, because maybe a function could open a new transaction and abort it; and a surrounding query would need the previous relcache entry. So this cannot possibly work (if I'm wrong I'll be very happy because this is the easiest way). Keeping a list of all entries the current subtrans holds and its local refcount sounds ridiculous, doesn't it? We would need one hash per subtransaction; this is very bad. Any ideas out there? Incidentally, I assume that LWLocks are not going to be needed across subtransaction boundaries -- I release them all on abort, just as it's done on main transaction abort. Same for catcache entries. Does anyone think this is incorrect? -- Alvaro Herrera (<alvherre[a]dcc.uchile.cl>) "No hay cielo posible sin hundir nuestras raíces en la profundidad de la tierra" (Malucha Pinto)
В списке pgsql-hackers по дате отправления: