Re: Parallel safety tagging of extension functions

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel safety tagging of extension functions
Date: 2016-05-21 17:13:07
Message-ID: CAB7nPqQa_wTHEnb9oTZYynYOb9GK=FH-zyvHjO73C_4XR8sC4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, May 21, 2016 at 1:01 PM, Andreas Karlsson <andreas(at)proxel(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pete Hollobon 2016-05-21 18:01:14 Re: [PATCH] Add EXPLAIN (ALL) shorthand
Previous Message Andreas Karlsson 2016-05-21 17:01:56 Re: Parallel safety tagging of extension functions