Re: is_superuser versus set_config_option's parallelism check - Mailing list pgsql-hackers

From Tom Lane
Subject Re: is_superuser versus set_config_option's parallelism check
Date
Msg-id 3170329.1723315083@sss.pgh.pa.us
Whole thread Raw
In response to Re: is_superuser versus set_config_option's parallelism check  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
Nathan Bossart <nathandbossart@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



pgsql-hackers by date:

Previous
From: Stepan Neretin
Date:
Subject: Re: SPI_connect, SPI_connect_ext return type
Next
From: Andrei Zubkov
Date:
Subject: Re: Vacuum statistics