Re: elog() proposal
От | Bruce Momjian |
---|---|
Тема | Re: elog() proposal |
Дата | |
Msg-id | 200202231936.g1NJauo29240@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: elog() proposal (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane wrote: > Peter Eisentraut <peter_e@gmx.net> writes: > > So, basically, what this comes down to with respect to your patch: > > > 1. Renumbering the error codes breaks backward compatibility *silently*. > > Perhaps, but it doesn't bother me. We have *never* promised binary > compatibility of server-side extensions across versions; usually, > you should be happy if a recompile is sufficient ;-). (Structs, > for example, are subject to field rearrangement all the time.) I didn't think we had binary backward compatibility for server functions. The switch statement to test *_min_messages levels is going to look pretty bad, compared to a simple greater-than test for level values. One intestesting trick would be to start numbering the elog messages levels at 10, and throw an error if any messages comes in with a value less than that. That would properly warn people of old object files and may be the best bet. > In any case, we could maintain binary compatibility for the old-style > codes (DEBUG, ERROR, etc); this does not force us to use matching > codes for the new PG_ERROR etc. levels. Yes, I think keeping the old symbols in for one release is a good idea. Again, this would be done only just before beta, during pgindent run, where there are no outstanding patches. > > 2. CRASH doesn't seem like a good name to me. > > Why not? It's short, memorable, accurate, and what's wrong with > a little levity? > > > 3. I agree with adding a LOG or INFO level between DEBUG and NOTICE. > > Both, I think; they're not the same thing. LOG = routine server > operation notices (eg, "checkpoint starting now"). INFO = > allegedly-helpful messages issued to client (eg, the one about > truncating overlength identifiers). Normal configuration would > be to put one but not the other into the postmaster log. Sorry, truncating overly long identifiers is a NOTICE, not INFO. I reserved info for only places where the information did not indicate any kind of unusual situation, like SERIAL sequence creation. You can go through the existing NOTICE's after I apply and salt to taste. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: