summaryrefslogtreecommitdiff
path: root/src/backend/utils/misc
AgeCommit message (Collapse)Author
2008-07-06Prevent integer overflows during units conversion when displaying a GUCTom Lane
variable that has units. Per report from Stefan Kaltenbrunner. Backport to 8.2. I also backported my patch of 2007-06-21 that prevented comparable overflows on the input side, since that now seems to have enough field track record to be back-patched safely. That patch included addition of hints listing the available unit names, which I did not bother to strip out of it --- this will make a little more work for the translators, but they can copy the translation from 8.3, and anyway an untranslated hint is better than no hint.
2008-05-26Fix an old corner-case bug in set_config_option: push_old_value has to beTom Lane
called before, not after, calling the assign_hook if any. This is because push_old_value might fail (due to palloc out-of-memory), and in that case there would be no stack entry to tell transaction abort to undo the GUC assignment. Of course the actual assignment to the GUC variable hasn't happened yet --- but the assign_hook might have altered subsidiary state. Without a stack entry we won't call it again to make it undo such actions. So this is necessary to make the world safe for assign_hooks with side effects. Per a discussion a couple weeks ago with Magnus. Back-patch to 8.0. 7.x did not have the problem because it did not have allocatable stacks of GUC values.
2008-02-23Avoid trying to print a NULL char pointer in --describe-config. On someTom Lane
platforms this works, but on some it crashes. Zdenek Kotala
2008-01-31Add pid to the pgident event name on win32.Magnus Hagander
Should fix a problem where two clusters are running under two different service accounts and get colliding names, causing only the first cluster to contain the pgident event description. Per report from Stephen Denne.
2007-04-23Fix LOCK_DEBUG compilation in the 8.2 branch; HEAD was fixed earlier.Neil Conway
Heikki Linnakangas.
2007-01-20Add documentation of memory and time units to postgresql.conf.Bruce Momjian
Backpatch to 8.2.X for new initdbs.
2006-11-29Spelling fixPeter Eisentraut
2006-11-21Change the default setting for log_min_error_statement to ERROR. PerTom Lane
recent discussion in which majority opinion was that this is a more widely useful setting than the previous default of PANIC.
2006-11-05Fix recently-understood problems with handling of XID freezing, particularlyTom Lane
in PITR scenarios. We now WAL-log the replacement of old XIDs with FrozenTransactionId, so that such replacement is guaranteed to propagate to PITR slave databases. Also, rather than relying on hint-bit updates to be preserved, pg_clog is not truncated until all instances of an XID are known to have been replaced by FrozenTransactionId. Add new GUC variables and pg_autovacuum columns to allow management of the freezing policy, so that users can trade off the size of pg_clog against the amount of freezing work done. Revise the already-existing code that forces autovacuum of tables approaching the wraparound point to make it more bulletproof; also, revise the autovacuum logic so that anti-wraparound vacuuming is done per-table rather than per-database. initdb forced because of changes in pg_class, pg_database, and pg_autovacuum catalogs. Heikki Linnakangas, Simon Riggs, and Tom Lane.
2006-10-19Clean up local redeclarations of variables with DLLIMPORT, per reportTom Lane
from Magnus that MSVC complains about this.
2006-10-07On platforms that have getrlimit(RLIMIT_STACK), use it to ensure thatTom Lane
max_stack_depth is not set to an unsafe value. This commit also provides configure-time checking for <sys/resource.h>, and cleans up some perhaps-unportable code associated with use of that include file and getrlimit().
2006-10-06Message style improvementsPeter Eisentraut
2006-10-04Fix comment to agree with presentation.Tom Lane
2006-10-04pgindent run for 8.2.Bruce Momjian
2006-10-03The attached patch changes units of the some default values inBruce Momjian
postgresql.conf. - shared_buffers = 32000kB => 32MB - temp_buffers = 8000kB => 8MB - wal_buffers = 8 => 64kB The code of initdb was a bit modified to write MB-unit values. Values greater than 8000kB are rounded out to MB. GUC_UNIT_XBLOCKS is added for wal_buffers. It is like GUC_UNIT_BLOCKS, but uses XLOG_BLCKSZ instead of BLCKSZ. Also, I cleaned up the test of GUC_UNIT_* flags in preparation to add more unit flags in less bits. ITAGAKI Takahiro
2006-10-03Mention in postgresql.conf that autovacuum also needsBruce Momjian
stats_start_collector and stats_row_level to also be on David Wheeler
2006-09-27Replace strncpy with strlcpy in selected places that seem possibly relevantTom Lane
to performance. (A wholesale effort to get rid of strncpy should be undertaken sometime, but not during beta.) This commit also fixes dynahash.c to correctly truncate overlength string keys for hashtables, so that its callers don't have to anymore.
2006-09-25Increase default value of effective_cache_size to 128MB, per discussion.Tom Lane
2006-09-22Fix bugs in plpgsql and ecpg caused by assuming that isspace() would onlyTom Lane
return true for exactly the characters treated as whitespace by their flex scanners. Per report from Victor Snezhko and subsequent investigation. Also fix a passel of unsafe usages of <ctype.h> functions, that is, ye olde char-vs-unsigned-char issue. I won't miss <ctype.h> when we are finally able to stop using it.
2006-09-22Add units to the default postgresql.conf. For the most part, this shouldPeter Eisentraut
match what SHOW displays as default value, to make the user experience uniform.
2006-09-14Make postgresql.conf.sample match the initdb defaults. This fixesBruce Momjian
comment alignment on most systems.
2006-09-02Make autovacuum behavior more agressive, per discussion on hackers listBruce Momjian
--- was part of autovacuum default 'on' patch that was reverted, but we want this part. Peter Eisentraut
2006-09-02Update postgresql.conf line for default superuser_reserved_connections.Bruce Momjian
2006-09-02Change "superuser_reserved_connections" default to 3, because ofBruce Momjian
possible autovacuum use.
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-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-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-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-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-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-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-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-27Allow units to be specified with configuration settings.Peter Eisentraut
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-24Mark postgresql.conf entries that require server restart; some minorPeter Eisentraut
editing and reformatting.
2006-07-14Remove 576 references of include files that were not needed.Bruce Momjian
2006-07-13Allow include files to compile own their own.Bruce Momjian
Strip unused include files out unused include files, and add needed includes to C files. The next step is to remove unused include files in C files.
2006-07-11Alphabetically order reference to include files, "G" - "M".Bruce Momjian
2006-06-27Remove embedded newline in string literal --- seems to make newer gccTom Lane
versions very unhappy, and shouldn't be there anyway.