summaryrefslogtreecommitdiff
path: root/src/backend/utils
AgeCommit message (Collapse)Author
2006-09-02Remove GUC_REPORT for new "server_version_num" GUC variable. AddedBruce Momjian
overhead for every connection, per Tom.
2006-09-02Add new variable "server_version_num", which is almost the same asBruce Momjian
"server_version" but uses the handy PG_VERSION_NUM which allows apps to do things like if ($version >= 80200) without having to parse apart the value of server_version themselves. Greg Sabino Mullane greg@turnstep.com
2006-08-31Repair interpretation of GB as MB.Peter Eisentraut
2006-08-29Revert change to turn autovacuum on by default.Peter Eisentraut
2006-08-29Now bind displays prepare as detail, and execute displays prepare andBruce Momjian
optionally bind. I re-added the "statement:" label so people will understand why the line is being printed (it is log_*statement behavior). Use single quotes for bind values, instead of double quotes, and double literal single quotes in bind values (and document that). I also made use of the DETAIL line to have much cleaner output.
2006-08-28Turn autovacuum on by default. (stats_row_level is also on by default.)Peter Eisentraut
Threshold and scale factor are cut in half for more aggressive behavior.
2006-08-27Add some notes about why it's not a bug that RI_FKey_check callsTom Lane
HeapTupleSatisfiesItself without doing LockBuffer first. This code is a bit fragile, but AFAICS it's not actually broken.
2006-08-25Add the ability to create indexes 'concurrently', that is, withoutTom Lane
blocking concurrent writes to the table. Greg Stark, with a little help from Tom Lane.
2006-08-22In new "invalid byte sequence" error hint, call it "error", notBruce Momjian
"failure".
2006-08-22Add hint for "invalid byte sequence for encoding" error message,Bruce Momjian
suggesting review of client_encoding.
2006-08-21Minor code rearrangement to save a few cycles in RI_FKey_check whenTom Lane
the subject tuple is already deleted: we need not open the pk_rel until after we check that.
2006-08-21Fix all known problems with pg_dump's handling of serial sequencesTom Lane
by abandoning the idea that it should say SERIAL in the dump. Instead, dump serial sequences and column defaults just like regular ones. Add a new backend command ALTER SEQUENCE OWNED BY to let pg_dump recreate the sequence-to-column dependency that was formerly created "behind the scenes" by SERIAL. This restores SERIAL to being truly "just a macro" consisting of component operations that can be stated explicitly in SQL. Furthermore, the new command allows sequence ownership to be reassigned, so that old mistakes can be cleaned up. Also, downgrade the OWNED-BY dependency from INTERNAL to AUTO, since there is no longer any very compelling argument why the sequence couldn't be dropped while keeping the column. (This forces initdb, to be sure the right kinds of dependencies are in there.) Along the way, add checks to prevent ALTER OWNER or SET SCHEMA on an owned sequence; you can now only do this indirectly by changing the owning table's owner or schema. This is an oversight in previous releases, but probably not worth back-patching.
2006-08-19Add a 'waiting' column to pg_stat_activity to carry the same informationTom Lane
that ps_status provides by appending 'waiting' to the PS display. This completes the project of making it feasible to turn off process title updates and instead rely on pg_stat_activity. Per my suggestion a few weeks ago.
2006-08-17Implement archive_timeout feature to force xlog file switches to occur no moreTom Lane
than N seconds apart. This allows a simple, if not very high performance, means of guaranteeing that a PITR archive is no more than N seconds behind real time. Also make pg_current_xlog_location return the WAL Write pointer, add pg_current_xlog_insert_location to return the Insert pointer, and fix pg_xlogfile_name_offset to return its results as a two-element record instead of a smashed-together string, as per recent discussion. Simon Riggs
2006-08-16Seems some C compilers think 'restrict' is a fully reserved word.Tom Lane
Per buildfarm results from warthog.
2006-08-15Add a hack so that get_type_io_data() can work from bootstrap.c'sTom Lane
internal TypInfo table in bootstrap mode. This allows array_in and array_out to be used during early bootstrap, which eliminates the former obstacle to giving OUT parameters to built-in functions.
2006-08-15Add server support for "plugin" libraries that can be used for add-on tasksTom Lane
such as debugging and performance measurement. This consists of two features: a table of "rendezvous variables" that allows separately-loaded shared libraries to communicate, and a new GUC setting "local_preload_libraries" that allows libraries to be loaded into specific sessions without explicit cooperation from the client application. To make local_preload_libraries as flexible as possible, we do not restrict its use to superusers; instead, it is restricted to load only libraries stored in $libdir/plugins/. The existing LOAD command has also been modified to allow non-superusers to LOAD libraries stored in this directory. This patch also renames the existing GUC variable preload_libraries to shared_preload_libraries (after a suggestion by Simon Riggs) and does some code refactoring in dfmgr.c to improve clarity. Korry Douglas, with a little help from Tom Lane.
2006-08-14Fix oversight in initial implementation of PORTAL_ONE_RETURNING mode: weTom Lane
cannot assume that there's exactly one Query in the Portal, as we can for ONE_SELECT mode, because non-SELECT queries might have extra queries added during rule rewrites. Fix things up so that we'll use ONE_RETURNING mode when a Portal contains one primary (canSetTag) query and that query has a RETURNING list. This appears to be a second showstopper reason for running the Portal to completion before we start to hand anything back --- we want to be sure that the rule-added queries get run too.
2006-08-14Remove hash_destroy calls in hash_create's failure paths. As noted byTom Lane
a Coverity warning, these are risky since the hashtable isn't necessarily fully set up yet. They're unnecessary anyway: a deletable hashtable should be in a memory context that will be cleared following elog(ERROR). Per report from Martijn van Oosterhout.
2006-08-14Revert (again) GUC patch to return commented fields to their defaultBruce Momjian
values, due to concern about the patch.
2006-08-13Fix recent guc comment-to-default patch for custom variables.Bruce Momjian
2006-08-13Recommit patch to allow commented GUC variables to return to theirBruce Momjian
default values.
2006-08-13Re-apply guc cleanup patch, with memory allocation bugs fixed.Bruce Momjian
2006-08-12Back out patch to reorganize guc processing. Was causing regressionBruce Momjian
failures.
2006-08-12Back out patch that allowed commented guc variables to return to theirBruce Momjian
default values. Was causing regression failures.
2006-08-12Add INSERT/UPDATE/DELETE RETURNING, with basic docs and regression tests.Tom Lane
plpgsql support to come later. Along the way, convert execMain's SELECT INTO support into a DestReceiver, in order to eliminate some ugly special cases. Jonah Harris and Tom Lane
2006-08-11Allow commenting of variables in postgresql.conf to restore them toBruce Momjian
defaults. Zdenek Kotala
2006-08-11Refactor GUC set_config_option function:Bruce Momjian
The main reason for refactoring was that set_config_option() was too overloaded function and its behavior did not consistent. Old version of set_config_function hides some messages. For example if you type: tcp_port = 5432.1 then old implementation ignore this error without any message to log file in the signal context (configuration reload). Main problem was that semantic analysis of postgresql.conf is not perform in the ProcessConfigFile function, but in the set_config_options *after* context check. This skipped check for variables with PG_POSTMASTER context. There was request from Joachim Wieland to add more messages about ignored changes in the config file as well. Zdenek Kotala
2006-08-08Add a feature for automatic initialization and finalization of dynamicallyTom Lane
loaded libraries: call functions _PG_init() and _PG_fini() if the library defines such symbols. Hence we no longer need to specify an initialization function in preload_libraries: we can assume that the library used the _PG_init() convention, instead. This removes one source of pilot error in use of preloaded libraries. Original patch by Ralf Engelschall, preload_libraries changes by me.
2006-08-08For protocol-level prepare/bind/execute:Bruce Momjian
o print user name for all o print portal name if defined for all o print query for all o reduce log_statement header to single keyword o print bind parameters as DETAIL if text mode
2006-08-04Fix domain_in() bug exhibited by Darcy Buskermolen. The idea of an EStateTom Lane
that's shorter-lived than the expression state being evaluated in it really doesn't work :-( --- we end up with fn_extra caches getting deleted while still in use. Rather than abandon the notion of caching expression state across domain_in calls altogether, I chose to make domain_in a bit cozier with ExprContext. All we really need for evaluating variable-free expressions is an ExprContext, not an EState, so I invented the notion of a "standalone" ExprContext. domain_in can prevent resource leakages by doing a ReScanExprContext on this rather than having to free it entirely; so we can make the ExprContext have the same lifespan (and particularly the same per_query memory context) as the expression state structs.
2006-08-02Move 'ddl' right after 'none' in postgresql.conf. It used to be betweenBruce Momjian
'mod' and 'all', which is not the right order. SGML documentation order was correct. Report from Chander Ganesan.
2006-08-02Add support for multi-row VALUES clauses as part of INSERT statementsJoe Conway
(e.g. "INSERT ... VALUES (...), (...), ...") and elsewhere as allowed by the spec. (e.g. similar to a FROM clause subselect). initdb required. Joe Conway and Tom Lane.
2006-07-31Change the relation_open protocol so that we obtain lock on a relationTom Lane
(table or index) before trying to open its relcache entry. This fixes race conditions in which someone else commits a change to the relation's catalog entries while we are in process of doing relcache load. Problems of that ilk have been reported sporadically for years, but it was not really practical to fix until recently --- for instance, the recent addition of WAL-log support for in-place updates helped. Along the way, remove pg_am.amconcurrent: all AMs are now expected to support concurrent update.
2006-07-29Adjust initialization sequence for timezone_abbreviations so thatTom Lane
it's handled just about like timezone; in particular, don't try to read anything during InitializeGUCOptions. Should solve current startup failure on Windows, and avoid wasted cycles if a nondefault setting is specified in postgresql.conf too. Possibly we need to think about a more general solution for handling 'expensive to set' GUC options.
2006-07-28SQL2003-standard statistical aggregates, by Sergey Koposov. I've added onlyTom Lane
the float8 versions of the aggregates, which is all that the standard requires. Sergey's original patch also provided versions using numeric arithmetic, but given the size and slowness of the code, I doubt we ought to include those in core.
2006-07-27Aggregate functions now support multiple input arguments. I also tookTom Lane
the opportunity to treat COUNT(*) as a zero-argument aggregate instead of the old hack that equated it to COUNT(1); this is materially cleaner (no more weird ANYOID cases) and ought to be at least a tiny bit faster. Original patch by Sergey Koposov; review, documentation, simple regression tests, pg_dump and psql support by moi.
2006-07-27Allow units to be specified with configuration settings.Peter Eisentraut
2006-07-26Work around bug in strxfmt() but in MS VS2005.Bruce Momjian
William ZHANG
2006-07-26When a GUC string variable is not set, print the empty string (in SHOW etc.),Peter Eisentraut
not "unset". An "unset" state doesn't really exist; all variables behave like an empty string value if the string being pointed to has not been initialized.
2006-07-26Convert effective_cache_size to an integer, for better integration withPeter Eisentraut
upcoming units feature.
2006-07-25Remove hard-wired lists of timezone abbreviations in favor of providingTom Lane
configuration files that can be altered by a DBA. The australian_timezones GUC setting disappears, replaced by a timezone_abbreviations setting (set this to 'Australia' to get the effect of australian_timezones). The list of zone names defined by default has undergone a bit of cleanup, too. Documentation still needs some work --- in particular, should we fix Table B-4, or just get rid of it? Joachim Wieland, with some editorializing by moi.
2006-07-24DTrace support, with a small initial set of probesPeter Eisentraut
by Robert Lor
2006-07-24Mark postgresql.conf entries that require server restart; some minorPeter Eisentraut
editing and reformatting.
2006-07-24Add a fudge factor to genericcostestimate() to prevent the planner fromTom Lane
thinking that indexes of different sizes are equally attractive. Per gripe from Jim Nasby. (I remain unconvinced that there's such a problem in existing releases, but CVS HEAD definitely has got a problem because of its new count-only-leaf-pages approach to indexscan costing.)
2006-07-23Convert the lock manager to use the new dynahash.c support for partitionedTom Lane
hash tables, instead of the previous kluge involving multiple hash tables. This partially undoes my patch of last December.
2006-07-22Add support to dynahash.c for partitioning shared hashtables accordingTom Lane
to the low-order bits of the entry hash value. Also make some incidental cleanups in the dynahash API, such as not exporting the hash header structs to the world.
2006-07-21Add the full set of comparison functions for type TID, including a btreeTom Lane
opclass. This is not so much because anyone's likely to create an index on TID, as that sorting TIDs can be useful. Also added max and min aggregates while at it, so that one can investigate the clusteredness of a table with queries like SELECT min(ctid), max(ctid) FROM tab WHERE ... Greg Stark and Tom Lane
2006-07-15Fix some makefiles that fail to yield good results from 'make -qp'.Tom Lane
This doesn't really matter for ordinary building of Postgres, but it's useful for automated checks, such as my just-committed pgcheckdefines.
2006-07-14Fix another passel of include-file breakage. Kris Jurka, Tom LaneTom Lane