Commit Graph

111 Commits

Author SHA1 Message Date
Bruce Momjian c7b08050d9 SSL improvements:
o read global SSL configuration file
	o add GUC "ssl_ciphers" to control allowed ciphers
	o add libpq environment variable PGSSLKEY to control SSL hardware keys

Victor B. Wagner
2007-02-16 02:59:41 +00:00
Bruce Momjian a37b006d89 This patch fixes shared_preload_libraries on Windows hosts. It forces
ach backend to re-load all shared_preload_libraries.

Korry Douglas
2007-02-08 15:46:04 +00:00
Bruce Momjian d78f76896b Document that wal_sync_method open_* methods use O_DIRECT, if available.
Backpatch to 8.2.X.
2007-02-08 03:56:42 +00:00
Bruce Momjian 09a9f10e7f Consistenly use colons before '<programlisting>' blocks, where
appropriate.
2007-02-01 00:28:19 +00:00
Bruce Momjian a134ee3379 Update documentation on may/can/might:
Standard English uses "may", "can", and "might" in different ways:

        may - permission, "You may borrow my rake."

        can - ability, "I can lift that log."

        might - possibility, "It might rain today."

Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice.  Similarly, "It may crash" is better stated, "It might crash".

Also update two error messages mentioned in the documenation to match.
2007-01-31 20:56:20 +00:00
Peter Eisentraut 22bd156ff0 Various fixes in the logic of XML functions:
- Add new SQL command SET XML OPTION (also available via regular GUC) to
  control the DOCUMENT vs. CONTENT option in implicit parsing and
  serialization operations.

- Subtle corrections in the handling of the standalone property in
  xmlroot().

- Allow xmlroot() to work on content fragments.

- Subtle corrections in the handling of the version property in
  xmlconcat().

- Code refactoring for producing XML declarations.
2007-01-25 11:53:52 +00:00
Bruce Momjian 148ea5cbea Add GUC temp_tablespaces to provide a default location for temporary
objects.

Jaime Casanova
2007-01-25 04:35:11 +00:00
Bruce Momjian 51fa6fdc9c Update documentation about postgresqlconf to mention default units that
match the postgresql.conf file.  Also add units to descriptions that
lacked them.  Wording improvements.  Mention pg_settings.unit as the way
to find the default units for setting.

Backpatch to 8.2.X.
2007-01-20 21:30:26 +00:00
Peter Eisentraut 4b48ad4fb2 Add support for converting binary values (i.e. bytea) into xml values,
with new GUC parameter "xmlbinary" that controls the output encoding, as
per SQL/XML standard.
2007-01-19 16:58:46 +00:00
Alvaro Herrera 10a5e3348e Enable autovacuum in the default configuration, per discussion. 2007-01-16 18:26:02 +00:00
Bruce Momjian 0764f41306 Have log_temp_files be in kilobytes, remove trace call. 2007-01-09 22:16:46 +00:00
Bruce Momjian be8a431881 Add GUC log_temp_files to log the use of temporary files.
Bill Moran
2007-01-09 21:31:17 +00:00
Bruce Momjian 0afabecbfd Document that log_line_prefix %t does not print timezone on Win32. 2006-12-12 21:30:33 +00:00
Peter Eisentraut f1e3e3238d Fix typos 2006-11-30 20:50:44 +00:00
Peter Eisentraut 818ac8479b Correct misspellings of kB. 2006-11-25 22:44:48 +00:00
Tom Lane 414c7a537e Change the default setting for log_min_error_statement to ERROR. Per
recent discussion in which majority opinion was that this is a more
widely useful setting than the previous default of PANIC.
2006-11-21 01:23:37 +00:00
Neil Conway 2b5fedc0d7 Minor improvements to the description of archive_timeout. 2006-11-12 05:12:42 +00:00
Tom Lane 48188e1621 Fix recently-understood problems with handling of XID freezing, particularly
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-11-05 22:42:10 +00:00
Tom Lane 6fada49805 Correct documentation error: in 8.1 and 8.2, %p in archive and restore
command strings inserts relative not absolute path of file to process.
This is a side-effect of 2005-07-04 change that makes the server use
relative paths in general.  Noted by Bernd Helmle.
2006-11-04 18:20:27 +00:00
Peter Eisentraut 0f763503ff Spellchecking and such 2006-10-23 18:10:32 +00:00
Tom Lane 0549ba82e3 Clarify note about interaction of log_statement logging with errors.
Remove obsolete note about logging of statements generated by plpgsql
function execution ... that doesn't happen anymore.
2006-10-19 22:55:25 +00:00
Tom Lane 71a6f8b85b On platforms that have getrlimit(RLIMIT_STACK), use it to ensure that
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-07 19:25:29 +00:00
Tom Lane 0f8fc35a5a Increase default value of effective_cache_size to 128MB, per discussion. 2006-09-25 22:12:24 +00:00
Teodor Sigaev bcbb402e31 Improve wordings by David Fuhry <dfuhry@cs.kent.edu> 2006-09-18 12:11:36 +00:00
Bruce Momjian 32cebaecff Remove emacs info from footer of SGML files. 2006-09-16 00:30:20 +00:00
Teodor Sigaev 0ca9907ce4 GIN documentation and slightly improving GiST docs.
Thanks to  Christopher Kings-Lynne <chris.kingslynne@gmail.com> for
initial version and Jeff Davis <pgsql@j-davis.com> for inspection
2006-09-14 11:16:27 +00:00
Tom Lane b59d31c215 Tweak the behavior of log_duration as proposed by Guillaume Smet: rather
than being equivalent to setting log_min_duration_statement to zero, this
option now forces logging of all query durations, but doesn't force logging
of query text.  Also, add duration logging coverage for fastpath function
calls.
2006-09-08 15:55:53 +00:00
Tom Lane 893632be4e Clean up logging for extended-query-protocol operations, as per my recent
proposal.  Parameter logging works even for binary-format parameters, and
logging overhead is avoided when disabled.

log_statement = all output for the src/test/examples/testlibpq3.c example
now looks like

LOG:  statement: execute <unnamed>: SELECT * FROM test1 WHERE t = $1
DETAIL:  parameters: $1 = 'joe''s place'
LOG:  statement: execute <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
DETAIL:  parameters: $1 = '2'

and log_min_duration_statement = 0 results in

LOG:  duration: 2.431 ms  parse <unnamed>: SELECT * FROM test1 WHERE t = $1
LOG:  duration: 2.335 ms  bind <unnamed> to <unnamed>: SELECT * FROM test1 WHERE t = $1
DETAIL:  parameters: $1 = 'joe''s place'
LOG:  duration: 0.394 ms  execute <unnamed>: SELECT * FROM test1 WHERE t = $1
DETAIL:  parameters: $1 = 'joe''s place'
LOG:  duration: 1.251 ms  parse <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
LOG:  duration: 0.566 ms  bind <unnamed> to <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
DETAIL:  parameters: $1 = '2'
LOG:  duration: 0.173 ms  execute <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
DETAIL:  parameters: $1 = '2'

(This example demonstrates the folly of ignoring parse/bind steps for duration
logging purposes, BTW.)

Along the way, create a less ad-hoc mechanism for determining which commands
are logged by log_statement = mod and log_statement = ddl.  The former coding
was actually missing quite a few things that look like ddl to me, and it
did not handle EXECUTE or extended query protocol correctly at all.

This commit does not do anything about the question of whether log_duration
should be removed or made less redundant with log_min_duration_statement.
2006-09-07 22:52:01 +00:00
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