Re: Parallel safety tagging of extension functions - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Parallel safety tagging of extension functions
Date
Msg-id CAB7nPqQa_wTHEnb9oTZYynYOb9GK=FH-zyvHjO73C_4XR8sC4w@mail.gmail.com
Whole thread Raw
In response to Re: Parallel safety tagging of extension functions  (Andreas Karlsson <andreas@proxel.se>)
List pgsql-hackers
On Sat, May 21, 2016 at 1:01 PM, Andreas Karlsson <andreas@proxel.se> wrote:
> Another question which I thought of is what we should do with functions like
> pg_file_write() in adminpack.
>
> While it is perfectly fine to modify files from the parallel workers, a user
> could get race conditions if he tries to modify the same file multiple
> times. Is this a kind of problem the PARALLEL tagging should try to prevent,
> or is that something we should leave to the user?

Having multiple processes trying to write to a file on Windows is no
good either and would need some extra logic with EventWaitHandle().
I'd rather have those be marked as unsafe for now.
-- 
Michael



pgsql-hackers by date:

Previous
From: Andreas Karlsson
Date:
Subject: Re: Parallel safety tagging of extension functions
Next
From: Pete Hollobon
Date:
Subject: Re: [PATCH] Add EXPLAIN (ALL) shorthand