Nathan Bossart <nathandboss...@gmail.com> writes: > Regarding returning 0 instead of -1 for the parallel case, I think that > follows. While doing some additional research, I noticed this return value > was just added in December (commit 059de3c [0]). Before that, it > apparently assumed that elevel >= ERROR. With that and your analysis of > the call sites, it seems highly unlikely that changing it will cause any > problems.
Hah ... so the failure to think clearly about which value to use was mine :-(. > For the errcode, I do see that we pretty consistently use > ERRCODE_INVALID_TRANSACTION_STATE for "can't do thing during a parallel > operation." In fact, it looks like all but one use is for parallel errors. OK, I'll leave that alone but will change the return code. regards, tom lane