Re: GUC thread-safety approaches
| От | Peter Eisentraut |
|---|---|
| Тема | Re: GUC thread-safety approaches |
| Дата | |
| Msg-id | 863f8394-0a22-4bb7-ba4c-8ae126d16907@eisentraut.org обсуждение исходный текст |
| Ответ на | Re: GUC thread-safety approaches (Heikki Linnakangas <hlinnaka@iki.fi>) |
| Список | pgsql-hackers |
On 18.11.25 15:15, Heikki Linnakangas wrote: > PS. I found this blog post on how Thread Local Storage is implemented on > different systems very enlightening: https://maskray.me/blog/2021-02-14- > all-about-thread-local-storage. I think whatever scheme we come up with > will be a home-grown implementation of one the methods described in that > article. I read this: > Windows TLS > Referencing a TLS variable from another DLL is not supported. > > __declspec(dllimport) extern thread_local int tls; > // error C2492: 'tls': data with thread storage duration may not have dll interface So something like extern PGDLLIMPORT thread_local struct Port *MyProcPort; wouldn't work (confirmed). That might be a problem, since we now mark all global variables as PGDLLIMPORT.
В списке pgsql-hackers по дате отправления: