Commit Graph

83 Commits

Author SHA1 Message Date
Tom Lane 7781916ab5 Fix non-improvement of description of archive_timeout. archive_command
is only invoked on completed WAL segments, period --- there's no 'by
default' about it.
2006-09-03 19:06:15 +00:00
Bruce Momjian e0938c3f5b Make autovacuum behavior more agressive, per discussion on hackers list
--- was part of autovacuum default 'on' patch that was reverted, but we
want this part.

Peter Eisentraut
2006-09-02 23:12:16 +00:00
Bruce Momjian 1a84952670 Change "superuser_reserved_connections" default to 3, because of
possible autovacuum use.
2006-09-02 23:04:20 +00:00
Bruce Momjian 4b636e35a5 Wording improvements for archive_timeout. 2006-09-02 21:11:26 +00:00
Bruce Momjian 04912899e7 Add new variable "server_version_num", which is almost the same as
"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-09-02 13:12:50 +00:00
Peter Eisentraut ba9f9bf1b1 Revert change to turn autovacuum on by default. 2006-08-29 11:37:47 +00:00
Bruce Momjian bc24d5b976 Now bind displays prepare as detail, and execute displays prepare and
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-29 02:11:30 +00:00
Peter Eisentraut 88b8110443 Turn autovacuum on by default. (stats_row_level is also on by default.)
Threshold and scale factor are cut in half for more aggressive behavior.
2006-08-28 13:37:18 +00:00
Tom Lane e8ea9e9587 Implement archive_timeout feature to force xlog file switches to occur no more
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-17 23:04:10 +00:00
Tom Lane abc3120e9b Add server support for "plugin" libraries that can be used for add-on tasks
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-15 18:26:59 +00:00
Tom Lane b09bfcaa57 Add a feature for automatic initialization and finalization of dynamically
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-08 19:15:09 +00:00
Bruce Momjian 3716f90c39 For protocol-level prepare/bind/execute:
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-08 01:23:15 +00:00
Peter Eisentraut b517e65348 Allow units to be specified with configuration settings. 2006-07-27 08:30:41 +00:00
Peter Eisentraut 79bc99a467 Convert effective_cache_size to an integer, for better integration with
upcoming units feature.
2006-07-26 11:35:56 +00:00
Tom Lane d8b5c95ca8 Remove hard-wired lists of timezone abbreviations in favor of providing
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-25 03:51:23 +00:00
Bruce Momjian 370a709c75 Add GUC update_process_title to control whether 'ps' display is updated
for every command, default to on.
2006-06-27 22:16:44 +00:00
Bruce Momjian 665c5e861a Default stats_command_string to 'on', now that its overhead is minimal. 2006-06-27 19:07:50 +00:00
Tom Lane b13c9686d0 Take the statistics collector out of the loop for monitoring backends'
current commands; instead, store current-status information in shared
memory.  This substantially reduces the overhead of stats_command_string
and also ensures that pg_stat_activity is fully up to date at all times.
Per my recent proposal.
2006-06-19 01:51:22 +00:00
Peter Eisentraut 5266f221a2 Merge postmaster and postgres command into just postgres. postmaster
symlink is kept for now for compatibility.  To call single-user mode, use
postgres --single.
2006-06-18 15:38:37 +00:00
Bruce Momjian 8fc2a5afa7 Update preload_library magic block wording. 2006-06-16 12:47:49 +00:00
Bruce Momjian 57ffc4d78b Update magic block wording for preloaded libraries. 2006-06-16 04:02:35 +00:00
Bruce Momjian 167c7bb49a Add mention that preload_libraries check the magic block, so
non-PostgreSQL libraries cannot be loaded using this capability.
2006-06-15 17:49:09 +00:00
Tom Lane e4de635a2b Increase the default value of cpu_index_tuple_cost from 0.001 to 0.005.
This shouldn't affect simple indexscans much, while for bitmap scans that
are touching a lot of index rows, this seems to bring the estimates more
in line with reality.  Per recent discussion.
2006-06-05 03:03:42 +00:00
Tom Lane eed6c9ed7e Add a GUC parameter seq_page_cost, and use that everywhere we formerly
assumed that a sequential page fetch has cost 1.0.  This patch doesn't
in itself change the system's behavior at all, but it opens the door to
people adopting other units of measurement for EXPLAIN costs.  Also, if
we ever decide it's worth inventing per-tablespace access cost settings,
this change provides a workable intellectual framework for that.
2006-06-05 02:49:58 +00:00
Tom Lane b3eb4ea5d8 Add a new GUC parameter backslash_quote, which determines whether the SQL
parser will allow "\'" to be used to represent a literal quote mark.  The
"\'" representation has been deprecated for some time in favor of the
SQL-standard representation "''" (two single quote marks), but it has been
used often enough that just disallowing it immediately won't do.  Hence
backslash_quote allows the settings "on", "off", and "safe_encoding",
the last meaning to allow "\'" only if client_encoding is a valid server
encoding.  That is now the default, and the reason is that in encodings
such as SJIS that allow 0x5c (ASCII backslash) to be the last byte of a
multibyte character, accepting "\'" allows SQL-injection attacks as per
CVE-2006-2314 (further details will be published after release).  The
"on" setting is available for backward compatibility, but it must not be
used with clients that are exposed to untrusted input.

Thanks to Akio Ishida and Yasuo Ohgaki for identifying this security issue.
2006-05-21 20:10:42 +00:00
Tom Lane 637028afe1 Code review for standard_conforming_strings patch. Fix it so it does not
throw warnings for 100%-SQL-standard constructs, clean up some minor
infelicities, try to un-break ecpg to the best of my ability.  (It's not clear
how ecpg is going to find out the setting of standard_conforming_strings,
though.)  I think pg_dump still needs work, too.
2006-05-11 19:15:36 +00:00
Tom Lane d3171dd64b Fix broken markup. 2006-05-02 18:07:51 +00:00
Bruce Momjian e6004f0151 Add statement_timestamp(), clock_timestamp(), and
transaction_timestamp() (just like now()).

Also update statement_timeout() to mention it is statement arrival time
that is measured.

Catalog version updated.
2006-04-25 00:25:22 +00:00
Bruce Momjian efe3de07e9 Removes or minimizes some documentation mentions of backward
compatibility for release 7.2 and earlier.  I have not altered any
mentions of release 7.3 or later.  The release notes were not modified,
so the changes are still documented, just not in the main docs.
2006-04-23 03:39:52 +00:00
Bruce Momjian f57b2f09a8 Mention "syntax" error as not logged by log_statement.
Backpatch.
2006-04-18 12:41:15 +00:00
Bruce Momjian 5bd59b9c0a Document that errors are not output by log_statement (was they were in
8.0), and add as suggestion to use log_min_error_statement for this
purpose.  I also fixed the code so the first EXECUTE has it's prepare,
rather than the last which is what was in the current code.  Also remove
"protocol" prefix for SQL EXECUTE output because it is not accurate.

Backpatch to 8.1.X.
2006-04-18 00:52:23 +00:00
Bruce Momjian 497b5ad928 Make $PostgreSQL CVS tags consistent for SGML files. 2006-03-10 19:10:50 +00:00
Bruce Momjian ce1106d2fa Properly set "escape_string_warning" to default to true. 2006-03-07 02:54:23 +00:00
Bruce Momjian 19c21d115d Enable standard_conforming_strings to be turned on.
Kevin Grittner
2006-03-06 19:49:20 +00:00
Tom Lane 5b8ac71042 Support include directives in postgresql.conf.
Patch by Joachim Wieland, somewhat reworked for clarity and portability.
2006-03-04 22:19:31 +00:00
Bruce Momjian 43e9bab94a Rename Online Backup to Continuous Archiving. 2006-03-03 22:02:08 +00:00
Bruce Momjian db5e39b2f0 Fix typo in configuration docs.
Devrim GUNDUZ
2006-02-05 18:19:14 +00:00
Tom Lane 3893127431 Fix constraint exclusion to work in inherited UPDATE/DELETE queries
... in fact, it will be applied now in any query whatsoever.  I'm still
a bit concerned about the cycles that might be expended in failed proof
attempts, but given that CE is turned off by default, it's the user's
choice whether to expend those cycles or not.  (Possibly we should
change the simple bool constraint_exclusion parameter to something
more fine-grained?)
2006-02-04 23:03:20 +00:00
Tom Lane 726b42abd0 Improve wording of descriptions of SIGHUP GUC parameters, as per my
suggestion a couple days ago.  Fix some cases in which the documentation
neglected to mention any restriction on when a parameter can be set.
Try to be consistent about calling parameters parameters; use the term
option only for command-line switches.
2006-01-23 18:16:41 +00:00
Tom Lane b42f307340 Marginal improvements in the wording of the autovacuum documentation:
be consistent about whether it's called a daemon or a subprocess, and
don't describe the autovacuum setting in exactly the same way as the
stats_start_collector setting, because that leaves people thinking (if
they aren't paying close attention) that autovacuum can't be changed
on the fly.
2006-01-21 19:34:42 +00:00
Tom Lane 445144b8c2 Update comment about outer joins in description of geqo_threshold. 2006-01-11 23:14:29 +00:00
Peter Eisentraut 86c23a6eb2 Make all command-line options of postmaster and postgres the same. See
http://archives.postgresql.org/pgsql-hackers/2006-01/msg00151.php for the
complete plan.
2006-01-05 10:07:46 +00:00
Andrew Dunstan a37422e042 Increase amount of shared buffers initdb tries to allocate to 4000,
and add logic to try max_fsm_pages up to 200000, plus accompanying minor
docs changes.
2005-12-27 23:54:01 +00:00
Bruce Momjian e80f9dfa80 Add quotes around search_path "$user" so that SHOW output can be used in
SET.
2005-12-23 00:38:04 +00:00
Tom Lane e3b9852728 Teach planner how to rearrange join order for some classes of OUTER JOIN.
Per my recent proposal.  I ended up basing the implementation on the
existing mechanism for enforcing valid join orders of IN joins --- the
rules for valid outer-join orders are somewhat similar.
2005-12-20 02:30:36 +00:00
Peter Eisentraut 625d4b38e0 Let initdb detect the date order of the lc_time locale and initialize the
datestyle parameter of the new cluster accordingly.
2005-12-09 15:51:14 +00:00
Tom Lane cecb607559 Make SQL arrays support null elements. This commit fixes the core array
functionality, but I still need to make another pass looking at places
that incidentally use arrays (such as ACL manipulation) to make sure they
are null-safe.  Contrib needs work too.
I have not changed the behaviors that are still under discussion about
array comparison and what to do with lower bounds.
2005-11-17 22:14:56 +00:00
Tom Lane fd68553860 Editorial review for partitioning/constraint exclusion documentation. 2005-11-04 23:53:18 +00:00
Peter Eisentraut 39dfbe5791 Spellchecking run, final cleanups 2005-11-04 23:14:02 +00:00
Neil Conway eddcd492fe Add some documentation for constraint exclusion and basic partitioning.
From Simon Riggs; cleanup and editorialization by Neil Conway.
2005-11-01 23:19:05 +00:00