mirror of
https://github.com/postgres/postgres.git
synced 2025-12-19 17:02:53 +03:00
Remove tabs after spaces in C comments
This was not changed in HEAD, but will be done later as part of a pgindent run. Future pgindent runs will also do this. Report by Tom Lane Backpatch through all supported branches, but not HEAD
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Because of the extremely high rate at which log messages can be generated,
|
||||
* we need to be mindful of the performance cost of obtaining any information
|
||||
* that may be logged. Also, it's important to keep in mind that this code may
|
||||
* that may be logged. Also, it's important to keep in mind that this code may
|
||||
* get called from within an aborted transaction, in which case operations
|
||||
* such as syscache lookups are unsafe.
|
||||
*
|
||||
@@ -15,23 +15,23 @@
|
||||
* if we run out of memory, it's important to be able to report that fact.
|
||||
* There are a number of considerations that go into this.
|
||||
*
|
||||
* First, distinguish between re-entrant use and actual recursion. It
|
||||
* First, distinguish between re-entrant use and actual recursion. It
|
||||
* is possible for an error or warning message to be emitted while the
|
||||
* parameters for an error message are being computed. In this case
|
||||
* parameters for an error message are being computed. In this case
|
||||
* errstart has been called for the outer message, and some field values
|
||||
* may have already been saved, but we are not actually recursing. We handle
|
||||
* this by providing a (small) stack of ErrorData records. The inner message
|
||||
* may have already been saved, but we are not actually recursing. We handle
|
||||
* this by providing a (small) stack of ErrorData records. The inner message
|
||||
* can be computed and sent without disturbing the state of the outer message.
|
||||
* (If the inner message is actually an error, this isn't very interesting
|
||||
* because control won't come back to the outer message generator ... but
|
||||
* if the inner message is only debug or log data, this is critical.)
|
||||
*
|
||||
* Second, actual recursion will occur if an error is reported by one of
|
||||
* the elog.c routines or something they call. By far the most probable
|
||||
* the elog.c routines or something they call. By far the most probable
|
||||
* scenario of this sort is "out of memory"; and it's also the nastiest
|
||||
* to handle because we'd likely also run out of memory while trying to
|
||||
* report this error! Our escape hatch for this case is to reset the
|
||||
* ErrorContext to empty before trying to process the inner error. Since
|
||||
* ErrorContext to empty before trying to process the inner error. Since
|
||||
* ErrorContext is guaranteed to have at least 8K of space in it (see mcxt.c),
|
||||
* we should be able to process an "out of memory" message successfully.
|
||||
* Since we lose the prior error state due to the reset, we won't be able
|
||||
@@ -114,7 +114,7 @@ int Log_destination = LOG_DESTINATION_STDERR;
|
||||
/*
|
||||
* Max string length to send to syslog(). Note that this doesn't count the
|
||||
* sequence-number prefix we add, and of course it doesn't count the prefix
|
||||
* added by syslog itself. Solaris and sysklogd truncate the final message
|
||||
* added by syslog itself. Solaris and sysklogd truncate the final message
|
||||
* at 1024 bytes, so this value leaves 124 bytes for those prefixes. (Most
|
||||
* other syslog implementations seem to have limits of 2KB or so.)
|
||||
*/
|
||||
@@ -241,7 +241,7 @@ errstart(int elevel, const char *filename, int lineno,
|
||||
{
|
||||
/*
|
||||
* If we are inside a critical section, all errors become PANIC
|
||||
* errors. See miscadmin.h.
|
||||
* errors. See miscadmin.h.
|
||||
*/
|
||||
if (CritSectionCount > 0)
|
||||
elevel = PANIC;
|
||||
@@ -254,7 +254,7 @@ errstart(int elevel, const char *filename, int lineno,
|
||||
*
|
||||
* 2. ExitOnAnyError mode switch is set (initdb uses this).
|
||||
*
|
||||
* 3. the error occurred after proc_exit has begun to run. (It's
|
||||
* 3. the error occurred after proc_exit has begun to run. (It's
|
||||
* proc_exit's responsibility to see that this doesn't turn into
|
||||
* infinite recursion!)
|
||||
*/
|
||||
@@ -351,7 +351,7 @@ errstart(int elevel, const char *filename, int lineno,
|
||||
if (++errordata_stack_depth >= ERRORDATA_STACK_SIZE)
|
||||
{
|
||||
/*
|
||||
* Wups, stack not big enough. We treat this as a PANIC condition
|
||||
* Wups, stack not big enough. We treat this as a PANIC condition
|
||||
* because it suggests an infinite loop of errors during error
|
||||
* recovery.
|
||||
*/
|
||||
@@ -453,7 +453,7 @@ errfinish(int dummy,...)
|
||||
*
|
||||
* Reset InterruptHoldoffCount in case we ereport'd from inside an
|
||||
* interrupt holdoff section. (We assume here that no handler will
|
||||
* itself be inside a holdoff section. If necessary, such a handler
|
||||
* itself be inside a holdoff section. If necessary, such a handler
|
||||
* could save and restore InterruptHoldoffCount for itself, but this
|
||||
* should make life easier for most.)
|
||||
*
|
||||
@@ -479,7 +479,7 @@ errfinish(int dummy,...)
|
||||
* progress, so that we can report the message before dying. (Without
|
||||
* this, pq_putmessage will refuse to send the message at all, which is
|
||||
* what we want for NOTICE messages, but not for fatal exits.) This hack
|
||||
* is necessary because of poor design of old-style copy protocol. Note
|
||||
* is necessary because of poor design of old-style copy protocol. Note
|
||||
* we must do this even if client is fool enough to have set
|
||||
* client_min_messages above FATAL, so don't look at output_to_client.
|
||||
*/
|
||||
@@ -591,7 +591,7 @@ errcode(int sqlerrcode)
|
||||
/*
|
||||
* errcode_for_file_access --- add SQLSTATE error code to the current error
|
||||
*
|
||||
* The SQLSTATE code is chosen based on the saved errno value. We assume
|
||||
* The SQLSTATE code is chosen based on the saved errno value. We assume
|
||||
* that the failing operation was some type of disk file access.
|
||||
*
|
||||
* NOTE: the primary error message string should generally include %m
|
||||
@@ -662,7 +662,7 @@ errcode_for_file_access(void)
|
||||
/*
|
||||
* errcode_for_socket_access --- add SQLSTATE error code to the current error
|
||||
*
|
||||
* The SQLSTATE code is chosen based on the saved errno value. We assume
|
||||
* The SQLSTATE code is chosen based on the saved errno value. We assume
|
||||
* that the failing operation was some type of socket access.
|
||||
*
|
||||
* NOTE: the primary error message string should generally include %m
|
||||
@@ -700,7 +700,7 @@ errcode_for_socket_access(void)
|
||||
* This macro handles expansion of a format string and associated parameters;
|
||||
* it's common code for errmsg(), errdetail(), etc. Must be called inside
|
||||
* a routine that is declared like "const char *fmt, ..." and has an edata
|
||||
* pointer set up. The message is assigned to edata->targetfield, or
|
||||
* pointer set up. The message is assigned to edata->targetfield, or
|
||||
* appended to it if appendval is true. The message is subject to translation
|
||||
* if translateit is true.
|
||||
*
|
||||
@@ -1183,7 +1183,7 @@ elog_start(const char *filename, int lineno, const char *funcname)
|
||||
if (++errordata_stack_depth >= ERRORDATA_STACK_SIZE)
|
||||
{
|
||||
/*
|
||||
* Wups, stack not big enough. We treat this as a PANIC condition
|
||||
* Wups, stack not big enough. We treat this as a PANIC condition
|
||||
* because it suggests an infinite loop of errors during error
|
||||
* recovery. Note that the message is intentionally not localized,
|
||||
* else failure to convert it to client encoding could cause further
|
||||
@@ -1351,7 +1351,7 @@ EmitErrorReport(void)
|
||||
/*
|
||||
* CopyErrorData --- obtain a copy of the topmost error stack entry
|
||||
*
|
||||
* This is only for use in error handler code. The data is copied into the
|
||||
* This is only for use in error handler code. The data is copied into the
|
||||
* current memory context, so callers should always switch away from
|
||||
* ErrorContext first; otherwise it will be lost when FlushErrorState is done.
|
||||
*/
|
||||
@@ -1442,7 +1442,7 @@ FlushErrorState(void)
|
||||
*
|
||||
* A handler can do CopyErrorData/FlushErrorState to get out of the error
|
||||
* subsystem, then do some processing, and finally ReThrowError to re-throw
|
||||
* the original error. This is slower than just PG_RE_THROW() but should
|
||||
* the original error. This is slower than just PG_RE_THROW() but should
|
||||
* be used if the "some processing" is likely to incur another error.
|
||||
*/
|
||||
void
|
||||
@@ -1459,7 +1459,7 @@ ReThrowError(ErrorData *edata)
|
||||
if (++errordata_stack_depth >= ERRORDATA_STACK_SIZE)
|
||||
{
|
||||
/*
|
||||
* Wups, stack not big enough. We treat this as a PANIC condition
|
||||
* Wups, stack not big enough. We treat this as a PANIC condition
|
||||
* because it suggests an infinite loop of errors during error
|
||||
* recovery.
|
||||
*/
|
||||
@@ -1606,7 +1606,7 @@ set_syslog_parameters(const char *ident, int facility)
|
||||
{
|
||||
/*
|
||||
* guc.c is likely to call us repeatedly with same parameters, so don't
|
||||
* thrash the syslog connection unnecessarily. Also, we do not re-open
|
||||
* thrash the syslog connection unnecessarily. Also, we do not re-open
|
||||
* the connection until needed, since this routine will get called whether
|
||||
* or not Log_destination actually mentions syslog.
|
||||
*
|
||||
@@ -2540,7 +2540,7 @@ send_message_to_server_log(ErrorData *edata)
|
||||
*
|
||||
* Note: when there are multiple backends writing into the syslogger pipe,
|
||||
* it's critical that each write go into the pipe indivisibly, and not
|
||||
* get interleaved with data from other processes. Fortunately, the POSIX
|
||||
* get interleaved with data from other processes. Fortunately, the POSIX
|
||||
* spec requires that writes to pipes be atomic so long as they are not
|
||||
* more than PIPE_BUF bytes long. So we divide long messages into chunks
|
||||
* that are no more than that length, and send one chunk per write() call.
|
||||
@@ -2830,7 +2830,7 @@ useful_strerror(int errnum)
|
||||
str = strerror(errnum);
|
||||
|
||||
/*
|
||||
* Some strerror()s return an empty string for out-of-range errno. This
|
||||
* Some strerror()s return an empty string for out-of-range errno. This
|
||||
* is ANSI C spec compliant, but not exactly useful. Also, we may get
|
||||
* back strings of question marks if libc cannot transcode the message to
|
||||
* the codeset specified by LC_CTYPE. If we get nothing useful, first try
|
||||
|
||||
Reference in New Issue
Block a user