- Sep 27, 2007
-
-
Tom Lane authored
the same transaction can be identified even when no regular XID was assigned. This seems essential after addition of the lazy-XID patch. Also some minor code cleanup in write_csvlog().
-
- Sep 05, 2007
-
-
Tom Lane authored
rows will normally never obtain an XID at all. We already did things this way for subtransactions, but this patch extends the concept to top-level transactions. In applications where there are lots of short read-only transactions, this should improve performance noticeably; not so much from removal of the actual XID-assignments, as from reduction of overhead that's driven by the rate of XID consumption. We add a concept of a "virtual transaction ID" so that active transactions can be uniquely identified even if they don't have a regular XID. This is a much lighter-weight concept: uniqueness of VXIDs is only guaranteed over the short term, and no on-disk record is made about them. Florian Pflug, with some editorialization by Tom.
-
- Aug 23, 2007
-
-
Andrew Dunstan authored
the same amount of memory in ErrorContext as standard logs.
-
- Aug 19, 2007
-
-
Andrew Dunstan authored
redirect_stderr to logging_collector. Original patch from Arul Shaji, subsequently modified by Greg Smith, and then heavily modified by me.
-
- Aug 04, 2007
-
-
Tom Lane authored
between the setting of log_line_prefix and the setting of log_timezone. We can't realistically set log_timezone any earlier than we do now, so the best behavior seems to be to use GMT zone if any timestamps are to be logged during early startup. Create a dummy zone variable with a minimal definition of GMT (in particular it will never know about leap seconds), so that we can set it up without reference to any external files.
-
Tom Lane authored
displayed in the postmaster log. This avoids Windows-specific problems with localized time zone names that are in the wrong encoding, and generally seems like a good idea to forestall other potential platform-dependent issues. To preserve the existing behavior that all backends will log in the same time zone, create a new GUC variable log_timezone that can only be changed on a system-wide basis, and reference log-related calculations to that zone instead of the TimeZone variable. This fixes the issue reported by Hiroshi Saito that timestamps printed by xlog.c startup could be improperly localized on Windows. We still need a simpler patch for that problem in the back branches, however.
-
- Aug 03, 2007
-
-
Andrew Dunstan authored
so that we will be able to create a cookie for all processes for CSVlogs. It is set wherever MyProcPid is set. Take the opportunity to remove the now unnecessary session-only restriction on the %s and %c escapes in log_line_prefix.
-
- Jul 22, 2007
-
-
Tom Lane authored
log_min_error_statement is active and there is some problem in logging the current query string; for example, that it's too long to include in the log message without running out of memory. This problem has existed since the log_min_error_statement feature was introduced. No doubt the reason it wasn't detected long ago is that 8.2 is the first release that defaults log_min_error_statement to less than PANIC level. Per report from Bill Moran.
-
- Jul 19, 2007
-
-
Tom Lane authored
lot more sensible if we check the chunk-output case first. Not back-patched since it's just a cosmetic improvement.
-
Andrew Dunstan authored
be catching stderr output, and we are not ourselves the syslogger. Otherwise, go directly to stderr. Bug noticed by Tom Lane. Backpatch as far as 8.0.
-
- Jun 14, 2007
-
-
Andrew Dunstan authored
reassembled in the syslogger before writing to the log file. This prevents partial messages from being written, which mucks up log rotation, and messages from different backends being interleaved, which causes garbled logs. Backport as far as 8.0, where the syslogger was introduced. Tom Lane and Andrew Dunstan
-
- Jun 07, 2007
-
-
Tom Lane authored
which is the only state in which it's safe to initiate database queries. It turns out that all but two of the callers thought that's what it meant; and the other two were using it as a proxy for "will GetTopTransactionId() return a nonzero XID"? Since it was in fact an unreliable guide to that, make those two just invoke GetTopTransactionId() always, then deal with a zero result if they get one.
-
- May 04, 2007
-
-
Tom Lane authored
and for other compilers, insert a dummy exit() call so that they understand PG_RE_THROW() doesn't return. Insert fflush(stderr) in ExceptionalCondition, per recent buildfarm evidence that that might not happen automatically on some platforms. And const-ify ExceptionalCondition's declaration while at it.
-
- May 02, 2007
-
-
Tom Lane authored
isn't any place to throw the error to. If so, we should treat the error as FATAL, just as we would have if it'd been thrown outside the PG_TRY block to begin with. Although this is clearly a *potential* source of bugs, it is not clear at the moment whether it is an *actual* source of bugs; there may not presently be any PG_TRY blocks in code that can be reached with no outer longjmp catcher. So for the moment I'm going to be conservative and not back-patch this. The change breaks ABI for users of PG_RE_THROW and hence might create compatibility problems for loadable modules, so we should not put it into released branches without proof that it's needed.
-
- Mar 03, 2007
-
-
Tom Lane authored
log_min_messages does; and arrange to suppress the duplicative output that would otherwise result from log_statement and log_duration messages. Bruce Momjian and Tom Lane.
-
- Feb 11, 2007
-
-
Magnus Hagander authored
running as a service on Win32. Per report from Harald Armin Massa.
-
- Jan 20, 2007
-
-
Tom Lane authored
-
Peter Eisentraut authored
-
Bruce Momjian authored
function is_log_level_output(), for code clarity.
-
- Jan 05, 2007
-
-
Bruce Momjian authored
back-stamped for this.
-
- Nov 28, 2006
-
-
Peter Eisentraut authored
not destroy them. Maybe we can adjust pgindent sometime.
-
- Nov 21, 2006
-
-
Tom Lane authored
because on that platform strftime produces localized zone names in varying encodings. Even though it's only in a comment, this can cause encoding errors when reloading the dump script. Per suggestion from Andreas Seltenreich. Also, suppress %Z on Windows in the %s escape of log_line_prefix ... not sure why this one is different from the other two, but it shouldn't be.
-
Tom Lane authored
promoted to FATAL) end in exit(1) not exit(0). Then change the postmaster to allow exit(1) without a system-wide panic, but not for the startup subprocess or the bgwriter. There were a couple of places that were using exit(1) to deliberately force a system-wide panic; adjust these to be exit(2) instead. This fixes the problem noted back in July that if the startup process exits with elog(ERROR), the postmaster would think everything is hunky-dory and proceed to start up. Alternative solutions such as trying to run the entire startup process as a critical section seem less clean, primarily because of the fact that a fair amount of startup code is shared by all postmaster children in the EXEC_BACKEND case. We'd need an ugly special case somewhere near the head of main.c to make it work if it's the child process's responsibility to determine what happens; and what's the point when the postmaster already treats different children differently?
-
- Oct 02, 2006
-
-
Tom Lane authored
severity. This is to ensure the user can cancel a query that's spitting out lots of notice/warning messages, even if they're coming from a loop that doesn't otherwise contain a CHECK_FOR_INTERRUPTS. Per gripe from Stephen Frost.
-
- Sep 27, 2006
-
-
Tom Lane authored
to performance. (A wholesale effort to get rid of strncpy should be undertaken sometime, but not during beta.) This commit also fixes dynahash.c to correctly truncate overlength string keys for hashtables, so that its callers don't have to anymore.
-
- Jul 14, 2006
-
-
Bruce Momjian authored
-
- Jul 13, 2006
-
-
Bruce Momjian authored
Strip unused include files out unused include files, and add needed includes to C files. The next step is to remove unused include files in C files.
-
- Jul 11, 2006
-
-
Bruce Momjian authored
-
- Jun 21, 2006
-
-
Tom Lane authored
changing semantics too much. statement_timestamp is now set immediately upon receipt of a client command message, and the various places that used to do their own gettimeofday() calls to mark command startup are referenced to that instead. I have also made stats_command_string use that same value for pg_stat_activity.query_start for both the command itself and its eventual replacement by <IDLE> or <idle in transaction>. There was some debate about that, but no argument that seemed convincing enough to justify an extra gettimeofday() call.
-
- Mar 05, 2006
-
-
Bruce Momjian authored
-
- Nov 22, 2005
-
-
Bruce Momjian authored
comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
-
- Nov 05, 2005
-
-
Tom Lane authored
to assume that the string pointer passed to set_ps_display is good forever. There's no need to anyway since ps_status.c itself saves the string, and we already had an API (get_ps_display) to return it. I believe this explains Jim Nasby's report of intermittent crashes in elog.c when %i format code is in use in log_line_prefix. While at it, repair a previously unnoticed problem: on some platforms such as Darwin, the string returned by get_ps_display was blank-padded to the maximum length, meaning that lock.c's attempt to append " waiting" to it never worked.
-
- Nov 03, 2005
-
-
Alvaro Herrera authored
those names. (Debug and None were pretty bad names anyway.) I hope I catched all uses of the names in comments too.
-
- Oct 15, 2005
-
-
Bruce Momjian authored
-
- Oct 14, 2005
-
-
Tom Lane authored
the facility has been set, the facility gets set to LOCAL0 and cannot be changed later. This seems reasonably plausible to happen, particularly at higher debug log levels, though I am not certain it explains Han Holl's recent report. Easiest fix is to teach the code how to change the value on-the-fly, which is nicer anyway. I made the settings PGC_SIGHUP to conform with log_destination.
-
Tom Lane authored
of GUC memory doesn't cause us to start emitting a bogus ident string. Per report from Han Holl. Also some trivial code cleanup in write_syslog.
-
- Aug 12, 2005
-
-
Bruce Momjian authored
stderr-in-service or output-from-syslogger-in-service code. Previously everything was flagged as ERRORs there, which caused all instances to log "LOG: logger shutting down" as error... Please apply for 8.1. I'd also like it considered for 8.0 since logging non-errors as errors can be cause for alarm amongst people who actually look at their logs... Magnus Hagander
-
- Jun 10, 2005
-
-
Tom Lane authored
code beautification too.
-
Neil Conway authored
These contain the SQLSTATE and error message of the current exception, respectively. They are scope-local variables that are only defined in exception handlers (so attempting to reference them outside an exception handler is an error). Update the regression tests and the documentation. Also, do some minor related cleanup: export an unpack_sql_state() function from the backend and use it to unpack a SQLSTATE into a string, and add a free_var() function to pl_exec.c Original patch from Pavel Stehule, review by Neil Conway.
-
Bruce Momjian authored
millisecond timestamps (%m) and remote host (%h). The milliseconds are useful for QPS measurements. Ed L.
-