Thread

Commits

  1. Fix non-specific error message.

  2. process startup: Separate out BootstrapModeMain from AuxiliaryProcessMain.

  1. something has gone wrong, but what is it?

    Robert Haas <robertmhaas@gmail.com> — 2022-08-10T13:41:30Z

    Hi,
    
    Today while hacking I encountered this delight:
    
    2022-08-10 09:30:29.025 EDT [27126] FATAL:  something has gone wrong
    
    I actually already knew that something had gone wrong, because the
    code I was writing was incomplete. And if I hadn't known that, the
    word FATAL would have been a real good clue. What I was hoping was
    that the error message might tell me WHAT had gone wrong, but it
    didn't.
    
    This seems to be the fault of Andres's commit
    5aa4a9d2077fa902b4041245805082fec6be0648. In his defense, the addition
    of any kind of elog() at that point in the code appears to be an
    improvement over the previous state of affairs. Nonetheless I feel we
    could do better still, as in the attached.
    
    -- 
    Robert Haas
    EDB: http://www.enterprisedb.com
    
  2. Re: something has gone wrong, but what is it?

    Daniel Gustafsson <daniel@yesql.se> — 2022-08-10T13:52:56Z

    > On 10 Aug 2022, at 15:41, Robert Haas <robertmhaas@gmail.com> wrote:
    
    > I feel we could do better still, as in the attached.
    
    +1, LGTM.
    
    --
    Daniel Gustafsson		https://vmware.com/
    
    
    
    
    
  3. Re: something has gone wrong, but what is it?

    Tom Lane <tgl@sss.pgh.pa.us> — 2022-08-10T13:53:28Z

    Robert Haas <robertmhaas@gmail.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.
    
    			regards, tom lane
    
    
    
    
  4. Re: something has gone wrong, but what is it?

    Robert Haas <robertmhaas@gmail.com> — 2022-08-10T14:49:59Z

    On Wed, Aug 10, 2022 at 9:53 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
    > Robert Haas <robertmhaas@gmail.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
    
  5. Re: something has gone wrong, but what is it?

    Andres Freund <andres@anarazel.de> — 2022-08-10T14:56:06Z

    Hi,
    
    On 2022-08-10 10:49:59 -0400, Robert Haas wrote:
    > On Wed, Aug 10, 2022 at 9:53 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
    > > Robert Haas <robertmhaas@gmail.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.
    
    Makes sense.
    
    Greetings,
    
    Andres Freund
    
    
    
    
  6. Re: something has gone wrong, but what is it?

    x4mmm@yandex-team.ru — 2022-08-10T18:06:01Z

    
    > On 10 Aug 2022, at 19:49, Robert Haas <robertmhaas@gmail.com> wrote:
    > 
    > 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.
    
    Is there a reason to do
    MyBackendType = B_INVALID;
    after PANIC or ERROR?
    
    Best regards, Andrey Borodin.
    
    
    
    
  7. Re: something has gone wrong, but what is it?

    Robert Haas <robertmhaas@gmail.com> — 2022-08-10T18:50:30Z

    On Wed, Aug 10, 2022 at 2:06 PM Andrey Borodin <x4mmm@yandex-team.ru> wrote:
    > > On 10 Aug 2022, at 19:49, Robert Haas <robertmhaas@gmail.com> wrote:
    > > 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.
    >
    > Is there a reason to do
    > MyBackendType = B_INVALID;
    > after PANIC or ERROR?
    
    That could probably be taken out, but it doesn't seem important to take it out.
    
    -- 
    Robert Haas
    EDB: http://www.enterprisedb.com