Commit Graph

568 Commits

Author SHA1 Message Date
Heikki Linnakangas 15c121b3ed Rewrite the FSM. Instead of relying on a fixed-size shared memory segment, the
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-30 10:52:14 +00:00
Heikki Linnakangas 61d9674988 Make LC_COLLATE and LC_CTYPE database-level settings. Collation and
ctype are now more like encoding, stored in new datcollate and datctype
columns in pg_database.

This is a stripped-down version of Radek Strnad's patch, with further
changes by me.
2008-09-23 09:20:39 +00:00
Tom Lane ea0382e370 Code review for recent patch to terminate online backup during shutdown:
do CancelBackup at a sane place, fix some oversights in the state transitions,
allow only superusers to connect while we are waiting for backup mode to end.
2008-04-26 22:47:40 +00:00
Magnus Hagander c979a1fefa Prevent shutdown in normal mode if online backup is running, and
have pg_ctl warn about this.

Cancel running online backups (by renaming the backup_label file,
thus rendering the backup useless) when shutting down in fast mode.

Laurenz Albe
2008-04-23 13:44:59 +00:00
Bruce Momjian c4fd93b3f3 Re-enable pg_terminate_backend() using SIGTERM. SIGTERM testing still
needed.
2008-04-17 20:56:41 +00:00
Bruce Momjian 76365960d2 Revert addition of pg_terminate_backend() because of race conditions. 2008-04-15 20:28:47 +00:00
Bruce Momjian 18b286f3e3 Add pg_terminate_backend() to allow terminating only a single session. 2008-04-15 13:55:12 +00:00
Tom Lane 3405f2b925 Use error message wordings for permissions checks on .pgpass and SSL private
key files that are similar to the one for the postmaster's data directory
permissions check.  (I chose to standardize on that one since it's the most
heavily used and presumably best-wordsmithed by now.)  Also eliminate explicit
tests on file ownership in these places, since the ensuing read attempt must
fail anyway if it's wrong, and there seems no value in issuing the same error
message for distinct problems.  (But I left in the explicit ownership test in
postmaster.c, since it had its own error message anyway.)  Also be more
specific in the documentation's descriptions of these checks.  Per a gripe
from Kevin Hunter.
2008-03-31 02:43:14 +00:00
Bruce Momjian 480d4f7ea5 Document that soft-mounting NFS is not recommended. 2008-03-21 14:23:37 +00:00
Peter Eisentraut 00941eea77 Add more clarification about SSH tunnels from Faheem Mitha. 2008-02-26 18:01:26 +00:00
Peter Eisentraut f49beb3f50 In the SSH setup instructions, change
ssh -L 3333:foo.com:5432 joe@foo.com

I think this should be changed to

ssh -L 3333:localhost:5432 joe@foo.com

The reason is that this assumes the postgres server on foo.com allows
connections from foo.com, which is not allowed by the default
listen_addresses setting.  Add more detail explaining this.

pointed out by Faheem Mitha

Also change the example port number 3333 to 63333 so no one can complain
that we are stealing a reserved port number.
2008-02-26 16:07:16 +00:00
Bruce Momjian b07e548590 Fix spelling typo in comment. 2008-01-31 23:31:33 +00:00
Bruce Momjian 694403d30e Add comment about possible URL changes for www7.hp.com:
<!-- If this URL chnages replace it with a URL to www.archive.org. -->
2008-01-31 23:30:31 +00:00
Bruce Momjian 162dc31428 Update spoofing /tmp symlink instructions to be more specific about the
name of the needed symlink file.
2008-01-31 23:03:16 +00:00
Bruce Momjian 8e9c7fe982 Document the idea of creating a symbolic link in /tmp to prevent server
spoofing when the socket file has been moved.
2008-01-31 17:22:43 +00:00
Peter Eisentraut 79a323ab49 Change /contrib to contrib for consistency. 2008-01-24 06:23:33 +00:00
Bruce Momjian bbd3bdba3e Add URLs to two excellent web pages about SSL API and certificate usage. 2008-01-08 18:07:38 +00:00
Bruce Momjian 7dab896afc Remove tab in file name 2007-12-29 04:59:27 +00:00
Bruce Momjian c887ae42c1 Document that null ciphers are not recommended.
Mark Mielke
2007-12-29 04:27:02 +00:00
Bruce Momjian a8c2282fe8 Doc wording improvment. 2007-12-29 03:44:34 +00:00
Bruce Momjian 400be4ef98 Document problem with NULL SSL ciphers and man-in-the-middle attacks. 2007-12-29 03:36:56 +00:00
Bruce Momjian a82cfcb9ee Update docs to clarify purpose of SSL key file 2007-12-25 17:06:52 +00:00
Bruce Momjian 60a6dbb76c Add two documentation tables to outline SSL file usage for client and server. 2007-12-25 06:15:34 +00:00
Bruce Momjian 08c37fd44b Add documentation section about preventing server spoofing.
Update SSL documention to be clearer about certificates, and restructure
for clarity.
2007-12-25 04:00:44 +00:00
Bruce Momjian 4c1836d522 Properly indent SGML paragraph. 2007-12-23 03:10:04 +00:00
Bruce Momjian 25e9b0e36f Remove paragraph about Linux OOM killer and fork(). Instead link to
article about OOM.
2007-12-22 05:13:03 +00:00
Bruce Momjian cc04aaf9de Update pg_ctk/kill docs. 2007-12-17 14:00:52 +00:00
Bruce Momjian d08e700174 Remove tab in SGML file. 2007-12-17 13:54:10 +00:00
Alvaro Herrera 048f69e242 Improve wording. 2007-12-17 13:48:31 +00:00
Bruce Momjian 7b618017fd Update OOM wording. 2007-12-16 11:24:25 +00:00
Bruce Momjian e5a9ef55ef Add docs about OOM killer.
lst_hoe01@kwsoft.de
2007-12-16 11:22:33 +00:00
Bruce Momjian 3e4c6b5422 Mention pg_ctl kill for Win32 in docs. 2007-12-16 10:17:13 +00:00
Peter Eisentraut 9293425819 spell checker run 2007-11-28 15:42:31 +00:00
Bruce Momjian 5db1c58a1a Move NFS section into "Creating Cluster" documentation section because
it seems more logical there.
2007-11-08 15:21:03 +00:00
Bruce Momjian 1e941153a2 Working improvement. 2007-11-04 21:50:28 +00:00
Bruce Momjian c066d27f36 Add link to NFS section from "creating a database cluster. 2007-11-04 21:48:03 +00:00
Tom Lane 388c7e28c5 Update discussion of shared memory sizing for 8.3: adjust multipliers,
mention autovacuum_max_workers.  Minor copy-editing too.
2007-11-01 19:06:01 +00:00
Bruce Momjian 2ebfe9a818 Update SSL description for when SSL root.crt/server.crt is required;
add link to libpq SSL does from server docs.

Backpatch to 8.2.X.
2007-03-30 03:19:02 +00:00
Peter Eisentraut 02284e224c Minor edits 2007-03-06 09:59:22 +00:00
Peter Eisentraut f12f220e5a Add more information about avoiding Linux OOM killer.
by Toru SHIMOGAKI
2007-03-06 09:54:23 +00:00
Tom Lane 5ce7599bcd Fix markup, spelling, grammar, and explanations for SSLKEY patch. 2007-02-16 16:37:29 +00:00
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 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 818ac8479b Correct misspellings of kB. 2006-11-25 22:44:48 +00:00
Bruce Momjian 32cebaecff Remove emacs info from footer of SGML files. 2006-09-16 00:30:20 +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 e747f4935a Add support for SSL Certificate Revocation List (CRL) files, root.crl.
Libor Hoho?
2006-04-27 02:29:14 +00:00
Bruce Momjian ef5fde0881 Oops, sysctl, not sysconf, for FreeBSD. 2006-04-11 21:04:52 +00:00
Bruce Momjian 7626181bf7 More FreeBSD jail wording improvements. 2006-04-11 19:45:33 +00:00
Bruce Momjian cc7b6c75e3 Update jail wording to mention non-root users. 2006-04-11 19:42:27 +00:00
Bruce Momjian ba60acf17e Add documentation about running postmasters in FreeBSD jails (use
separate users).
2006-04-11 19:26:42 +00:00
Tom Lane eaef111396 Define a separately configurable XLOG_BLCKSZ symbol for the page size
used within WAL files.  Historically this was the same as the data file
BLCKSZ, but there's no necessary connection, and it's possible that
performance gains might ensue from reducing XLOG_BLCKSZ.  In any case
distinguishing two symbols should improve code clarity.  This commit
does not actually change the page size, only provide the infrastructure
to make it possible to do so.  initdb forced because of addition of a
field to pg_control.
Mark Wong, with some help from Simon Riggs and Tom Lane.
2006-04-03 23:35:05 +00:00
Bruce Momjian 497b5ad928 Make $PostgreSQL CVS tags consistent for SGML files. 2006-03-10 19:10:50 +00:00
Tom Lane c1bb2877b2 Improve OS X shared-memory documentation: fix typos and provide a usable
example of /etc/sysctl.conf contents.
2006-03-05 03:50:44 +00:00
Bruce Momjian 26d6054128 That was a typo in my comment before the code (the nutshell
descriptions after the code are correct). Only shmmax needs to be
multiples of the page size (at least, that's how I interpret the
Darwin code).

Chris Campbell
2006-03-04 03:47:29 +00:00
Bruce Momjian 487b7f5de3 Update OS X shared memory documentation for 10.3.9 and later to use
/etc/sysctl.conf.

Chris Campbell
2006-03-02 20:30:21 +00:00
Bruce Momjian 44f9021223 Remove BEOS port. 2006-01-05 03:01:38 +00:00
Bruce Momjian a1675649e4 Remove QNX port. 2006-01-05 01:56:30 +00:00
Tom Lane 7d732f06cc Wups, fat-fingered the calculation the first time. Update comment in
postgresql.conf.sample too.
2005-12-23 23:28:35 +00:00
Tom Lane b1bff7e6fa Update info about shared memory space calculation to match CVS tip's behavior. 2005-12-23 23:02:26 +00:00
Peter Eisentraut 39dfbe5791 Spellchecking run, final cleanups 2005-11-04 23:14:02 +00:00
Bruce Momjian 7d9ff58b22 Rename config section headings.
Simon Riggs
2005-10-26 12:55:07 +00:00
Tom Lane 8ffdcbf23b Add note that some versions of OS X require SHMMAX to be an exact multiple
of 4096.  Also add comment explaining why we don't suggest using
/etc/sysctl.conf to avoid needing to edit /etc/rc.
2005-10-16 21:22:12 +00:00
Neil Conway fc8f4bac0e Fix assorted typos in the documentation, and use American spelling
rather than British. Patch from Michael Fuhr.
2005-10-15 20:12:33 +00:00
Neil Conway 9813fc1bae Make the documentation of GUC variables a separate chapter, rather than
a section of the "Server Run-time Environment" chapter. Also, move the
SGML for the new chapter to a separate file and fix the resulting
fallout.
2005-09-12 22:11:38 +00:00
Tom Lane 571be6f381 Remove a couple of obsolete statements about how many buffers you can
fit into a 512K shared memory segment.
2005-08-30 15:48:28 +00:00
Tom Lane e038e89466 Improve table describing shared memory parameters. 2005-08-30 02:09:29 +00:00
Tom Lane 78ef2d3feb Update documentation about shared memory sizing to reflect current
reality.
2005-08-30 00:58:48 +00:00
Tom Lane 037709e0b3 Reduce default value of max_prepared_transactions from 50 to 5. This
saves nearly 700kB in the default shared memory segment size, which seems
worthwhile, and it is a feature that many users won't use anyway.  Per
Heikki's argument, there is no point in a compromise value --- those who
are using 2PC at all will probably want it at least equal to max_connections.
But we can't set it to zero by default without breaking the prepared_xacts
regression test.
2005-08-29 21:38:18 +00:00
Tom Lane 95f202c021 Adjust description of use_strict parameter. Some other minor editorial
cleanup.
2005-08-24 18:56:07 +00:00
Bruce Momjian a7f49252d2 enable_constraint_exclusion => constraint_exclusion
Also improve wording.
2005-08-22 17:35:03 +00:00
Tom Lane 6fcaaf29da Minor GUC cleanups: document krb_server_hostname and custom_variable_classes
in postgresql.conf.sample, mark custom_variable_classes as SIGHUP not
POSTMASTER to agree with the documentation (I can't see a reason it has
to be POSTMASTER so I think the docs are right).
2005-08-21 03:39:37 +00:00
Peter Eisentraut bf86bacb2c Change standard_compliant_strings to standard_conforming_strings. 2005-08-14 22:19:50 +00:00
Tom Lane d90c531188 Autovacuum loose end mop-up. Provide autovacuum-specific vacuum cost
delay and limit, both as global GUCs and as table-specific entries in
pg_autovacuum.  stats_reset_on_server_start is now OFF by default,
but a reset is forced if we did WAL replay.  XID-wrap vacuums do not
ANALYZE, but do FREEZE if it's a template database.  Alvaro Herrera
2005-08-11 21:11:50 +00:00
Bruce Momjian 833d91ae5e Fix ordering of default sync options to match code. 2005-08-09 05:01:10 +00:00
Bruce Momjian 487b757b7a Clarify wal_sync_method options in documentation. 2005-08-09 04:50:44 +00:00
Bruce Momjian 08d728372e More vacuum markup fixes. Alvaro 2005-07-30 17:15:35 +00:00
Bruce Momjian 1f54d43075 Add GUC variables to control keep-alive times for idle, interval, and
count.

Oliver Jowett
2005-07-30 15:17:26 +00:00
Tom Lane d007a95055 Simple constraint exclusion. For now, only child tables of inheritance
scans are candidates for exclusion; this should be fixed eventually.
Simon Riggs, with some help from Tom Lane.
2005-07-23 21:05:48 +00:00
Tom Lane 29094193f5 Integrate autovacuum functionality into the backend. There's still a
few loose ends to be dealt with, but it seems to work.  Alvaro Herrera,
based on the contrib code by Matthew O'Connor.
2005-07-14 05:13:45 +00:00
Bruce Momjian 0bf8b27348 Update description of GUC full_page_writes.
Michael Paesold
2005-07-06 14:45:12 +00:00
Bruce Momjian 326a7a0788 Add GUC full_page_writes to control writing full pages to WAL. 2005-07-05 23:18:10 +00:00
Bruce Momjian 9caeace71c Add SGML markup for on/off values in run-time section. 2005-07-02 19:16:36 +00:00
Bruce Momjian 6aa0fdc4aa Use on/off consistently for GUC variables in postgresql.conf and the
documentation, to match SHOW.
2005-07-02 18:29:04 +00:00
Bruce Momjian 8f6e8e8fed Clarify documentation about log_min_duration_statement. 2005-07-01 13:29:25 +00:00
Tom Lane d395aecffa Code review for escape-strings patch. Sync psql and plpgsql lexers
with main, avoid using a SQL-defined SQLSTATE for what is most definitely
not a SQL-compatible error condition, fix documentation omissions,
adhere to message style guidelines, don't use two GUC_REPORT variables
when one is sufficient.  Nothing done about pg_dump issues.
2005-06-26 19:16:07 +00:00
Bruce Momjian bb3cce4ec9 Add E'' syntax so eventually normal strings can treat backslashes
literally.

Add GUC variables:

        "escape_string_warning" - warn about backslashes in non-E strings
        "escape_string_syntax" - supports E'' syntax?
        "standard_compliant_strings" - treats backslashes literally in ''

Update code to use E'' when escapes are used.
2005-06-26 03:04:37 +00:00
Tom Lane 6f7fc0bade Cause initdb to create a third standard database "postgres", which
unlike template0 and template1 does not have any special status in
terms of backend functionality.  However, all external utilities such
as createuser and createdb now connect to "postgres" instead of
template1, and the documentation is changed to encourage people to use
"postgres" instead of template1 as a play area.  This should fix some
longstanding gotchas involving unexpected propagation of database
objects by createdb (when you used template1 without understanding
the implications), as well as ameliorating the problem that CREATE
DATABASE is unhappy if anyone else is connected to template1.
Patch by Dave Page, minor editing by Tom Lane.  All per recent
pghackers discussions.
2005-06-21 04:02:34 +00:00
Tom Lane d0a89683a3 Two-phase commit. Original patch by Heikki Linnakangas, with additional
hacking by Alvaro Herrera and Tom Lane.
2005-06-17 22:32:51 +00:00
Bruce Momjian 30b0f49ce6 Update NetBSD 'options' description.
Kris Jurka
2005-06-17 13:12:01 +00:00
Bruce Momjian 1414707e03 Improve wording of read-only GUC variables; shows -> reports. 2005-06-17 03:25:51 +00:00
Bruce Momjian 954f6bcffe Add GUC krb_server_hostname so the server hostname can be specified as
part of service principal.  If not set, any service principal matching
an entry in the keytab can be used.

NEW KERBEROS MATCHING BEHAVIOR FOR 8.1.

Todd Kover
2005-06-14 17:43:14 +00:00
Neil Conway 8c05ca7754 SGML cleanup: consistently use "endterm" in <xref>s that link to the
reference page for SQL commands, so that the link text is italicized.
2005-06-13 02:40:08 +00:00
Bruce Momjian 3572e531ca Mention prefix %t has no milliseconds. 2005-06-09 22:35:23 +00:00
Bruce Momjian 6c2ba14d8d This patch against 8.0.0beta1 source adds log_line_prefix options for
millisecond timestamps (%m) and remote host (%h). The milliseconds are
useful for QPS measurements.

Ed L.
2005-06-09 22:29:52 +00:00
Bruce Momjian 72c53ac3a7 Allow kerberos name and username case sensitivity to be specified from
postgresql.conf.

---------------------------------------------------------------------------


Here's an updated version of the patch, with the following changes:

1) No longer uses "service name" as "application version". It's instead
hardcoded as "postgres". It could be argued that this part should be
backpatched to 8.0, but it doesn't make a big difference until you can
start changing it with GUC / connection parameters. This change only
affects kerberos 5, not 4.

2) Now downcases kerberos usernames when the client is running on win32.

3) Adds guc option for "krb_caseins_users" to make the server ignore
case mismatch which is required by some KDCs such as Active Directory.
Off by default, per discussion with Tom. This change only affects
kerberos 5, not 4.

4) Updated so it doesn't conflict with the rendevouz/bonjour patch
already in ;-)

Magnus Hagander
2005-06-04 20:42:43 +00:00
Neil Conway 13b729ca52 Editing for the new "Encryption Options" section of the manual. 2005-05-25 02:56:15 +00:00
Bruce Momjian 6dc7760ac3 Add support for wal_fsync_writethrough for Darwin, and restructure the
code to better handle writethrough.

Chris Campbell
2005-05-20 14:53:26 +00:00
Bruce Momjian c9a382b2ed Rename Rendezvous to Bonjour to match OS/X renaming. 2005-05-15 00:26:19 +00:00
Bruce Momjian 6080da501c Rename encryption section. 2005-05-09 17:26:22 +00:00
Bruce Momjian 89517a2b45 Improve wording of new documentation section on encryption, and move it
a few sections up.
2005-05-09 17:13:04 +00:00
Bruce Momjian 99354440b5 Add encryption section to documentation.
Christopher Browne
2005-05-08 03:29:06 +00:00
Bruce Momjian 25434e32cb Add documentation stating how to determine if FSM settings are too low
--- look at a database-wide VACUUM VERBOSE.
2005-04-23 03:27:40 +00:00
Tom Lane 14c7fba3f7 Rethink original decision to use AND/OR Expr nodes to represent bitmap
logic operations during planning.  Seems cleaner to create two new Path
node types, instead --- this avoids duplication of cost-estimation code.
Also, create an enable_bitmapscan GUC parameter to control use of bitmap
plans.
2005-04-21 19:18:13 +00:00
Neil Conway eb4b7a0b77 Change the default setting of "add_missing_from" to false. This has been
the long-term plan for this behavior for quite some time, but it is only
possible now that DELETE has a USING clause so that the user can join
other tables in a DELETE statement without relying on this behavior.
2005-04-08 00:59:59 +00:00
Tom Lane 8c85a34a3b Officially decouple FUNC_MAX_ARGS from INDEX_MAX_KEYS, and set the
former to 100 by default.  Clean up some of the less necessary
dependencies on FUNC_MAX_ARGS; however, the biggie (FunctionCallInfoData)
remains.
2005-03-29 03:01:32 +00:00
Bruce Momjian b1f57d88f5 Change Win32 O_SYNC method to O_DSYNC because that is what the method
currently does.  This is now the default Win32 wal sync method because
we perfer o_datasync to fsync.

Also, change Win32 fsync to a new wal sync method called
fsync_writethrough because that is the behavior of _commit, which is
what is used for fsync on Win32.

Backpatch to 8.0.X.
2005-03-24 04:36:20 +00:00
Tom Lane 91728fa26c Add temp_buffers GUC variable to allow users to determine the size
of the local buffer arena for temporary table access.
2005-03-19 23:27:11 +00:00
Neil Conway 9abced035d Fix mistakes in SGML markup. From David Fetter. 2005-03-14 06:49:48 +00:00
Neil Conway ff02d0a052 Make default_with_oids default to false -- user-created tables will now
no longer include OIDs, unless WITH OIDS is specified or the
default_with_oids configuration parameter is enabled. Update the docs
accordingly.
2005-03-13 09:36:31 +00:00
Tom Lane 5d5087363d Replace the BufMgrLock with separate locks on the lookup hashtable and
the freelist, plus per-buffer spinlocks that protect access to individual
shared buffer headers.  This requires abandoning a global freelist (since
the freelist is a global contention point), which shoots down ARC and 2Q
as well as plain LRU management.  Adopt a clock sweep algorithm instead.
Preliminary results show substantial improvement in multi-backend situations.
2005-03-04 20:21:07 +00:00
Tom Lane 5c2e68ba6b Fix misspelling of sysctl, per Stefan Hans. 2005-03-02 19:58:54 +00:00
Bruce Momjian f55339577b Adjust OS-specific kernel settings to mention old and new BSD methods of
adjusting values:

> But to be on the safe side, it would make sense to do something similar
> to the BSD section, and comment about older distributions maybe needing
> to manipulate /proc/kernel/* directly.

Mark Kirkwood
2005-02-26 23:19:05 +00:00
Neil Conway cf1f6f98f2 Improvements to documentation of shared memory configuration under
FreeBSD. From Mark Kirkwood, editorializing by Neil Conway.
2005-02-10 05:14:58 +00:00
Bruce Momjian d08889aa8b Add tools/find_gt_lt to find < and > in SGML source.
Lowercase some uppercase tags so tools is more reliable at finding
problems.
2005-01-23 00:30:59 +00:00
Bruce Momjian 1ced129aa3 More < and > cleanups converted to ampersands. 2005-01-22 22:56:36 +00:00
Tom Lane b5adf46cbd Some more small improvements in response to 7.4 interactive docs comments. 2005-01-08 22:13:38 +00:00
Bruce Momjian 246be304a5 Add mention of performance impact on LIKE of non-C locales. 2005-01-04 00:05:45 +00:00
Tom Lane cdd402f8b3 More minor updates and copy-editing. 2004-12-26 23:06:56 +00:00
Tom Lane afc4ffe3c8 Add note warning that OS X updates usually overwrite /etc/rc. 2004-12-18 18:36:33 +00:00
Bruce Momjian 5dac7c73c7 Changes the doc's to reflect what the user will find as default.
Robert Treat
2004-12-18 04:21:43 +00:00
Peter Eisentraut 5ec30faee6 Spell checker run 2004-12-13 18:05:10 +00:00
Tom Lane 29a26b25ba Fix several mistaken xreflabel entries, including those spotted by
Michael Fuhr.
2004-12-05 20:05:47 +00:00
Peter Eisentraut a420b76ca5 Correctly name the Windows operating systems 2004-11-27 21:56:05 +00:00
Neil Conway 23185085b9 Add index entries for all GUC configuration parameters. 2004-11-16 05:33:14 +00:00
Tom Lane ea23ec82c2 Remove GUC USERLIMIT variable category, making the affected variables
plain SUSET instead.  Also delay processing of options received in
client connection request until after we know if the user is a superuser,
so that SUSET values can be set that way by legitimate superusers.
Per recent discussion.
2004-11-14 19:35:35 +00:00
Tom Lane 98e8b48053 Create 'default_tablespace' GUC variable that supplies a TABLESPACE
clause implicitly whenever one is not given explicitly.  Remove concept
of a schema having an associated tablespace, and simplify the rules for
selecting a default tablespace for a table or index.  It's now just
(a) explicit TABLESPACE clause; (b) default_tablespace if that's not an
empty string; (c) database's default.  This will allow pg_dump to use
SET commands instead of tablespace clauses to determine object locations
(but I didn't actually make it do so).  All per recent discussions.
2004-11-05 19:17:13 +00:00
Tom Lane e48b9b5570 Minor documentation updates from Simon Riggs. 2004-11-04 19:08:42 +00:00
Tom Lane 4347cc2392 Allow background writing to be shut down by setting limit values to zero.
This does not disable the bgwriter process: it still has to wake up often
enough to collect fsync requests from backends in a timely fashion.  But
it responds to the recent gripe about not being able to prevent the disk
from being spun up constantly.
2004-10-17 22:01:51 +00:00
Bruce Momjian a1ce88a59c Have log_duration only output when log_statement has printed the query.
This handles the new multiple log_statement values.

Ed L.
2004-10-15 16:50:31 +00:00
Tom Lane 337ffcddba Adjust configuration-files GUC behavior as per my recent proposal.
The vars are renamed to data_directory, config_file, hba_file, and
ident_file, and are guaranteed to be set to accurate absolute paths
during postmaster startup.
This commit does not yet do anything about hiding path values from
non-superusers.
2004-10-09 23:13:22 +00:00
Tom Lane 7ca3a0f3e2 Whack some sense into the configuration-file-location patch.
Refactor code into something reasonably understandable, cause
use of the feature to not fail in standalone backends or in
EXEC_BACKEND case, fix sloppy guc.c table entries, make the
documentation minimally usable.
2004-10-08 01:36:36 +00:00
Neil Conway 1bb38bb4e5 Minor documentation improvement. 2004-09-29 06:27:11 +00:00
Tom Lane 7ac258c2f3 Fix multiple breakages in our support for SSL certificates. 2004-09-26 22:51:49 +00:00
Bruce Momjian 31ae87c332 This patch attempts to note the use of the root.crt file in the server.
Given that PostgreSQL will output a message complaining about it's
absence if you're using SSL mode, I feel it's important that it gets a
mention in the documentation at some point.

Dominic Mitchell
2004-09-23 13:16:02 +00:00
Neil Conway a3c53c834f This patch from Alvaro Herrera adds transaction ID to the list of
log_line_prefix escapes. The escape sequence used for this is %x.
%x previously meant "postmaster et al. stop here" -- this has been
renamed to %q.
2004-09-22 03:55:27 +00:00
Tom Lane f6d278364e Improve documentation of log rotation options, per Ed L. 2004-09-17 22:40:46 +00:00
Tom Lane 8c603f2c95 Replace log_filename_prefix with more general log_filename parameter,
to allow DBA to choose the form in which log filenames reflect the
current time.  Also allow for truncating instead of appending to
pre-existing files --- this is convenient when the log filename pattern
rewrites the same names cyclically.  Per Ed L.
2004-08-31 04:53:44 +00:00
Neil Conway cda1bd6cfe Various minor improvements to the SGML documentation: fix some incorrect
SGML markup, add a "deprecated features" section to the 8.0 release
notes, untabify release.sgml and runtime.sgml, and make some other
minor improvements.
2004-08-24 00:06:51 +00:00
Tom Lane e617fe729d Mark server_encoding and integer_datetimes as GUC_REPORT, per previous
proposals by Oliver Jowett.  Update documentation.
2004-08-16 02:12:29 +00:00
Bruce Momjian 146b000651 Mention log_statement_stats can not be enabled with the other options. 2004-08-13 16:29:55 +00:00
Bruce Momjian 10249abfa1 Cleanup Win32 COPY handling, and move archive examples to SGML. 2004-08-12 19:03:44 +00:00
Tom Lane 33bf242a8a Make listen_addresses be a comma-separated list instead of a space-separated
list.  More consistent with our other list-containing GUC variables.
2004-08-08 20:17:36 +00:00
Tom Lane dc199eafa7 Document background writer control parameters, do some editorial work
on other recent changes in runtime parameter list.
2004-08-08 19:42:57 +00:00
Bruce Momjian 0307c09cf5 Rename vacuum_cost_naptime to vacuum_cost_delay, with agreement from Jan. 2004-08-06 04:15:09 +00:00
Tom Lane bdf8ef6925 Create a built-in log rotation program, so that we no longer have to
recommend that people go get Apache's rotatelogs program.  Additional
benefits are that configuration is done through GUC, rather than
externally, and that the postmaster can monitor the log rotator and
restart it after failure (though we certainly hope that won't happen
often).
Andreas Pflug, some rework by Tom Lane.
2004-08-05 23:32:13 +00:00
Tom Lane 59ff484894 Preliminary documentation for PITR. 2004-08-03 23:42:59 +00:00
Tom Lane 0655b26282 log_destination should only be PGC_SIGHUP, not PGC_POSTMASTER, as per
discussion yesterday.  Also a few improvements in the associated
documentation.
2004-07-24 19:51:23 +00:00
Bruce Momjian 130f89e93f Allow configuration files to be placed outside the data directory.
Add new postgresql.conf variables to point to data, pg_hba.conf, and
pg_ident.conf files.

Needs more documentation.
2004-07-11 00:18:45 +00:00
Tom Lane b3d36a2467 Fix bogus line break within a file name, as noted by Alvaro. 2004-06-27 22:58:19 +00:00
Tom Lane 1b80b6da6a Add --pwfile option to initdb, so that passwords can be set by GUI tools
that aren't able to feed the password to initdb's /dev/tty.

Magnus Hagander
2004-06-24 19:26:59 +00:00
Bruce Momjian 6cc4175b25 Attached is a patch that takes care of the PATHSEP issue. I made a more
extensive change then what was suggested. I found the file path.c that
contained a lot of "Unix/Windows" agnostic functions so I added a function
there instead and removed the PATHSEP declaration in exec.c altogether. All
to keep things from scattering all over the code.

I also took the liberty of changing the name of the functions
"first_path_sep" and "last_path_sep". Where I come from (and I'm apparently
not alone given the former macro name PATHSEP), they should be called
"first_dir_sep" and "last_dir_sep". The new function I introduced, that
actually finds path separators, is now the "first_path_sep". The patch
contains changes on all affected places of course.

I also changed the documentation on dynamic_library_path to reflect the
chagnes.

Thomas Hallgren
2004-06-10 22:26:24 +00:00
Bruce Momjian ffef9b8c50 AIX doc addition:
> FWIW, the section on configuring kernel resources under various
> Unixen[1] doesn't have any documentation for AIX. If someone out there
> knows which knobs need to be tweaked, would they mind sending in a doc
> patch? (Or just specifying what needs to be done, and I'll add the
> SGML.)

After verifying that nobody wound up messing with the kernel
parameters, here's a docs patch...

 Chris Browne
2004-05-26 18:51:43 +00:00
Bruce Momjian 3dc37cd8d6 The patch adresses the TODO list item "Allow external interfaces to
extend the GUC variable set".

Plugin modules like the pl<lang> modules needs a way to declare
configuration parameters. The postmaster has no knowledge of such
modules when it reads the postgresql.conf file. Rather than allowing
totally unknown configuration parameters, the concept of a variable
"class" is introduced. Variables that belongs to a declared classes will
create a placeholder value of string type and will not generate an
error. When a module is loaded, it will declare variables for such a
class and make those variables "consume" any placeholders that has been
defined. Finally, the module will generate warnings for unrecognized
placeholders defined for its class.

More detail:
The design is outlined after the suggestions made by Tom Lane and Joe
Conway in this thread:

http://archives.postgresql.org/pgsql-hackers/2004-02/msg00229.php

A new string variable 'custom_variable_classes' is introduced. This
variable is a comma separated string of identifiers. Each identifier
denots a 'class' that will allow its members to be added without error.
This variable must be defined in postmaster.conf.

The lexer (guc_file.l) is changed so that it can accept a qualified name
in the form <ID>.<ID> as the name of a variable. I also changed so that
the 'custom_variable_classes', if found, is added first of all variables
in order to remove the order of declaration issue.

The guc_variables table is made more dynamic. It is originally created
with 20% slack and can grow dynamically. A capacity is introduced to
avoid resizing every time a new variable is added. guc_variables and
num_guc_variables becomes static (hidden).

The GucInfoMain now uses the new function get_guc_variables() and
GetNumConfigOptions  instead or using the guc_variables directly.

The find_option() function, when passed a missing name, will check if
the name is qualified. If the name is qualified and if the qualifier
denotes a class included in the 'custom_variable_classes', a placeholder
variable will be created. Such a placeholder will not participate in a
list operation but will otherwise function as a normal string variable.

Define<type>GucVariable() functions will be added, one for each variable
type. They are inteded to be used by add-on modules like the pl<lang>
mappings. Example:

extern void DefineCustomBoolVariable(
         const char* name,
         const char* short_desc,
         const char* long_desc,
         bool* valueAddr,
         GucContext context,
         GucBoolAssignHook assign_hook,
         GucShowHook show_hook);

(I created typedefs for the assign-hook and show-hook functions). A call
to these functions will define a new GUC-variable. If a placeholder
exists it will be replaced but it's value will be used in place of the
default value. The valueAddr is assumed ot point at a default value when
the define function is called. The only constraint that is imposed on a
Custom variable is that its name is qualified.

Finally, a function:

void EmittWarningsOnPlacholders(const char* className)

was added. This function should be called when a module has completed
its variable definitions. At that time, no placeholders should remain
for the class that the module uses. If they do, elog(INFO, ...) messages
will be issued to inform the user that unrecognized variables are
present.

Thomas Hallgren
2004-05-26 15:07:41 +00:00
Tom Lane f378288e3b Minor copy-editing. 2004-04-29 04:37:09 +00:00
Bruce Momjian e3391133ae Update EXECUTE docs to mention tag matches prepared statement.
Update log_statement to more clearly state it doesn't filter based on
the statement type of the prepared statement.
2004-04-22 04:18:41 +00:00
Peter Eisentraut aeee856564 New link for Solaris IPC article 2004-04-21 13:18:28 +00:00
Bruce Momjian 6022a7d72f Add doc mention that:
process directly.  Some parameters can only be set at server start;
    any changes to their entries in the configuration file will be ignored
    until the server is restarted.
2004-04-20 16:56:19 +00:00
Bruce Momjian 77c7e8bcb8 Clarify meaning of second DateStyle value. 2004-04-15 04:46:18 +00:00
Bruce Momjian 6a25c6e1d1 > >>1. change the type of "log_statement" option from boolean to string,
> >>with allowed values of "all, mod, ddl, none" with default "none".

OK, here is a patch that implements #1.  Here is sample output:

        test=> set client_min_messages = 'log';
        SET
        test=> set log_statement = 'mod';
        SET
        test=> select 1;
         ?column?
        ----------
                1
        (1 row)

        test=> update test set x=1;
        LOG:  statement: update test set x=1;
        ERROR:  relation "test" does not exist
        test=> update test set x=1;
        LOG:  statement: update test set x=1;
        ERROR:  relation "test" does not exist
        test=> copy test from '/tmp/x';
        LOG:  statement: copy test from '/tmp/x';
        ERROR:  relation "test" does not exist
        test=> copy test to  '/tmp/x';
        ERROR:  relation "test" does not exist
        test=> prepare xx as select 1;
        PREPARE
        test=> prepare xx as update x set y=1;
        LOG:  statement: prepare xx as update x set y=1;
        ERROR:  relation "x" does not exist
        test=> explain analyze select 1;;
                                             QUERY PLAN
        ------------------------------------------------------------------------------------
         Result  (cost=0.00..0.01 rows=1 width=0) (actual time=0.006..0.007 rows=1 loops=1)
         Total runtime: 0.046 ms
        (2 rows)

        test=> explain analyze update test set x=1;
        LOG:  statement: explain analyze update test set x=1;
        ERROR:  relation "test" does not exist
        test=> explain update test set x=1;
        ERROR:  relation "test" does not exist

It checks PREPARE and EXECUTE ANALYZE too.  The log_statement values are
'none', 'mod', 'ddl', and 'all'.  For 'all', it prints before the query
is parsed, and for ddl/mod, it does it right after parsing using the
node tag (or command tag for CREATE/ALTER/DROP), so any non-parse errors
will print after the log line.
2004-04-07 05:05:50 +00:00
Bruce Momjian 6165bbab8c Remove 'syslog' GUC variable, and add more logical 'log_destination'
variable to control logoutput location on Unix and Win32.

Magnus Hagander
2004-04-05 03:02:11 +00:00
Bruce Momjian 076055ed10 Add description of log_statement_stats's function (total statement stats
rather than per-stage stats).
2004-03-31 19:59:22 +00:00
Neil Conway 1090aa8cc7 More cross-reference work, other minor SGML fixes and improvements. 2004-03-26 03:18:28 +00:00
Tom Lane 8899a2aba9 Replace max_expr_depth parameter with a max_stack_depth parameter that
is measured in kilobytes and checked against actual physical execution
stack depth, as per my proposal of 30-Dec.  This gives us a fairly
bulletproof defense against crashing due to runaway recursive functions.
2004-03-24 22:40:29 +00:00
Neil Conway d6bc5944a0 Fix a minor typo in the log_line_prefix docs and make a couple other
tiny improvements.
2004-03-24 03:48:41 +00:00
Tom Lane 2e45c143ef Replace the virtual_host and tcpip_socket parameters with a unified
listen_addresses parameter, as per recent discussion.  The default behavior
is now to listen on localhost, which eliminates the need for the -i
postmaster switch in many scenarios.

Andrew Dunstan
2004-03-23 01:23:48 +00:00
Bruce Momjian e2d8c1b2bb log_statement was not removed by the previous patch. It only updated
its description.
2004-03-15 17:57:51 +00:00
Bruce Momjian d6b57925ca Remove GUC log_statement, log_pid, log_timestamp, log_source_port.
Functionality superceeded by log_line_prefix.

Andrew Dunstan
2004-03-15 15:56:28 +00:00
Neil Conway be7976d5a2 Fix a typo in the documentation for geqo_effort. 2004-03-12 00:56:00 +00:00
Neil Conway f28d5614ce Tweak some text to avoid using <command>SET</command> as a verb, per
suggestion from Peter E.
2004-03-09 23:15:47 +00:00
Neil Conway 80ec228389 Refer to GUC variables using <xref> tags rather than <varname> tags,
where appropriate. Add "id" and "xreflabel" tags to the descriptions
of the GUC variables to facilitate this. Also make a few minor docs
cleanups.
2004-03-09 16:57:47 +00:00
Bruce Momjian 2d3fe86bc4 Add:
#log_line_prefix = ''         # e.g. '<%u%%%d> '
                              # %u=user name %d=database name
                              # %r=remote host and port
                              # %p=PID %t=timestamp %i=command tag
                              # %c=session id %l=session line number
                              # %s=session start timestamp
                              # %x=stop here in non-session processes
                              # %%='%'

Andrew Dunstan
2004-03-09 04:43:07 +00:00
Neil Conway cb659ecb40 Explicitely mention that some GUC variables cannot be changed at
runtime.
2004-03-07 01:02:55 +00:00
Tom Lane 96c229dd7a Improve documentation of virtual_host parameter: old text failed to
indicate that you could specify multiple listen addresses.
2004-03-05 23:16:17 +00:00
Neil Conway 1a6a27650d Add a few more xrefs, where they seemed appropriate: for example, refer
to the discussion of planner statistics in the documentation for the
default_statistics_target GUC var.
2004-03-01 17:58:39 +00:00
Tom Lane f83356c7f5 Do a direct probe during postmaster startup to determine the maximum
number of openable files and the number already opened.  This eliminates
depending on sysconf(_SC_OPEN_MAX), and allows much saner behavior on
platforms where open-file slots are used up by semaphores.
2004-02-23 20:45:59 +00:00
Tom Lane d46b1f904e Minor editorializing on cost-based vacuum description. 2004-02-17 07:36:47 +00:00
Neil Conway ee33fe889e Significant improvements to the documentation for the new cost-based
vacuum delay feature, including updating the docs for Tom's recent
improvements. There is still more work to be done here: for example,
adding some more information on the practical use of cost-based
vacuum delay to the "maintenance" section would probably be a good
idea.
2004-02-17 06:28:05 +00:00
Neil Conway 11acc1ffd6 Fix a minor SGML markup infelicity in recently-applied log_disconnections
patch.
2004-02-17 05:45:17 +00:00
Bruce Momjian c53611e3e7 This patch brings up to date what I did last year (now unfortunately
bitrotted) to allow the logging of the end of a session, enabled by
the config setting "log_disconnections".

Andrew Dunstan
2004-02-17 03:54:57 +00:00
Jan Wieck f884090371 Documentation for vacuum_cost config options.
Jan
2004-02-13 12:25:09 +00:00
Tom Lane 391c3811a2 Rename SortMem and VacuumMem to work_mem and maintenance_work_mem.
Make btree index creation and initial validation of foreign-key constraints
use maintenance_work_mem rather than work_mem as their memory limit.
Add some code to guc.c to allow these variables to be referenced by their
old names in SHOW and SET commands, for backwards compatibility.
2004-02-03 17:34:04 +00:00
Neil Conway 45842e6c52 Improve the documentation of the 'join_collapse_limit' GUC var. Thanks to
Tom Lane for some editorial suggestions.
2004-01-27 16:51:43 +00:00
Bruce Momjian acfa013e81 Fix typo I mistakenly added. 2004-01-25 03:30:00 +00:00
Bruce Momjian 8303a3d1ea Mention that log_statement only prints query on PREPARE, not EXECUTE,
and PL/pgSQL only prints queries on first function call.
2004-01-25 00:36:18 +00:00
Tom Lane 3969f2924b Revise GEQO planner to make use of some heuristic knowledge about SQL, namely
that it's good to join where there are join clauses rather than where there
are not.  Also enable it to generate bushy plans at need, so that it doesn't
fail in the presence of multiple IN clauses containing sub-joins.  These
changes appear to improve the behavior enough that we can substantially reduce
the default pool size and generations count, thereby decreasing the runtime,
and yet get as good or better plans as we were getting in 7.4.  Consequently,
adjust the default GEQO parameters.  I also modified the way geqo_effort is
used so that it affects both population size and number of generations;
it's now useful as a single control to adjust the GEQO runtime-vs-plan-quality
tradeoff.  Bump geqo_threshold to 12, since even with these changes GEQO
seems to be slower than the regular planner at 11 relations.
2004-01-23 23:54:21 +00:00
Tom Lane 672a807028 Repair error apparently introduced in the initial coding of GUC: the
default value for geqo_effort is supposed to be 40, not 1.  The actual
'genetic' component of the GEQO algorithm has been practically disabled
since 7.1 because of this mistake.  Improve documentation while at it.
2004-01-21 23:33:34 +00:00
Neil Conway 98dcf085e3 Implement "WITH / WITHOID OIDS" clause for CREATE TABLE AS. This is
intended to allow application authors to insulate themselves from
changes to the default value of 'default_with_oids' in future releases
of PostgreSQL.

This patch also fixes a bug in the earlier implementation of the
'default_with_oids' GUC variable: code in gram.y should not examine
the value of GUC variables directly due to synchronization issues.
2004-01-10 23:28:45 +00:00
Neil Conway bc028beb16 Make the 'wal_debug' GUC variable a boolean (rather than an integer), and
hide it behind #ifdef WAL_DEBUG blocks.
2004-01-06 17:26:23 +00:00
Neil Conway af7a21cb99 Fix (yet another) instance of incorrect markup for a GUC variable. 2004-01-05 20:37:51 +00:00
Neil Conway 7fb5a9992c This patch makes some SGML markup more consistent and makes a small
improvement to the SSL auth docs.
2003-12-13 23:59:07 +00:00
Joe Conway f0943278c1 Documentation update for previously committed changes: read-only GUC variables
and pg_settings view.
2003-12-06 23:10:23 +00:00
Peter Eisentraut 59b1a23028 Markup improvements 2003-12-04 21:24:56 +00:00
Bruce Momjian 7ce9b7c0d8 This patch adds a new GUC var, "default_with_oids", which follows the
proposal for eventually deprecating OIDs on user tables that I posted
earlier to pgsql-hackers. pg_dump now always specifies WITH OIDS or
WITHOUT OIDS when dumping a table. The documentation has been updated.

Neil Conway
2003-12-01 22:08:02 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Tom Lane c52204b224 Repair missed renamings of show_statement_stats and show_executor_stats. 2003-11-24 14:49:51 +00:00
Tom Lane 02cd2b96ac Another try at fixing the Linux overcommit docs, per Andrew Dunstan. 2003-11-16 17:01:50 +00:00
Tom Lane edc213515b Update info about SysV configuration procedures on OS X 10.3. 2003-11-16 03:58:10 +00:00
Tom Lane ffce57de40 Some editorializing on the Linux memory overcommit docs, from Neil Conway. 2003-11-16 03:38:34 +00:00