Re: PANIC serves too many masters

2023-11-20 Thread Andres Freund
Hi, On 2023-11-20 17:55:32 -0500, Tom Lane wrote: > Jeff Davis writes: > > Is the error level the right way to express what we want to happen? It > > seems like what we really want is to decide on the behavior, i.e. > > restart or not, and generate core or not. That could be done a > > different

Re: PANIC serves too many masters

2023-11-20 Thread Tom Lane
Jeff Davis writes: > Is the error level the right way to express what we want to happen? It > seems like what we really want is to decide on the behavior, i.e. > restart or not, and generate core or not. That could be done a > different way, like: > ereport(PANIC, > (errmsg("could not

Re: PANIC serves too many masters

2023-11-20 Thread Jeff Davis
On Mon, 2023-11-20 at 17:12 -0500, Tom Lane wrote: > I'd be inclined to keep PANIC with its current meaning, and > incrementally change call sites where we decide that's not the > best behavior.  I think those will be a minority, maybe a small > minority.  (PANIC_EXIT had darn well better be a smal

Re: PANIC serves too many masters

2023-11-20 Thread Tom Lane
Jeff Davis writes: > On Sat, 2023-11-18 at 14:29 -0800, Andres Freund wrote: >> I don't quite know what we should do. But the current situation >> decidedly >> doesn't seem great. > Agreed. +1 > Better classification is nice, but it also requires more > discipline and it might not always be obv

Re: PANIC serves too many masters

2023-11-20 Thread Jeff Davis
Hi, On Sat, 2023-11-18 at 14:29 -0800, Andres Freund wrote: > I don't quite know what we should do. But the current situation > decidedly > doesn't seem great. Agreed. Better classification is nice, but it also requires more discipline and it might not always be obvious which category something f

PANIC serves too many masters

2023-11-18 Thread Andres Freund
Hi, Right now we use PANIC for very different kinds of errors. Sometimes for errors that are persistent, where crash-restarting and trying again won't help: ereport(PANIC, (errmsg("could not locate a valid checkpoint record"))); or ereport(PANIC, (errmsg("online backup was