- 30 8月, 2011 2 次提交
-
-
由 Tom Lane 提交于
Per bug #6181 from Itagaki Takahiro. Also do some marginal code cleanup and improve error handling.
-
由 Tom Lane 提交于
Per my testing, this works just as well with gcc as it does with HP's compiler; and there is no reason to think that the effect doesn't occur with icc, either. Also, rewrite the header comment about enforcing sequencing around spinlock operations, per Robert's gripe that it was misleading.
-
- 29 8月, 2011 5 次提交
-
-
由 Robert Haas 提交于
At least on this architecture, it's very important to spin on a non-atomic instruction and only retry the atomic once it appears that it will succeed. To fix this, split TAS() into two macros: TAS(), for trying to grab the lock the first time, and TAS_SPIN(), for spinning until we get it. TAS_SPIN() defaults to same as TAS(), but we can override it when we know there's a better way. It's likely that some of the other cases in s_lock.h require similar treatment, but this is the only one we've got conclusive evidence for at present.
-
由 Tom Lane 提交于
On closer inspection, whining in restore_toc_entries_parallel is really much too late for any user-facing error case. The right place to do it is at the start of RestoreArchive(), before we've done anything interesting (suh as trying to DROP all the targets ...) Back-patch to 8.4, where parallel restore was introduced.
-
由 Tom Lane 提交于
If we are unable to do a parallel restore because the input file is stdin or is otherwise unseekable, we should complain and fail immediately, not after having done some of the restore. Complaining once per thread isn't so cool either, and the messages should be worded to make it clear this is an unsupported case not some weird race-condition bug. Per complaint from Lonni Friedman. Back-patch to 8.4, where parallel restore was introduced.
-
由 Tom Lane 提交于
Without this, it's not very easy to tell which compiler version a buildfarm animal is actually using at the moment.
-
由 Bruce Momjian 提交于
their own. Avoid compile problems with defines being redefined after the removal of the #if blocks. Change script to use shell functions for simplicity.
-
- 28 8月, 2011 3 次提交
-
-
由 Tom Lane 提交于
These days, such a response is far more likely to signify a server-side problem, such as fork failure. Reporting "server does not support SSL" (in sslmode=require) could be quite misleading. But the results could be even worse in sslmode=prefer: if the problem was transient and the next connection attempt succeeds, we'll have silently fallen back to protocol version 2.0, possibly disabling features the user needs. Hence, it seems best to just eliminate the assumption that backing off to non-SSL/2.0 protocol is the way to recover from an "E" response, and instead treat the server error the same as we would in non-SSL cases. I tested this change against a pre-7.0 server, and found that there was a second logic bug in the "prefer" path: the test to decide whether to make a fallback connection attempt assumed that we must have opened conn->ssl, which in fact does not happen given an "E" response. After fixing that, the code does indeed connect successfully to pre-7.0, as long as you didn't set sslmode=require. (If you did, you get "Unsupported frontend protocol", which isn't completely off base given the server certainly doesn't support SSL.) Since there seems no reason to believe that pre-7.0 servers exist anymore in the wild, back-patch to all supported branches.
-
由 Peter Eisentraut 提交于
-
由 Tom Lane 提交于
There are assorted situations wherein PQconnectPoll() will abandon a connection attempt and try again with different parameters (eg, SSL versus not SSL). However, the code forgot to discard any pending data in libpq's I/O buffers when doing this. In at least one case (server returns E message during SSL negotiation), there is unread input data which bollixes the next connection attempt. I have not checked to see whether this is possible in the other cases where we close the socket and retry, but it seems like a matter of good defensive programming to add explicit buffer-flushing code to all of them. This is one of several issues exposed by Daniel Farina's report of misbehavior after a server-side fork failure. This has been wrong since forever, so back-patch to all supported branches.
-
- 27 8月, 2011 20 次提交
-
-
由 Bruce Momjian 提交于
include dependencies. Modify pgcompinclude to skip a common fcinfo error.
-
由 Bruce Momjian 提交于
-
由 Peter Eisentraut 提交于
In PostgreSQL, this is included in the SELECT privilege, so show YES or NO depending on whether SELECT is granted.
-
由 Peter Eisentraut 提交于
-
由 Bruce Momjian 提交于
-
由 Bruce Momjian 提交于
-
由 Bruce Momjian 提交于
remove from local *.h files. Per suggestion from Alvaro.
-
由 Bruce Momjian 提交于
-
由 Bruce Momjian 提交于
.h include files before .c files. Mark some includes as needed to be ignored by pgrminclude.
-
由 Bruce Momjian 提交于
-
由 Bruce Momjian 提交于
-
由 Bruce Momjian 提交于
-
由 Bruce Momjian 提交于
-
由 Bruce Momjian 提交于
-
由 Bruce Momjian 提交于
-
由 Bruce Momjian 提交于
-
由 Tom Lane 提交于
tsvector_concat() allocated its result workspace using the "conservative" estimate of the sum of the two input tsvectors' sizes. Unfortunately that wasn't so conservative as all that, because it supposed that the number of pad bytes required could not grow. Which it can, as per test case from Jesper Krogh, if there's a mix of lexemes with positions and lexemes without them in the input data. The fix is to assume that we might add a not-previously-present pad byte for each and every lexeme in the two inputs; which really is conservative, but it doesn't seem worthwhile to try to be more precise. This is an aboriginal bug in tsvector_concat, so back-patch to all versions containing it.
-
由 Tom Lane 提交于
-
由 Tom Lane 提交于
These changes allow backtick command evaluation and psql variable interpolation to happen on substrings of a single meta-command argument. Formerly, no such evaluations happened at all if the backtick or colon wasn't the first character of the argument, and we considered an argument completed as soon as we'd processed one backtick, variable reference, or quoted substring. A string like 'FOO'BAR was thus taken as two arguments not one, not exactly what one would expect. In the new coding, an argument is considered terminated only by unquoted whitespace or backslash. Also, clean up a bunch of omissions, infelicities and outright errors in the psql documentation of variables and metacommand argument syntax.
-
由 Tom Lane 提交于
As in the backend, the implementation actually accepts any non-ASCII character, but we only document that you can use letters.
-
- 26 8月, 2011 10 次提交
-
-
由 Bruce Momjian 提交于
-
由 Andrew Dunstan 提交于
flex puts lex.backup in the current working directory regardless of where the input and output are.
-
由 Bruce Momjian 提交于
-
由 Bruce Momjian 提交于
#if/#ifdefs.
-
由 Bruce Momjian 提交于
introduced recently when trying to filter out temp tables. Backpatch to 9.0 and 9.1.
-
由 Andrew Dunstan 提交于
-
由 Alvaro Herrera 提交于
This was deemed unnecessary initially but in later discussion it was agreed otherwise. Original file from Kevin Grittner, allegedly from Dan Ports. I had to clean up whitespace a bit per changes from Heikki.
-
由 Tom Lane 提交于
Per discussion, we should enforce the policy of "no backtracking" in these performance-sensitive scanners.
-
由 Tom Lane 提交于
Per previous experimentation, backtracking slows down lexing performance significantly (by about a third). It's usually pretty easy to avoid, just need to have rules that accept an incomplete construct and do whatever the lexer would have done otherwise. The backtracking was introduced by the patch that added quoted variable substitution. Back-patch to 9.0 where that was added.
-
由 Tom Lane 提交于
This is recommended in the flex manual, and there seems no good reason not to use it everywhere.
-