I wrote:
> I can duplicate this in HEAD and v10, but not 9.6, so I've added it
> as an open issue for v10. No idea what broke it.
Oh, scratch that: the issue exists in 9.6, it's just that the particular
test query you're using here does not generate a parallelized plan in
9.6, as shown by "explain". With a different query that does get
parallelized, 9.6 fails too:
regression=# select sum(ten) from tenk1;
ERROR: role "testuser1" does not exist
CONTEXT: parallel worker
Still, I think it's reasonable to characterize this as "must fix for v10".
regards, tom lane