Re: [HACKERS] easy way of copying regex_t

2016-01-25 Thread Tomas Vondra
On 01/24/2016 10:41 PM, Tom Lane wrote: Artur Zakirov writes: With this message I want to send some patch to your repository with draft of a code, which allows shared_ispell to copy regex_t. Allowing ispell.c to know that much about regex internals strikes me as

Re: [HACKERS] easy way of copying regex_t

2016-01-25 Thread Artur Zakirov
On 25.01.2016 13:07, Tomas Vondra wrote: Right, it's definitely not thread-safe so there'd need to be some lock protecting the regex_t copy. I was thinking about either using a group of locks, each protecting a small subset of the affixes (thus making it possible to work in parallel to some

Re: [HACKERS] easy way of copying regex_t

2016-01-24 Thread Artur Zakirov
Hi all, I've been working on moving an extension that allows to move the ispell dictionaries to shared segment. It's almost complete, the last FIXME is about copying regex_t structure (stored in AFFIX). According to regex.h the structure is fairly complex and not exactly easy to understand, so

Re: [HACKERS] easy way of copying regex_t

2016-01-24 Thread Tom Lane
Artur Zakirov writes: > With this message I want to send some patch to your repository with > draft of a code, which allows shared_ispell to copy regex_t. Allowing ispell.c to know that much about regex internals strikes me as completely unacceptable from a modularity

[HACKERS] easy way of copying regex_t ?

2012-01-05 Thread Tomas Vondra
Hi all, I've been working on moving an extension that allows to move the ispell dictionaries to shared segment. It's almost complete, the last FIXME is about copying regex_t structure (stored in AFFIX). According to regex.h the structure is fairly complex and not exactly easy to understand, so