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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <mha(at)postgresql(dot)org>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Report which WAL sync method we are trying to change *to* when it
Date: 2008-05-12 19:26:03
Message-ID: 24793.1210620363@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Magnus Hagander <magnus(at)hagander(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2008-05-12 19:45:23 pgsql: Fix breakage by the wal_sync_method patch in installations that
Previous Message Magnus Hagander 2008-05-12 19:06:30 Re: pgsql: Report which WAL sync method we are trying to change *to* when it