aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Add query text to auto_explain output.Andrew Dunstan2010-02-16
| | | | Still to be done: fix docs and fix regression failures under auto_explain.
* Clean up package namespace use and use of Safe in plperl.Andrew Dunstan2010-02-16
| | | | | | | | | | | | | | | Prevent use of another buggy version of Safe.pm. Only register the exit handler if we have successfully created an interpreter. Change log level of perl warnings from NOTICE to WARNING. The infrastructure is there if in future we decide to allow DBAs to specify extra modules that will be allowed in trusted code. However, for now the relevant variables are declared as lexicals rather than as package variables, so that they are not (or should not be) accessible. Mostly code from Tim Bunce, reviewed by Alex Hunsaker, with some tweaks by me.
* Move log_error_verbosity GUC setting to "What to log" section, andBruce Momjian2010-02-16
| | | | document the behavior of terse and verbose output options.
* Honor to_char() "FM" specification in YYY, YY, and Y; it was alreadyBruce Momjian2010-02-16
| | | | | | honored by YYYY. Also document Oracle "toggle" FM behavior. Per report from Guy Rouillier
* Prevent psql version banner from being printed by the \c command if theBruce Momjian2010-02-16
| | | | versions match, per report from Peter.
* Have SELECT and CREATE TABLE AS queries return a row count. While thisBruce Momjian2010-02-16
| | | | | | | is invisible in psql, other interfaces, like libpq, make this value visible. Boszormenyi Zoltan
* Remove personal copyright now that file has been rewritten usingBruce Momjian2010-02-16
| | | | | | existing *.pl conversion script. Andreas 'ads' Scherbaum
* Clarify documentation on the behavior of unnamed bind queries.Bruce Momjian2010-02-16
|
* revert to showing buffer counts in explain (buffers)Greg Stark2010-02-16
|
* Add emulation of non-blocking sockets to the win32 socket/signal layer,Magnus Hagander2010-02-16
| | | | | | | | | and use this in pq_getbyte_if_available. It's only a limited implementation which swithes the whole emulation layer no non-blocking mode, but that's enough as long as non-blocking is only used during a short period of time, and only one socket is accessed during this time.
* Do not check nan values for infinity. Some system are not able to handle this.Michael Meskes2010-02-16
| | | | By Zoltán Böszörményi
* Move main error message text in plperl into errmsg from errdetail,Alvaro Herrera2010-02-15
| | | | | | | | and move the context information into errcontext instead of errmsg. This makes them better conform to our guidelines. Also remove a few errcode declarations that were providing the default value ERRCODE_INTERNAL_ERROR.
* When sorting functions in pg_dump, break ties (same name) by number of argumentsPeter Eisentraut2010-02-15
|
* Fix another stupid typo...Magnus Hagander2010-02-15
| | | | Jan Urbanski
* Fix typo in commentAlvaro Herrera2010-02-15
|
* Temporarily disable fsyncing the database directory in CREATE DATABASEGreg Stark2010-02-15
| | | | | | until we can work out portability issues the build farm uncovered. In passing avoid fsyncing subdirectories twice.
* remove an unused variable 'dirfd'.Itagaki Takahiro2010-02-15
|
* Add psql tab completion for DO blocks.Itagaki Takahiro2010-02-15
| | | | | | Also adjust documentation of DO. Patch from David Fetter and subsequent discussion.
* Display explain buffers measurements in memory units rather than blocks. ↵Greg Stark2010-02-15
| | | | Also show "Total Buffer Usage" to hint that these are totals not averages per loop
* Speed up CREATE DATABASE by deferring the fsyncs until after copyingGreg Stark2010-02-15
| | | | | | | | | | all the data and using posix_fadvise to nudge the OS into flushing it earlier. This also hopefully makes CREATE DATABASE avoid spamming the cache. Tests show a big speedup on Linux at least on some filesystems. Idea and patch from Andres Freund.
* Wrap calls to SearchSysCache and related functions using macros.Robert Haas2010-02-14
| | | | | | | | | | | | The purpose of this change is to eliminate the need for every caller of SearchSysCache, SearchSysCacheCopy, SearchSysCacheExists, GetSysCacheOid, and SearchSysCacheList to know the maximum number of allowable keys for a syscache entry (currently 4). This will make it far easier to increase the maximum number of keys in a future release should we choose to do so, and it makes the code shorter, too. Design and review by Tom Lane.
* Make CREATE DATABASE safe against losing whole files by fsyncing theGreg Stark2010-02-14
| | | | | | | directory and not just the individual files. Back-patch to 8.1 -- before that we just called "cp -r" and never fsynced anything anyways.
* Make the msvc build system ask python about details of version and installationMagnus Hagander2010-02-14
| | | | | | | | | prefix, instead of assuming it will always be following the default layout. All information we need is not available on Windows, but the number of assumptions are at least fewer this way than before. Based on suggestions from James William Pye.
* Improve C comment about why we return "0 0" for some tags.Bruce Momjian2010-02-13
|
* Don't expose the inline definition of MemoryContextSwitchTo when FRONTEND isTom Lane2010-02-13
| | | | | | defined. Its reference to CurrentMemoryContext causes link failures on some platforms, evidently because the inline function gets compiled despite lack of use. Per buildfarm member warthog.
* Improvements to ps message of startup process during Hot Standby.Simon Riggs2010-02-13
| | | | | | Message is reset earlier and potential bug avoided. Andres Freund
* Fix relcache init file invalidation during Hot Standby for the caseSimon Riggs2010-02-13
| | | | | | | | where a database has a non-default tablespaceid. Pass thru MyDatabaseId and MyDatabaseTableSpace to allow file path to be re-created in standby and correct invalidation to take place in all cases. Update and rework xact_commit_desc() debug messages. Bug report from Tom by code inspection. Fix by me.
* Support inlining various small performance-critical functions on non-GCCTom Lane2010-02-13
| | | | | | | | | compilers, by applying a configure check to see if the compiler will accept an unreferenced "static inline foo ..." function without warnings. It is believed that such warnings are the only reason not to declare inlined functions in headers, if the compiler understands "inline" at all. Kurt Harriman
* Re-enable max_standby_delay = -1 using deadlock detection on startupSimon Riggs2010-02-13
| | | | | | | | process. If startup waits on a buffer pin we send a request to all backends to cancel themselves if they are holding the buffer pin required and they are also waiting on a lock. If not, startup waits until max_standby_delay before cancelling any backend waiting for the requested buffer pin.
* Introduce WAL records to log reuse of btree pages, allowing conflictSimon Riggs2010-02-13
| | | | | resolution during Hot Standby. Page reuse interlock requested by Tom. Analysis and patch by me.
* Tweak the order of processing of WITH clauses so that they are processedTom Lane2010-02-12
| | | | | | | | | before we start analyzing the parent statement. This is to make it more clear that the WITH isn't affected by anything in the parent. I don't believe there's any actual bug here, because the stuff that was being done before WITH didn't affect subqueries; but it's certainly a potential for error (and apparently misled Marko into committing some real errors...).
* Add regression test files inadvertantly omitted in plperl.on_plperl{u}_init ↵Andrew Dunstan2010-02-12
| | | | patch
* Don't choke when exec_move_row assigns a synthesized null to a columnTom Lane2010-02-12
| | | | | | | that happens to be composite itself. Per bug #5314 from Oleg Serov. Backpatch to 8.0 --- 7.4 has got too many other shortcomings in composite-type support to make this worth worrying about in that branch.
* Add plperl.on_plperl_init and plperl.on_plperlu_init settings for ↵Andrew Dunstan2010-02-12
| | | | language-specific startup. Rename recently added plperl.on_perl_init to plperl.on_init. Also, code cleanup for utf8 hack. Patch from Tim Bunce, reviewed by Alex Hunsaker.
* Extend the set of frame options supported for window functions.Tom Lane2010-02-12
| | | | | | | | | This patch allows the frame to start from CURRENT ROW (in either RANGE or ROWS mode), and it also adds support for ROWS n PRECEDING and ROWS n FOLLOWING start and end points. (RANGE value PRECEDING/FOLLOWING isn't there yet --- the grammar works, but that's all.) Hitoshi Harada, reviewed by Pavel Stehule
* Reduce the chatter to the log when starting a standby server. Don'tHeikki Linnakangas2010-02-12
| | | | | | | | | echo all the recovery.conf options. Don't emit the "initializing recovery connections" message, which doesn't mean anything to a user. Remove the "starting archive recovery" message and replace the "automatic recovery in progress" message with a more informative message saying whether the server is doing PITR, normal archive recovery, or standby mode.
* If primary_conninfo is not set, don't try to establish streamingHeikki Linnakangas2010-02-12
| | | | connection.
* Check for partial WAL files in standby mode. If restore_command restoresHeikki Linnakangas2010-02-12
| | | | | | | a partial WAL file, assume it's because the file is just being copied to the archive and treat it the same as "file not found" in standby mode. pg_standby has a similar check, so it seems reasonable to have the same level of protection in the built-in standby mode.
* Free reference in correct Perl context. Backpatch to release 8.2. Patch from ↵Andrew Dunstan2010-02-12
| | | | Tim Bunce.
* Suppress uninitialized-variable warning.Tom Lane2010-02-11
|
* Fix typo bug in Hot Standby from recent refactoring. Bug introducedSimon Riggs2010-02-11
| | | | | into code recently patched by Andres Freund, so quickly fixed by him when bug report from Tatsuo Ishii arrived.
* Generic implementation of red-black binary tree. It's planned to use inTeodor Sigaev2010-02-11
| | | | | | several places, but for now only GIN uses it during index creation. Using self-balanced tree greatly speeds up index creation in corner cases with preordered data.
* Now that streaming replication switches between streaming mode andHeikki Linnakangas2010-02-10
| | | | | | | restoring from archive, the last WAL segment is not necessarily open at the end of recovery. Fix assertion that assumed that. Fujii Masao, fixing the assertion failure reported by Martin Pihlak.
* Improve planner's choices about when to use hashing vs sorting for DISTINCT.Tom Lane2010-02-10
| | | | | | | The previous coding missed a bet by sometimes picking the "sorted" path from query_planner even though hashing would be preferable. To fix, we have to be willing to make the choice sooner. This contorts things a little bit, but I thought of a factorization that makes it not too awful.
* Fix up rickety handling of relation-truncation interlocks.Tom Lane2010-02-09
| | | | | | | | | | | | | | | | | | | | Move rd_targblock, rd_fsm_nblocks, and rd_vm_nblocks from relcache to the smgr relation entries, so that they will get reset to InvalidBlockNumber whenever an smgr-level flush happens. Because we now send smgr invalidation messages immediately (not at end of transaction) when a relation truncation occurs, this ensures that other backends will reset their values before they next access the relation. We no longer need the unreliable assumption that a VACUUM that's doing a truncation will hold its AccessExclusive lock until commit --- in fact, we can intentionally release that lock as soon as we've completed the truncation. This patch therefore reverts (most of) Alvaro's patch of 2009-11-10, as well as my marginal hacking on it yesterday. We can also get rid of assorted no-longer-needed relcache flushes, which are far more expensive than an smgr flush because they kill a lot more state. In passing this patch fixes smgr_redo's failure to perform visibility-map truncation, and cleans up some rather dubious assumptions in freespace.c and visibilitymap.c about when rd_fsm_nblocks and rd_vm_nblocks can be out of date.
* Fix bug in GIN WAL redo cleanup function: don't free fake relcache entryHeikki Linnakangas2010-02-09
| | | | | | while it's still being used. Backpatch to 8.4, where the fake relcache method was introduced.
* Typo fix, per Thom BrownMagnus Hagander2010-02-09
|
* Define the value for in6addr_any on MingW, since it provides the structMagnus Hagander2010-02-09
| | | | | only in the header files and not in any libraries, yet declare it as an extern.
* First try to make this one ecpg regression test work on Windows too. I'm ↵Michael Meskes2010-02-09
| | | | just trying to figure out the minimal amount of defines needed.
* Allow free space map vacuuming to be interrupted.Tom Lane2010-02-09
|