Re: POC: Cache data in GetSnapshotData()
От | Amit Kapila |
---|---|
Тема | Re: POC: Cache data in GetSnapshotData() |
Дата | |
Msg-id | CAA4eK1JOuZabO64+rK5Xuo4mP15D8WbCkDOpRMnqXOKe2WFJjw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: POC: Cache data in GetSnapshotData() (Mithun Cy <mithun.cy@enterprisedb.com>) |
Список | pgsql-hackers |
On Fri, Jan 15, 2016 at 11:23 AM, Mithun Cy <mithun.cy@enterprisedb.com> wrote:
After above fix memory corruption is not visible. But I see some more failures at higher client sessions(128 it is easily reproducible).This is done with one atomic compare and swap operation.compute the snapshot(when cache is invalid) only one of them will write to cache.I tried to implement a simple patch which protect the cache. Of all the backend whichOn Mon, Jan 4, 2016 at 2:28 PM, Andres Freund <andres@anarazel.de> wrote:
> I think at the very least the cache should be protected by a separate
> lock, and that lock should be acquired with TryLock. I.e. the cache is
> updated opportunistically. I'd go for an lwlock in the first iteration.
Don't you think we need to update the snapshot fields like count,
subcount before saving it to shared memory?
В списке pgsql-hackers по дате отправления: