On 2016/04/15 12:02, Robert Haas wrote:
> As previously threatened, I have written some user documentation for
> parallel query. I put it up here:
>
> https://wiki.postgresql.org/wiki/Parallel_Query
>
> This is not totally comprehensive and I can think of a few more
> details that could be added, but it's a pretty good high-level
> overview of what got into 9.6. After this has gotten some feedback
> and polishing, I would like to add a version of this to the SGML
> documentation somewhere. I am not sure where it would fit, but I
> think it's good to document stuff like this.
Looking at the "Function Labeling For Parallel Safety" section. There is
a sentence:
"Functions must be marked PARALLEL UNSAFE if they write to the database,
access sequences, change the transaction state even temporarily (e.g. a
PL/pgsql function which establishes an EXCEPTION block to catch errors),
or make persistent changes to settings."
Then looking at the "postgres_fdw vs. force_parallel_mode on ppc" thread
[1], I wonder if a note on the lines of "or a function that creates *new*
connection(s) to remote server(s)" may be in order. Overkill?
Thanks,
Amit
[1]
http://www.postgresql.org/message-id/CAEepm=1_saV7WJQWqgZfeNL954=nhtvcaoyuu6fXEt01RM2r4Q@mail.gmail.com