Re: pgsql: Report which WAL sync method we are trying to change *to* when it - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Report which WAL sync method we are trying to change *to* when it
Date
Msg-id 24793.1210620363@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Report which WAL sync method we are trying to change *to* when it  (Magnus Hagander <magnus@hagander.net>)
Responses Re: pgsql: Report which WAL sync method we are trying to change *to* when it
List pgsql-committers
Magnus Hagander <magnus@hagander.net> writes:
> Simon Riggs wrote:
>> Could we report both?

> Yes, we could easily do that if we want to.

It would be entirely silly to do so, since (a) the old value hasn't been
changed if we fail here, and (b) it's irrelevant to the nature of the
error.

What's also a bit silly is using PANIC for this report --- AFAICS plain
old ERROR is sufficient, since if we fail here we have not yet modified
any persistent state.  Just because it's a "can't happen" condition
doesn't justify making it a PANIC.

            regards, tom lane

pgsql-committers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: pgsql: Report which WAL sync method we are trying to change *to* when it
Next
From: Simon Riggs
Date:
Subject: Re: pgsql: Report which WAL sync method we are trying to change *to* when it