summaryrefslogtreecommitdiff
path: root/src/backend/utils/misc
AgeCommit message (Collapse)Author
2008-11-21Fix a few more format argument warnings.Magnus Hagander
2008-11-21Make the enumvals column of pg_settings be text[] instead of justMagnus Hagander
a comma separated string.
2008-11-19Fix define_custom_variable so that SUSET custom variables behaveTom Lane
somewhat reasonably. It's not perfect, but it beats the kluge proposed in the auto-explain patch ...
2008-11-19Some infrastructure changes for the upcoming auto-explain contrib module:Tom Lane
* Refactor explain.c slightly to export a convenient-to-use subroutine for printing EXPLAIN results. * Provide hooks for plugins to get control at ExecutorStart and ExecutorEnd as well as ExecutorRun. * Add some minimal support for tracking the total runtime of ExecutorRun. This code won't actually do anything unless a plugin prods it to. * Change the API of the DefineCustomXXXVariable functions to allow nonzero "flags" to be specified for a custom GUC variable. While at it, also make the "bootstrap" default value for custom GUCs be explicitly specified as a parameter to these functions. This is to eliminate confusion over where the default comes from, as has been expressed in the past by some users of the custom-variable facility. * Refactor GUC code a bit to ensure that a custom variable gets initialized to something valid (like its default value) even if the placeholder value was invalid.
2008-11-11Add support for input and output of interval values formatted per ISO 8601;Tom Lane
specifically, we can input either the "format with designators" or the "alternative format", and we can output the former when IntervalStyle is set to iso_8601. Ron Mayer
2008-11-09Add a new GUC variable called "IntervalStyle" that decouples interval outputTom Lane
from DateStyle, and create a new interval style that produces output matching the SQL standard (at least for interval values that fall within the standard's restrictions). IntervalStyle is also used to resolve the conflict between the standard and traditional Postgres rules for interpreting negative interval input. Ron Mayer
2008-10-06Add columns boot_val and reset_val to the pg_settings view, to exposeMagnus Hagander
the value a parameter has at server start and will have after RESET, respectively. Greg Smith, with some modifications by me.
2008-09-30Rewrite the FSM. Instead of relying on a fixed-size shared memory segment, theHeikki Linnakangas
free space information is stored in a dedicated FSM relation fork, with each relation (except for hash indexes; they don't use FSM). This eliminates the max_fsm_relations and max_fsm_pages GUC options; remove any trace of them from the backend, initdb, and documentation. Rewrite contrib/pg_freespacemap to match the new FSM implementation. Also introduce a new variant of the get_raw_page(regclass, int4, int4) function in contrib/pageinspect that let's you to return pages from any relation fork, and a new fsm_page_contents() function to inspect the new FSM pages.
2008-09-23Only show source file and line numbers to superusers, for consistentMagnus Hagander
security level with other parts of the system. Per gripe from Tom
2008-09-10Tweak newly added set_config_sourcefile() so that the target recordTom Lane
isn't left corrupt if guc_strdup should fail.
2008-09-10Add "source file" and "source line" information to each GUC variable.Alvaro Herrera
initdb forced due to changes in the pg_settings view. Magnus Hagander and Alvaro Herrera.
2008-09-09Improve the plan cache invalidation mechanism to make it invalidate plansTom Lane
when user-defined functions used in a plan are modified. Also invalidate plans when schemas, operators, or operator classes are modified; but for these cases we just invalidate everything rather than tracking exact dependencies, since these types of objects seldom change in a production database. Tom Lane; loosely based on a patch by Martin Pihlak.
2008-08-25Make stats_temp_directory PGC_SIGHUP, and document how it may cause a temporaryMagnus Hagander
"outage" of the statistics views. This requires making the stats collector respond to SIGHUP, like the other utility processes already did.
2008-08-22Make "log_temp_files" super-user set only, like other logging options.Bruce Momjian
Simon Riggs
2008-08-22Improve wording of error message when a postgresql.conf setting isBruce Momjian
ignored because it can only be set at server start.
2008-08-19Cause the output from debug_print_parse, debug_print_rewritten, andTom Lane
debug_print_plan to appear at LOG message level, not DEBUG1 as historically. Make debug_pretty_print default to on. Also, cause plans generated via EXPLAIN to be subject to debug_print_plan. This is all to make debug_print_plan a reasonably comfortable substitute for the former behavior of EXPLAIN VERBOSE.
2008-08-15Make the temporary directory for pgstat files configurable by the GUCMagnus Hagander
variable stats_temp_directory, instead of requiring the admin to mount/symlink the pg_stat_tmp directory manually. For now the config variable is PGC_POSTMASTER. Room for further improvment that would allow it to be changed on-the-fly.
2008-07-23Use guc.c's parse_int() instead of pg_atoi() to parse fillfactor inTom Lane
default_reloptions(). The previous coding was really a bug because pg_atoi() will always throw elog on bad input data, whereas default_reloptions is not supposed to complain about bad input unless its validate parameter is true. Right now you could only expose the problem by hand-modifying pg_class.reloptions into an invalid state, so it doesn't seem worth back-patching; but we should get it right in HEAD because there might be other situations in future. Noted while studying GIN fast-update patch.
2008-07-10Add unchangeable GUC "variables" segment_size, wal_block_size, andTom Lane
wal_segment_size to make those configuration parameters available to clients, in the same way that block_size was previously exposed. Bernd Helmle, with comments from Abhijit Menon-Sen and some further tweaking by me.
2008-07-08Add comment for deadlock_timeout:Bruce Momjian
/* This is PGC_SIGHUP so all backends have the same value. */
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-07-01Remove GUC extra_desc strings that are redundant with the enum value lists.Tom Lane
2008-07-01"debug" level was supposed to be hidden, since it's just an alias for debug2.Magnus Hagander
2008-07-01Split apart message_level_options into one set for server-side settings andMagnus Hagander
one for client-side, restoring the previous behaviour with different sort order for the 'log' level. Also, remove redundant list of available options, since the enum code will output it automatically.
2008-06-30Fix recovery.conf boolean variables to take the same range of stringBruce Momjian
values as postgresql.conf.
2008-06-30Turn PGBE_ACTIVITY_SIZE into a GUC variable, track_activity_query_size.Heikki Linnakangas
As the buffer could now be a lot larger than before, and copying it could thus be a lot more expensive than before, use strcpy instead of memcpy to copy the query string, as was already suggested in comments. Also, only copy the PgBackendStatus struct and string if the slot is in use. Patch by Thomas Lee, with some changes by me.
2008-06-11Fix spelling mistake in postgresql.conf.Bruce Momjian
Greg Sabino Mullane
2008-05-28Add a field to guc enums to allow hiding of values from display whileMagnus Hagander
still accepting them as input, used to allow alternate syntax for the same setting. Alex Hunsaker
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-05-15Add support for tracking call counts and elapsed runtime for user-definedTom Lane
functions. Note that because this patch changes FmgrInfo, any external C functions you might be testing with 8.4 will need to be recompiled. Patch by Martin Pihlak, some editorialization by me (principally, removing tracking of getrusage() numbers)
2008-05-12Convert wal_sync_method to guc enum.Magnus Hagander
2008-05-12Restructure some header files a bit, in particular heapam.h, by removing someAlvaro Herrera
unnecessary #include lines in it. Also, move some tuple routine prototypes and macros to htup.h, which allows removal of heapam.h inclusion from some .c files. For this to work, a new header file access/sysattr.h needed to be created, initially containing attribute numbers of system columns, for pg_dump usage. While at it, make contrib ltree, intarray and hstore header files more consistent with our header style.
2008-05-09Add "%option noinput" to the scanners to avoid compiler warnings. GCC 4.3Peter Eisentraut
began to realize that the input() function isn't used and printed warnings.
2008-05-04Add pg_conf_load_time() function to report when the Postgres configurationTom Lane
files were last loaded. George Gensure
2008-05-02Allow the planner's estimate of the fraction of a cursor's rows that will beTom Lane
retrieved to be controlled through a GUC variable. Robert Hell
2008-05-01Make the minimum allowed value of work_mem be 64KB always, rather than havingTom Lane
it vary with BLCKSZ as before. This agrees with what the documentation says, and avoids a regression test problem when BLCKSZ is larger than default. Per recent discussion.
2008-04-29Some minor further cleanup around A_Const. Don't attach a typecast inTom Lane
makeFloatConst, and avoid "manual" construction of A_Const nodes in grammar productions, in favor of using makeXXXConst subroutines.
2008-04-29Remove typename from A_Const.Alvaro Herrera
Brendan Jurd, minor editorialization by me.
2008-04-18Cause EXPLAIN's VERBOSE option to print the target list (output column list)Tom Lane
of each plan node, instead of its former behavior of dumping the internal representation of the plan tree. The latter display is still available for those who really want it (see debug_print_plan), but uses for it are certainly few and and far between. Per discussion. This patch also removes the explain_pretty_print GUC, which is obsoleted by the change.
2008-04-04Remove no-longer-used function assign_backslash_quote()Tom Lane
2008-04-04Convert backslash_quote guc to use enum.Magnus Hagander
2008-04-04Turn xmlbinary and xmloption GUC variables into enumsTurn xmlbinary andMagnus Hagander
xmloption GUC variables into enums..
2008-04-03Oops, add proper #ifdef for systems without support for syslog.Magnus Hagander
Per buildfarm member mastodon.
2008-04-03Convert syslog_facility guc to enum type.Magnus Hagander
2008-04-02Convert three more guc settings to enum type:Magnus Hagander
default_transaction_isolation, session_replication_role and regex_flavor.
2008-03-25Simplify and standardize conversions between TEXT datums and ordinary CTom Lane
strings. This patch introduces four support functions cstring_to_text, cstring_to_text_with_len, text_to_cstring, and text_to_cstring_buffer, and two macros CStringGetTextDatum and TextDatumGetCString. A number of existing macros that provided variants on these themes were removed. Most of the places that need to make such conversions now require just one function or macro call, in place of the multiple notational layers that used to be needed. There are no longer any direct calls of textout or textin, and we got most of the places that were using handmade conversions via memcpy (there may be a few still lurking, though). This commit doesn't make any serious effort to eliminate transient memory leaks caused by detoasting toasted text objects before they reach text_to_cstring. We changed PG_GETARG_TEXT_P to PG_GETARG_TEXT_PP in a few places where it was easy, but much more could be done. Brendan Jurd and Tom Lane
2008-03-20Make source code READMEs more consistent. Add CVS tags to all README files.Bruce Momjian
2008-03-17Fix postgres --describe-config for guc enums, breakage noted by Alvaro.Magnus Hagander
While at it, rename option lookup functions to make names clearer, per discussion with Tom.
2008-03-16Some cleanups of enum-guc code, per comments from Tom.Magnus Hagander
2008-03-10Implement enum type for guc parameters, and convert a couple of existingMagnus Hagander
variables to it. More need to be converted, but I wanted to get this in before it conflicts with too much... Other than just centralising the text-to-int conversion for parameters, this allows the pg_settings view to contain a list of available options and allows an error hint to show what values are allowed.