summaryrefslogtreecommitdiff
path: root/src/backend/utils/error/elog.c
Commit message (Collapse)AuthorAgeFilesLines
* Change made to elog:Bruce Momjian2002-03-061-15/+19
| | | | | | | | | | | | | | | | | | | o Change all current CVS messages of NOTICE to WARNING. We were going to do this just before 7.3 beta but it has to be done now, as you will see below. o Change current INFO messages that should be controlled by client_min_messages to NOTICE. o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc. to always go to the client. o Remove INFO from the client_min_messages options and add NOTICE. Seems we do need three non-ERROR elog levels to handle the various behaviors we need for these messages. Regression passed.
* Further work on elog cleanup: fix some bogosities in elog's logic aboutTom Lane2002-03-041-66/+82
| | | | | | | when to send what to which, prevent recursion by introducing new COMMERROR elog level for client-communication problems, get rid of direct writes to stderr in backend/libpq files, prevent non-error elogs from going to client during the authentication cycle.
* Commit to match discussed elog() changes. Only update is that LOG isBruce Momjian2002-03-021-24/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | now just below FATAL in server_min_messages. Added more text to highlight ordering difference between it and client_min_messages. --------------------------------------------------------------------------- REALLYFATAL => PANIC STOP => PANIC New INFO level the prints to client by default New LOG level the prints to server log by default Cause VACUUM information to print only to the client NOTICE => INFO where purely information messages are sent DEBUG => LOG for purely server status messages DEBUG removed, kept as backward compatible DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added DebugLvl removed in favor of new DEBUG[1-5] symbols New server_min_messages GUC parameter with values: DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC New client_min_messages GUC parameter with values: DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC Server startup now logged with LOG instead of DEBUG Remove debug_level GUC parameter elog() numbers now start at 10 Add test to print error message if older elog() values are passed to elog() Bootstrap mode now has a -d that requires an argument, like postmaster
* New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian2001-11-051-3/+3
| | | | initdb/regression tests pass.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-251-24/+26
| | | | tests pass.
* Fix memory leakage when sending notice messages to client.Tom Lane2001-10-181-31/+11
|
* Use a fixed error message for ERANGE to avoid duplicate test result files.Peter Eisentraut2001-08-061-2/+6
| | | | Add some resultmap entries for SCO OpenServer.
* Handle reading of startup packet and authentication exchange after forkingPeter Eisentraut2001-06-201-20/+4
| | | | | | | | | | a new postmaster child process. This should eliminate problems with authentication blocking (e.g., ident, SSL init) and also reduce problems with the accept queue filling up under heavy load. The option to send elog output to a different file per backend (postgres -o) has been disabled for now because the initialization would have to happen in a different order and it's not clear we want to keep this anyway.
* Preliminary code cleanup in elog(). Split out some code into utilityPeter Eisentraut2001-06-081-123/+166
| | | | | functions, remove indent support, make sure all strings are marked translatable.
* Native Language Support (NLS)Peter Eisentraut2001-06-021-1/+2
| | | | | | | | | | | Use --enable-nls to turn it on; see installation instructions for details. See developer's guide how to make use of it in programs and how to add translations. psql sources have been almost fully prepared and an incomplete German translation has been provided. In the backend, only elog() calls are currently translatable, and the provided German translation file is more of a placeholder.
* Remove SEP_CHAR, replace with / or '/' as appropriate.Bruce Momjian2001-05-301-3/+3
|
* pgindent run. Make it all clean.Bruce Momjian2001-03-221-57/+69
|
* FATAL errors should cause exit with nonzero status if we are not runningTom Lane2001-03-101-3/+6
| | | | | under the postmaster --- specifically, if we are a standalone backend running under the initdb script, this is critical!
* Safe guard in case of imporper data is provided to elog()Tatsuo Ishii2001-02-211-1/+3
| | | | in multi-byte build.
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-241-2/+2
|
* Remove rangechecks on errno; just call strerror unconditionally. ThisTom Lane2001-01-221-13/+2
| | | | | | | | | eliminates a raft of portability issues, including whether sys_nerr exists, whether the platform has any valid negative errnos, etc. The downside is minimal: errno shouldn't ever contain an invalid value anyway, and if it does, reasonably modern versions of strerror will not choke. This rangecheck idea seemed good at the time, but it's clearly a net loss, and I apologize to all concerned for having ever put it in.
* Deal with C++ incompatibility of sys_nerr declaration by taking it outTom Lane2001-01-211-10/+16
| | | | | | | | of c.h altogether, and putting it into the only places that use it (elog.c and exc.c), instead. Modify these routines to check for a NULL or empty-string return from strerror, too, since some platforms define strerror to return empty string for unknown errors (what a useless definition that is ...). Clean up some cruft in ExcPrint while at it.
* Make critical sections (elog->crash) and interrupt holdoff sectionsTom Lane2001-01-191-9/+19
| | | | into distinct concepts, per recent discussion on pghackers.
* Restructure backend SIGINT/SIGTERM handling so that 'die' interruptsTom Lane2001-01-141-23/+17
| | | | | | | are treated more like 'cancel' interrupts: the signal handler sets a flag that is examined at well-defined spots, rather than trying to cope with an interrupt that might happen anywhere. See pghackers discussion of 1/12/01.
* Add configure check for sys_nerr, to end all discussions.Peter Eisentraut2001-01-091-9/+3
|
* Clean up backend-exit-time cleanup behavior. Use on_shmem_exit callbacksTom Lane2000-12-181-13/+13
| | | | | | to ensure that we have released buffer refcounts and so forth, rather than putting ad-hoc operations before (some of the calls to) proc_exit. Add commentary to discourage future hackers from repeating that mistake.
* Don't include miscadmin.h in elog.h, since the former is not part ofTom Lane2000-12-061-1/+2
| | | | the installed header file set.
* Ensure that all uses of <ctype.h> functions are applied to unsigned-charTom Lane2000-12-031-3/+3
| | | | | values, whether the local char type is signed or not. This is necessary for portability. Per discussion on pghackers around 9/16/00.
* Disable elog(ERROR|FATAL) in signal handlers inVadim B. Mikheev2000-12-031-2/+3
| | | | critical sections of code.
* Make elog() switch to ErrorContext while invoking libpq output routines,Tom Lane2000-12-011-10/+27
| | | | | | since those routines may do palloc's. We want to be fairly sure we can send the error message to the client even under low-memory conditions. That's what we stashed away 8K in ErrorContext for, after all ...
* Fix elog logic so that error messages displayed during initdb (orTom Lane2000-11-251-37/+26
| | | | | other standalone-backend situations) are not duplicated. Remove some dead code, add some comments, too.
* > > Looking some more, I found some other places that need a space (IBruce Momjian2000-11-251-2/+11
| | | | | | | | | | | | | | > > suspect...), so here is an updated patch. > > This seems like the wrong way to go about it, because anytime anyone > changes any elog output anywhere, we'll risk another failure. If > syslog can't cope with empty lines, I think the right fix is for the > output-to-syslog routine to change the data just before sending --- > then there is only one place to fix. See the syslog output routine in > src/backend/utils/error/elog.c. Makes sense. Here's a new patch, now the output even looks better: Larry Rosenman
* Small polishing of syslog facility and ident settings. Only allow settingPeter Eisentraut2000-11-141-4/+4
| | | | | at postmaster start, rename syslog_progid to syslog_ident, since syslog itself uses that term, fix doc markup.
* Ok, You guys are probably tired of me, BUT, here is another one, thatBruce Momjian2000-11-131-2/+21
| | | | | | | | | | | | | adds the facility to set the program name used in syslog. (this includes the other ones). One gotcha, the parser doesn't like special characters in strings. For example, i tried to use pg-test, and if failed the parse coming from the postgresql.conf file. I don't think it's a showstopper.. Larry Rosenman
* include pg_wchar.h to import a fucntion prototype of pg_mbcliplenTatsuo Ishii2000-10-301-1/+5
|
* The beos port in the source tree doesn't even compile. and evenBruce Momjian2000-10-071-4/+4
| | | | | | | | | | | | | | | | | | | | | after that dynamic loading isn't working and shared memory handling is broken. Attached with this message, there is a Zip file which contain : * beos.diff = patch file generated with difforig * beos = folder with beos support files which need to be moved in / src/backend/port * expected = foler with three file for message and precision difference in regression test * regression.diff = rule problem (need to kill the backend manualy) * dynloader = dynloader files (they are also in the pacth files, but there is so much modification that I have join full files) Everything works except a problem in 'rules' Is there some problems with rules in the current tree ? It used to works with last week tree. Cyril VELTER
* New diff that now covers the entire tree. Applying this gets postgresqlBruce Momjian2000-10-031-1/+6
| | | | | | | | | | | | | | | | | working on the VERY latest version of BeOS. I'm sure there will be alot of comments, but then if there weren't I'd be disappointed! Thanks for your continuing efforts to get this into your tree. Haven't bothered with the new files as they haven't changed. BTW Peter, the compiler is "broken" about the bool define and so on. I'm filing a bug report to try and get it addressed. Hopefully then we can tidy up the code a bit. I await the replies with interest :) David Reid
* Cygwin uses _sys_nerr for sys_nerrPeter Eisentraut2000-09-291-1/+5
|
* First phase of memory management rewrite (see backend/utils/mmgr/READMETom Lane2000-06-281-23/+38
| | | | | | | | | | | | | for details). It doesn't really do that much yet, since there are no short-term memory contexts in the executor, but the infrastructure is in place and long-term contexts are handled reasonably. A few long- standing bugs have been fixed, such as 'VACUUM; anything' in a single query string crashing. Also, out-of-memory is now considered a recoverable ERROR, not FATAL. Eliminate a large amount of crufty, now-dead code in and around memory management. Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and backend startup.
* Removed ELOG_TIMESTAMPS #define in favor of two run-timePeter Eisentraut2000-06-041-47/+66
| | | | configuration options `Log_timestamp' and `Log_pid'.
* The heralded `Grand Unified Configuration scheme' (GUC)Peter Eisentraut2000-05-311-36/+178
| | | | | | | | | | | | | That means you can now set your options in either or all of $PGDATA/configuration, some postmaster option (--enable-fsync=off), or set a SET command. The list of options is in backend/utils/misc/guc.c, documentation will be written post haste. pg_options is gone, so is that pq_geqo config file. Also removed were backend -K, -Q, and -T options (no longer applicable, although -d0 does the same as -Q). Added to configure an --enable-syslog option. changed all callers from TPRINTF to elog(DEBUG)
* Remove unused include files. Do not touch /port or includes used by defines.Bruce Momjian2000-05-301-3/+1
|
* elog(NOTICE) during COPY incorrectly reset lineno to 0, causing anyTom Lane2000-04-151-3/+4
| | | | | | subsequent elogs() in the same COPY operation to display the wrong line number. Fix is to clear lineno only when elog level is such that we will not return to caller.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-121-43/+61
|
* contrib-array.patchBruce Momjian2000-02-131-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is an old patch which I have already submitted and never seen in the sources. It corrects the datatype oids used in some iterator functions. This bug has been reported to me by many other people. contrib-datetime.patch some code contributed by Reiner Dassing <dassing@wettzell.ifag.de> contrib-makefiles.patch fixes all my contrib makefiles which don't work with some compilers, as reported to me by another user. contrib-miscutil.patch an old patch for one of my old contribs. contrib-string.patch a small change to the c-like text output functions. Now the '{' is escaped only at the beginning of the string to distinguish it from arrays, and the '}' is no more escaped. elog-lineno.patch adds the current lineno of CopyFrom to elog messages. This is very useful when you load a 1 million tuples table from an external file and there is a bad value somehere. Currently you get an error message but you can't know where is the bad data. The patch uses a variable which was declared static in copy.c. The variable is now exported and initialized to 0. It is always cleared at the end of the copy or at the first elog message or when the copy is canceled. I know this is very ugly but I can't find any better way of knowing where the copy fails and I have this problem quite often. plperl-makefile.patch fixes a typo in a makefile, but the error must be elsewhere because it is a file generated automatically. Please have a look. tprintf-timestamp.patch restores the original 2-digit year format, assuming that the two century digits don't carry much information and that '000202' is easier to read than 20000202. Being only a log file it shouldn't break anything. Please apply the patches before the next scheduled code freeze. I also noticed that some of the contribs don't compile correcly. Should we ask people to fix their code or rename their makefiles so that they are ignored by the top makefile? -- Massimo Dal Zotto
* Add:Bruce Momjian2000-01-261-2/+3
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* elog() was set up to call abort() if it saw an ERROR or FATAL exitTom Lane1999-12-301-8/+2
| | | | | | | | | | during InitProcessingMode and the CurrentTransactionState was neither TRANS_DEFAULT nor TRANS_DISABLED. Unfortunately, after someone's recent change to start the transaction manager earlier in startup than it used to be started, that caused an abort() and consequent database system reset on quite harmless errors (such as rejecting an invalid user name!). As far as I can see, the test on CurrentTransactionState was completely useless anyway, so I've removed it.
* Clean up some problems in error recovery --- elog() was pretty brokenTom Lane1999-11-221-10/+28
| | | | | | for the case of errors in backend startup, and proc_exit's method for coping with errors during proc_exit was *completely* busted. Fixed per discussions on pghackers around 11/6/99.
* Modify elog() logic so that it won't try to longjmp(Warn_restart) beforeTom Lane1999-11-161-5/+9
| | | | | | | | | | Warn_restart has been set by the backend main loop. This means that elog(ERROR) or elog(FATAL) in the postmaster or during backend startup now have well-defined behavior: proc_exit() rather than coredump. In the case of elog() inside the postmaster, I think that proc_exit() is probably not enough --- don't we want our child backends to be forced to quit too? But I don't understand Vadim's recent changes in this area, so I'll leave it to him to look over and tweak if needed.
* Standardize on MAXPGPATH as the size of a file pathname buffer,Tom Lane1999-10-251-3/+3
| | | | | | | eliminating some wildly inconsistent coding in various parts of the system. I set MAXPGPATH = 1024 in config.h.in. If anyone is really convinced that there ought to be a configure-time test to set the value, go right ahead ... but I think it's a waste of time.
* XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.Vadim B. Mikheev1999-10-061-20/+27
| | | | | First step in cleaning up backend initialization code. Fix for FATAL: now FATAL is ERROR + exit.
* Eliminate elog()'s hardwired limit on length of an error message.Tom Lane1999-09-111-78/+214
| | | | | | | | | This change seems necessary in conjunction with long queries, and it cleans up some bogosity in connection with long EXPLAIN texts anyway. Note that current libpq will accept any length error message (at least until it runs out of memory); prior versions have a limit of 8K, but will cleanly discard excess error text, so there shouldn't be any big compatibility problems with old clients.
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-171-4/+1
|
* Final cleanupBruce Momjian1999-07-161-3/+3
|
* pgindent run over code.Bruce Momjian1999-05-251-9/+15
|