Re: something has gone wrong, but what is it?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: something has gone wrong, but what is it?
Date: 2022-08-10 14:49:59
Message-ID: CA+TgmoYsqxa38jt9KWY3nYnLzoKt-OTQqYcZ_=CHLCRO=rgfAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 10, 2022 at 9:53 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>
> - elog(ERROR, "something has gone wrong");
> + elog(ERROR, "unrecognized AuxProcType: %d", (int) auxtype);
>
> +1 ... the existing message is clearly not up to project standard.

After a bit of further looking around I noticed that there's another
check for an invalid auxtype in this function which uses a slightly
different message text and also PANIC rather than ERROR.

I think we should adopt that here too, for consistency, as in the attached.

The distinction between PANIC and ERROR doesn't really seem to matter
here. Either way, the server goes into an infinite crash-and-restart
loop. May as well be consistent.

--
Robert Haas
EDB: http://www.enterprisedb.com

Attachment Content-Type Size
v2-0001-Be-more-specific-about-exactly-what-has-gone-wron.patch application/octet-stream 826 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-08-10 14:51:00 SPI versus read/write expanded datums
Previous Message Justin Pryzby 2022-08-10 14:25:03 Re: moving basebackup code to its own directory