Open xingtanzjr opened 1 month ago
Hi!
We currently do not have safe wrappers around the DSM internals. Your intuition is correct that you'll need to use pg_sys
directly. It may also be that we don't include all the necessary headers, so you may need to add those to pgrx as well -- we'll happily accept and merge PRs for that! :)
Thank you @eeeebbbbrrrr , I will do some investigation and try to make a PR when necessary. Thanks for your quick response again
By the way, is the example I mentioned just made up online, or did it actually exist?
Hi all,
I am new to pgrx and cannot find some material regarding how to create DSM and launch parallel worker by pgrx.
My scenario is: I am trying to implement a index extension and is implementing ambuild(). When doing that, I'd like to make the build stage in a parallel way. Thus, I need to create the DSM and share it in several parallel workers. But I didn't find corresponding doc or example about how to do that.
I noticed some example in some website such as:
But it seems that there is no such method in
pgrx 0.11.4
.The other way is use
pg_sys
to leverage all internal method defined by C. But it seems very complicated in that way.Could you please help to share an example ? Appreciate your any input ! Thank you!