Re: Improve LWLock tranche name visibility across backends
От | Sami Imseih |
---|---|
Тема | Re: Improve LWLock tranche name visibility across backends |
Дата | |
Msg-id | CAA5RZ0viNsKqjSuJ8fo74SJrf0uMi=igOn5WrtNYmVqYVh5h-w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Improve LWLock tranche name visibility across backends (Nathan Bossart <nathandbossart@gmail.com>) |
Ответы |
Re: Improve LWLock tranche name visibility across backends
|
Список | pgsql-hackers |
> I've been staring at the latest patch for a bit, and I'm a bit concerned > at how much complexity it adds. The complexity is the fact we have to track a dsa_pointer that points to an array of dsa_pointers that track the tranche names. We also do have to copy the array of dsa_pointers into a new pointer when enlarging. That adds some complexity that dshash would hide away, but I don't think it's overly complex. > I know we were trying to avoid using > dshash earlier, if for no other reason than it's perhaps not the best data > structure for the job, yeah, we really just need an append only structure, so dshash did not seems unnecessary. But also, we moved away from dshash before it was decided to have a local cache. Perhaps, it's ok now to go back to dshash considering that it will only be used in rare scenarios: creations of new tranches and syncs to local memory. Most of the time the tranches will be satisfied directly from local cache. > (or some other shmem-based > data structure we have yet to introduce, like a dslist/dsarray). This will be an interesting API to invest time in, if there could be more use-cases. I think it's a separate discussion at this point. -- Sami
В списке pgsql-hackers по дате отправления: