aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* Add missing --use-existing --help mention from regression binary.Bruce Momjian2010-06-12
| | | | Jan Urba?ski
* Fix typo/bug, found by Clang compilerPeter Eisentraut2010-06-12
|
* Update Python version informationPeter Eisentraut2010-06-12
|
* Add a regression test case for bug #5497Peter Eisentraut2010-06-12
|
* Add missing 'Z' letter to getopt_long call --- the newly addedTom Lane2010-06-11
| | | | | | --analyze-only switch did not work in its short form -Z. Josh Berkus
* Use "replication" as the database name when constructing a connectionHeikki Linnakangas2010-06-11
| | | | | | | | string for a streaming replication connection. It's ignored by the server, but allows libpq to pick up the password from .pgpass where "replication" is specified as the database name. Patch by Fujii Masao per Tom's suggestion, with some wording changes by me.
* Rename restartpoint_command to archive_cleanup_command.Itagaki Takahiro2010-06-10
|
* Make TriggerFile variable static. It's not used outside xlog.c.Heikki Linnakangas2010-06-10
| | | | Fujii Masao
* Return NULL instead of 0/0 in pg_last_xlog_receive_location() andHeikki Linnakangas2010-06-10
| | | | | | pg_last_xlog_replay_location(). Per Robert Haas's suggestion, after Itagaki Takahiro pointed out an issue in the docs. Also, some wording changes in the docs by me.
* Fix quite-bogus handling of arrays in plpython datum-to-PyObjectTom Lane2010-06-10
| | | | conversion. Per bug #5497 from David Gardner.
* Quote all string values in EXPLAIN (FORMAT YAML) output.Robert Haas2010-06-10
| | | | | | | | | | | While my previous attempt seems to always produce valid YAML, it doesn't always produce YAML that means what it appears to mean, because of tokens like "0xa" and "true", which without quotes will be interpreted as integer or Boolean literals. So, instead, just quote everything that's not known to be a number, as we do for JSON. Dean Rasheed, with some changes to the comments by me.
* Remove stray word from comment.Robert Haas2010-06-09
|
* In standby mode, respect checkpoint_segments in addition toHeikki Linnakangas2010-06-09
| | | | | | | | | | | | | checkpoint_timeout to trigger restartpoints. We used to deliberately only do time-based restartpoints, because if checkpoint_segments is small we would spend time doing restartpoints more often than really necessary. But now that restartpoints are done in bgwriter, they're not as disruptive as they used to be. Secondly, because streaming replication stores the streamed WAL files in pg_xlog, we want to clean it up more often to avoid running out of disk space when checkpoint_timeout is large and checkpoint_segments small. Patch by Fujii Masao, with some minor changes by me.
* Make the walwriter close it's handle to an old xlog segment if it's no longerMagnus Hagander2010-06-09
| | | | | | | | | the current one. Not doing this would leave the walwriter with a handle to a deleted file if there was nothing for it to do for a long period of time, preventing the file from being completely removed. Reported by Tollef Fog Heen, and thanks to Heikki for some hand-holding with the patch.
* Attempt to fix EXPLAIN (FORMAT YAML) quoting to behave sanely.Robert Haas2010-06-09
| | | | | | | | | The previous code failed to quote in many cases where quoting was necessary - YAML has loads of special characters, including -:[]{},"'|*& - so quote much more aggressively, and only refrain from quoting things where it seems fairly clear that it isn't necessary. Per report from Dean Rasheed.
* Fix typo in the header comment. Per request from Masao Fujii.Tatsuo Ishii2010-06-09
|
* Avoid useless snprintf() call when update_process_title is turned off.Tom Lane2010-06-07
| | | | Fujii Masao
* Ensure default-only storage parameters for TOAST relationsItagaki Takahiro2010-06-07
| | | | | | | | | | | | | | | | | | to be initialized with proper values. Affected parameters are fillfactor, analyze_threshold, and analyze_scale_factor. Especially uninitialized fillfactor caused inefficient page usage because we built a StdRdOptions struct in which fillfactor is zero if any reloption is set for the toast table. In addition, we disallow toast.autovacuum_analyze_threshold and toast.autovacuum_analyze_scale_factor because we didn't actually support them; they are always ignored. Report by Rumko on pgsql-bugs on 12 May 2010. Analysis by Tom Lane and Alvaro Herrera. Patch by me. Backpatch to 8.4.
* Added variable handling for RETURNING clause to ecpg.Michael Meskes2010-06-04
| | | | | | | While the values were correctly returned they were not moved into C variables as they should be. Closes: #5489
* tag 9.0beta2REL9_0_BETA2Marc G. Fournier2010-06-04
|
* Adjust misleading comment in walsender.c. We try to send all WAL data that'sTom Lane2010-06-03
| | | | | been written out from shared memory, but the previous phrasing might be read to say that we send only what's been fsync'd.
* Add current WAL end (as seen by walsender, ie, GetWriteRecPtr() result)Tom Lane2010-06-03
| | | | | | | | and current server clock time to SR data messages. These are not currently used on the slave side but seem likely to be useful in future, and it'd be better not to change the SR protocol after release. Per discussion. Also do some minor code review and cleanup on walsender.c, and improve the protocol documentation.
* Translation updates for 9.0beta2Peter Eisentraut2010-06-03
|
* Fix some inconsistent quoting of wal_level values in messagesPeter Eisentraut2010-06-03
| | | | | | When referring to postgresql.conf syntax, then it's without quotes (wal_level=archive); in narrative it's with double quotes. But never single quotes.
* Add comments about definitions that may affect PG_CONTROL_VERSION,Alvaro Herrera2010-06-03
| | | | per recent unintended-initdb-forcing fiasco
* Fix reference to nonexistent configure optionPeter Eisentraut2010-06-03
| | | | --enable-ssl -> --with-openssl
* Bump PG_CONTROL_VERSION to account for the incompatible change committed ↵Tom Lane2010-06-03
| | | | earlier.
* On clean shutdown during recovery, don't warn about possible corruption.Robert Haas2010-06-03
| | | | Fujii Masao. Review by Heikki Linnakangas and myself.
* Fix obsolete comments that I neglected to update in a previous patch.Heikki Linnakangas2010-06-02
| | | | Fujii Masao
* Show schema name for REINDEX.Bruce Momjian2010-06-01
| | | | Greg Sabino Mullane
* Add error hint that PL/pgSQL "EXECUTE of SELECT ... INTO" can beBruce Momjian2010-05-31
| | | | | | performed by "EXECUTE ... INTO". Jaime Casanova
* Send all outstanding WAL before exiting when smart shutdown is requested.Heikki Linnakangas2010-05-31
| | | | | | This was broken by my previous patch to send WAL in smaller batches. Patch by Fujii Masao.
* Fix misuse of Lossy Counting (LC) algorithm in compute_tsvector_stats().Tom Lane2010-05-30
| | | | | | | | | | | | | | | | | | | We must filter out hashtable entries with frequencies less than those specified by the algorithm, else we risk emitting junk entries whose actual frequency is much less than other lexemes that did not get tabulated. This is bad enough by itself, but even worse is that tsquerysel() believes that the minimum frequency seen in pg_statistic is a hard upper bound for lexemes not included, and was thus underestimating the frequency of non-MCEs. Also, set the threshold frequency to something with a little bit of theory behind it, to wit assume that the input distribution is approximately Zipfian. This might need adjustment in future, but some preliminary experiments suggest that it's not too unreasonable. Back-patch to 8.4, where this code was introduced. Jan Urbanski, with some editorialization by Tom
* Change the notation for calling functions with named parameters fromTom Lane2010-05-30
| | | | | | | | | | | | | "val AS name" to "name := val", as per recent discussion. This patch catches everything in the original named-parameters patch, but I'm not certain that no other dependencies snuck in later (grepping the source tree for all uses of AS soon proved unworkable). In passing I note that we've dropped the ball at least once on keeping ecpg's lexer (as opposed to parser) in sync with the backend. It would be a good idea to go through all of pgc.l and see if it's in sync now. I didn't attempt that at the moment.
* Add C comment that we will have to remove an exclusion constraint checkBruce Momjian2010-05-29
| | | | | | if we ever implement '<>' index opclasses. Jeff Davis
* Abort a FETCH_COUNT-controlled query if we observe any I/O error on theTom Lane2010-05-28
| | | | | | | | output stream. This typically indicates that the user quit out of $PAGER, or that we are writing to a file and ran out of disk space. In either case we shouldn't bother to continue fetching data. Stephen Frost
* Fix oversight in the previous patch that made LIKE throw error for \ at theTom Lane2010-05-28
| | | | | | end of the pattern: the code path that handles \ just after % should throw error too. As in the previous patch, not back-patching for fear of breaking apps that worked before.
* Rewrite LIKE's %-followed-by-_ optimization so it really works (this timeTom Lane2010-05-28
| | | | | | | | | | | for sure ;-)). It now also optimizes more cases, such as %_%_. Improve comments too. Per bug #5478. In passing, also rename the TCHAR macro to GETCHAR, because pgindent is messing with the formatting of the former (apparently it now thinks TCHAR is a typedef name). Back-patch to 8.3, where the bug was introduced.
* PGDLLEXPORT is __declspec (dllexport) only on MSVC,Itagaki Takahiro2010-05-28
| | | | | but is __declspec (dllimport) on other compilers because cygwin and mingw don't like dllexport.
* Rejigger mergejoin logic so that a tuple with a null in the first merge columnTom Lane2010-05-28
| | | | | | | | | | | | | | | | | | | is treated like end-of-input, if nulls sort last in that column and we are not doing outer-join filling for that input. In such a case, the tuple cannot join to anything from the other input (because we assume mergejoinable operators are strict), and neither can any tuple following it in the sort order. If we're not interested in doing outer-join filling we can just pretend the tuple and its successors aren't there at all. This can save a great deal of time in situations where there are many nulls in the join column, as in a recent example from Scott Marlowe. Also, since the planner tends to not count nulls in its mergejoin scan selectivity estimates, this is an important fix to make the runtime behavior more like the estimate. I regard this as an omission in the patch I wrote years ago to teach mergejoin that tuples containing nulls aren't joinable, so I'm back-patching it. But only to 8.3 --- in older versions, we didn't have a solid notion of whether nulls sort high or low, so attempting to apply this optimization could break things.
* Change ps_status.c to explicitly track the current logical length of ps_buffer.Tom Lane2010-05-27
| | | | | | | | | | | This saves cycles in get_ps_display() on many popular platforms, and more importantly ensures that get_ps_display() will correctly return an empty string if init_ps_display() hasn't been called yet. Per trouble report from Ray Stell, in which log_line_prefix %i produced junk early in backend startup. Back-patch to 8.0. 7.4 doesn't have %i and its version of get_ps_display() makes no pretense of avoiding pad junk anyhow.
* Fix the volatility marking of textanycat() and anytextcat(): they were markedTom Lane2010-05-27
| | | | | | | | | | | | immutable, but that is wrong in general because the cast from the polymorphic argument to text could be stable or even volatile. Mark them volatile for safety. In the typical case where the cast isn't volatile, the planner will deduce the correct expression volatility after inlining the function, so performance is not lost. The just-committed fix in CREATE INDEX also ensures this won't break any indexing cases that ought to be allowed. Per discussion, I'm not bumping catversion for this change, as it doesn't seem critical enough to force an initdb on beta testers.
* Make CREATE INDEX run expression preprocessing on a proposed index expressionTom Lane2010-05-27
| | | | | | | | | | | | | | | | | | | | | before it checks whether the expression is immutable. This covers two cases that were previously handled poorly: 1. SQL function inlining could reduce the apparent volatility of the expression, allowing an expression to be accepted where it previously would not have been. As an example, polymorphic functions must be marked with the worst-case volatility they have for any argument type, but for specific argument types they might not be so volatile, so indexing could be allowed. (Since the planner will refuse to inline functions in cases where the apparent volatility of the expression would increase, this won't break any cases that were accepted before.) 2. A nominally immutable function could have default arguments that are volatile expressions. In such a case insertion of the defaults will increase both the apparent and actual volatility of the expression, so it is *necessary* to check this before allowing the expression to be indexed. Back-patch to 8.4, where default arguments were introduced.
* Mark PG_MODULE_MAGIC and PG_FUNCTION_INFO_V1 with PGDLLEXPORTItagaki Takahiro2010-05-27
| | | | independently from BUILDING_DLL. It is always __declspec(dllexport).
* Avoid starting walreceiver in states where it shouldn't be running.Robert Haas2010-05-27
| | | | | | | | In particular, it's bad to start walreceiver when in state PM_WAIT_BACKENDS, because we have no provision to kill walreceiver when in that state. Fujii Masao
* Adjust comment to reflect that we now have Hot Standby. Pointed out byHeikki Linnakangas2010-05-27
| | | | Robert Haas.
* Thinko in previous commit: ensure that MAX_SEND_SIZE is always greaterHeikki Linnakangas2010-05-26
| | | | | than XLOG_BLCKSZ, by defining it as 16 * XLOG_BLCKSZ rather than directly as 128k bytes.
* In walsender, don't sleep if there's outstanding WAL waiting to be sent,Heikki Linnakangas2010-05-26
| | | | | | otherwise we effectively rate-limit the streaming as pointed out by Simon Riggs. Also, send the WAL in smaller chunks, to respond to signals more promptly.
* Rearrange libpq's SSL initialization to simplify it and make it handle someTom Lane2010-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | additional cases correctly. The original coding failed to load additional (chain) certificates from the client cert file, meaning that indirectly signed client certificates didn't work unless one hacked the server's root.crt file to include intermediate CAs (not the desired approach). Another problem was that everything got loaded into the shared SSL_context object, which meant that concurrent connections trying to use different sslcert settings could well fail due to conflicting over the single available slot for a keyed certificate. To fix, get rid of the use of SSL_CTX_set_client_cert_cb(), which is deprecated anyway in the OpenSSL documentation, and instead just unconditionally load the client cert and private key during connection initialization. This lets us use SSL_CTX_use_certificate_chain_file(), which does the right thing with additional certs, and is lots simpler than the previous hacking about with BIO-level access. A small disadvantage is that we have to load the primary client cert a second time with SSL_use_certificate_file, so that that one ends up in the correct slot within the connection's SSL object where it can get paired with the key. Given the other overhead of making an SSL connection, that doesn't seem worth worrying about. Per discussion ensuing from bug #5468.
* Fix bogus error message for SSL-cert authentication, due to lack ofTom Lane2010-05-26
| | | | | a uaCert entry in auth_failed(). Put the switch entries into a sane order, namely the one the enum is declared in.