Commit Graph

11058 Commits

Author SHA1 Message Date
Heikki Linnakangas 2ad881f054 The max shared_buffers value that initdb will choose was raised, update docs.
Jeff Janes
2012-10-01 09:23:06 +03:00
Peter Eisentraut db0af74af2 PL/Python: Convert oid to long/int
oid is a numeric type, so transform it to the appropriate Python
numeric type like the other ones.
2012-09-29 12:41:00 -04:00
Tom Lane 05b555d12b Fix tar files emitted by pg_dump and pg_basebackup to be POSIX conformant.
Both programs got the "magic" string wrong, causing standard-conforming tar
implementations to believe the output was just legacy tar format without
any POSIX extensions.  This doesn't actually matter that much, especially
since pg_dump failed to fill the POSIX fields anyway, but still there is
little point in emitting tar format if we can't be compliant with the
standard.  In addition, pg_dump failed to write the EOF marker correctly
(there should be 2 blocks of zeroes not just one), pg_basebackup put the
numeric group ID in the wrong place, and both programs had a pretty
brain-dead idea of how to compute the checksum.  Fix all that and improve
the comments a bit.

pg_restore is modified to accept either the correct POSIX-compliant "magic"
string or the previous value.  This part of the change will need to be
back-patched to avoid an unnecessary compatibility break when a previous
version tries to read tar-format output from 9.3 pg_dump.

Brian Weaver and Tom Lane
2012-09-28 15:19:15 -04:00
Tom Lane 7d8cbeb0c3 Fix examples of how to use "su" while starting the server.
The syntax "su -c 'command' username" is not accepted by all versions of
su, for example not OpenBSD's.  More portable is "su username -c
'command'".  So change runtime.sgml to recommend that syntax.  Also,
add a -D switch to the OpenBSD example script, for consistency with other
examples.  Per Denis Lapshin and Gábor Hidvégi.
2012-09-25 13:52:53 -04:00
Heikki Linnakangas 2a0c81a12c Add support for include_dir in config file.
This allows easily splitting configuration into many files, deployed in a
directory.

Magnus Hagander, Greg Smith, Selena Deckelmann, reviewed by Noah Misch.
2012-09-24 18:07:53 +03:00
Tom Lane 31510194cc Minor corrections for ALTER TYPE ADD VALUE IF NOT EXISTS patch.
Produce a NOTICE when the label already exists, for consistency with other
CREATE IF NOT EXISTS commands.  Also, fix the code so it produces something
more user-friendly than an index violation when the label already exists.
This not incidentally enables making a regression test that the previous
patch didn't make for fear of exposing an unpredictable OID in the results.
Also some wordsmithing on the documentation.
2012-09-22 18:35:22 -04:00
Andrew Dunstan fcc1576687 Fix docs typo 2012-09-22 13:57:40 -04:00
Andrew Dunstan 6d12b68cd7 Allow IF NOT EXISTS when add a new enum label.
If the label is already in the enum the statement becomes a no-op.
This will reduce the pain that comes from our not allowing this
operation inside a transaction block.

Andrew Dunstan, reviewed by Tom Lane and Magnus Hagander.
2012-09-22 12:53:31 -04:00
Tom Lane 4394fe3dcb Update release notes for 9.2.1, 9.1.6, 9.0.10, 8.4.14, 8.3.21. 2012-09-19 17:39:31 -04:00
Tom Lane 3c64342c86 Provide adequate documentation of the "table_name *" notation.
Somewhere along the line, somebody decided to remove all trace of this
notation from the documentation text.  It was still in the command syntax
synopses, or at least some of them, but with no indication what it meant.
This will not do, as evidenced by the confusion apparent in bug #7543;
even if the notation is now unnecessary, people will find it in legacy
SQL code and need to know what it does.
2012-09-17 14:59:31 -04:00
Kevin Grittner 327542645e Fix documentation reference to maximum allowed for autovacuum_freeze_max_age.
The documentation mentioned setting autovacuum_freeze_max_age to
"its maximum allowed value of a little less than two billion".
This led to a post asking about the exact maximum allowed value,
which is precisely two billion, not "a little less".

Based on question by Radovan Jablonovsky.  Backpatch to 8.3.
2012-09-16 11:59:50 -05:00
Andrew Dunstan 7c328a9b04 Fix catalog docs to reflect connoinherit change in 09ff76f.
Backpatch to 9.2.
2012-09-12 14:23:50 -04:00
Kevin Grittner 4bc0d2e2cf Fix typo: lexemes misspelled in full text search docs.
Dan Scott
2012-09-11 19:46:17 -05:00
Robert Haas dda589c96b Update syntax shown for \copy to match new syntax for COPY.
Etsuro Fujita
2012-09-06 17:00:03 -04:00
Tom Lane 25f4fe4e46 Fix typo in information_schema documentation.
Shigeru Hanada
2012-09-05 23:37:42 -04:00
Tom Lane 185b744ee6 Make one last copy-editing pass over the 9.2 release notes.
Also, set the release date to 2012-09-10, since we're pretty well
committed to that now.
2012-09-05 21:28:23 -04:00
Bruce Momjian 00a8eb61a2 Document that pg_upgrade requires PGHOST be set for any pre-9.1 servers
with a socket directory mismatch with the new server.

Backpatch to 9.2.
2012-09-04 09:17:30 -04:00
Magnus Hagander 4effe7a589 Mention basebackup-from-slave next to cascading replication 2012-09-04 14:37:14 +02:00
Tom Lane f763b77193 Fix pg_upgrade to cope with non-default unix_socket_directory scenarios.
When starting either an old or new postmaster, force it to place its Unix
socket in the current directory.  This makes it even harder for accidental
connections to occur during pg_upgrade, and also works around some
scenarios where the default socket location isn't usable.  (For example,
if the default location is something other than "/tmp", it might not exist
during "make check".)

When checking an already-running old postmaster, find out its actual socket
directory location from postmaster.pid, if possible.  This dodges problems
with an old postmaster having a configured location different from the
default built into pg_upgrade's libpq.  We can't find that out if the old
postmaster is pre-9.1, so also document how to cope with such scenarios
manually.

In support of this, centralize handling of the connection-related command
line options passed to pg_upgrade's subsidiary programs, such as pg_dump.
This should make future changes easier.

Bruce Momjian and Tom Lane
2012-09-03 13:52:40 -04:00
Bruce Momjian 7682c5947d Update URLs that pointed to sun.com; either repoint them or remove
them.
2012-09-02 09:16:26 -04:00
Bruce Momjian 6c82a86c6f Add small doc mention that libpq is named after POSTQUEL. 2012-09-02 08:42:03 -04:00
Bruce Momjian 53fa0c6db8 Revert doc patch 305557984d as the values
are sometimes signed, sometimes unsigned.
2012-09-01 12:05:01 -04:00
Tom Lane b8a4093b58 Fix broken link in installation.sgml.
Linking to other parts of the manual doesn't work when building the
standalone INSTALL document.
2012-09-01 10:43:50 -04:00
Robert Haas e8d6c98c2f Cross-link to doc build requirements from install requirements.
Jeff Janes
2012-09-01 06:27:52 -04:00
Tom Lane 06310178ef More documentation updates for LATERAL.
Extend xfunc.sgml's discussion of set-returning functions to show an
example of using LATERAL, and recommend that over putting SRFs in the
targetlist.

In passing, reword func.sgml's section on set-returning functions so
that it doesn't claim that the functions listed therein are all the
built-in set-returning functions.  That hasn't been true for a long
time, and trying to make it so doesn't seem like it would be an
improvement.  (Perhaps we should rename that section?)

Both per suggestions from Merlin Moncure.
2012-09-01 00:40:25 -04:00
Peter Eisentraut 5cad024524 psql: Reduce compatibility warning
Only warn when connecting to a newer server, since connecting to older
servers works pretty well nowadays.  Also update the documentation a
little about current psql/server compatibility expectations.
2012-08-31 23:28:14 -04:00
Bruce Momjian f789909b59 In pg_upgade, document that the port numbers must be different when
checking an old running server.
2012-08-31 16:56:05 -04:00
Bruce Momjian c36b06a70d Clarify FreeBSD instructions in pg_test_timing.
Josh Kupershmidt
2012-08-30 18:38:00 -04:00
Bruce Momjian b5dc7612a5 Properly document that SIGTERM is OK for users to use on a postgres
session, now that pg_terminate_backend() uses it.

Josh Kupershmidt
2012-08-30 17:58:36 -04:00
Bruce Momjian 39d0653d05 Revert 1fbc30f1dc because the
--enable-shared is about Plyton's configure, not ours.
2012-08-30 17:05:51 -04:00
Bruce Momjian 1fbc30f1dc Remove doc mention of --enable-shared, per Tom. 2012-08-30 17:00:51 -04:00
Bruce Momjian 39b42ecb05 Document that max_locks_per_transaction might need to be increased for
queries on parent tables, per suggestion from Josh Berkus.
2012-08-30 16:56:23 -04:00
Robert Haas 9bedfbd02b Fix checkpoint_timeout documentation to reflect current behavior.
Jeff Janes
2012-08-30 15:08:36 -04:00
Bruce Momjian 83fbfec383 Document that log_autovacuum_min_duration can be used to monitor
autovacuum activity.

Per report from Marc Mamin
2012-08-30 14:44:46 -04:00
Robert Haas 35738b5906 Document how to prevent PostgreSQL itself from exhausting memory.
The existing documentation in Linux Memory Overcommit seemed to
assume that PostgreSQL itself could never be the problem, or at
least it didn't tell you what to do about it.

Per discussion with Craig Ringer and Kevin Grittner.
2012-08-30 14:24:07 -04:00
Robert Haas b9ea8d20fd Document that COPY OUT requires an absolute pathname.
As suggested by Etsuro Fujita, but with somewhat different wording.
2012-08-30 13:18:23 -04:00
Bruce Momjian 48a9c7823e Remove old documentation warnings about the use of bigint. 2012-08-30 13:13:46 -04:00
Robert Haas 152525b5f3 Document that xslt-related RPMs may be needed to build docs. 2012-08-30 10:39:03 -04:00
Bruce Momjian 9fe6da5c0d Document that NOTIFY events are visible to all users. 2012-08-29 21:45:31 -04:00
Bruce Momjian 0f3351aacf Adjust pg_test_timing to show shortest test durations first, place
percentage column before count column.  Docs updated.
2012-08-28 12:57:13 -04:00
Bruce Momjian 5ea6c9d798 Update doc mention of how to compute bigint advisory lock value, per Tom
Lane's correction.
2012-08-28 12:17:22 -04:00
Bruce Momjian bf849af7f3 Document how to create advisory lock "bigint" values in SQL.
David E. Wheeler
2012-08-27 22:36:48 -04:00
Tom Lane 7417a8e3dd Improve a couple of 9.2 release note entries.
Clarify the compatibility notes about EXTRACT() and about statistics
timing columns.
2012-08-27 20:53:57 -04:00
Tom Lane 8770328784 Add section IDs to subsections of syntax.sgml that lacked them.
This is so that these sections will have stable HTML tags that one can
link to, rather than things like "AEN1902".  Perhaps we should mount a
campaign to do this everywhere, but I've found myself pointing at
syntax.sgml subsections often enough to be sure it's useful here.
2012-08-27 20:17:12 -04:00
Bruce Momjian 483c2c1071 Document the lack of reading the PGDATABASE environment variable in
pg_restore.
2012-08-27 15:27:09 -04:00
Bruce Momjian 7a42dff47e Update FreeBSD kernel configuration documentation.
Brad Davis
2012-08-26 23:21:57 -04:00
Bruce Momjian de87d47044 Clarify documentation that primary key and unique constraints are copied
for CREATE TABLE LIKE ... INCLUDING INDEXES.

Per report from david.sahagian@emc.com
2012-08-26 16:33:11 -04:00
Bruce Momjian f6752ee59a Document clearly that psql \! parameter interpretation limitations are
the same as \copy.
2012-08-25 19:11:21 -04:00
Peter Eisentraut 7514208fbb Some spelling adjustments in release notes 2012-08-24 22:50:43 -04:00
Peter Eisentraut 8606e47e11 Normalize some British spellings 2012-08-24 22:50:43 -04:00
Peter Eisentraut 406473b152 Put options on man page and in help output in slightly better order 2012-08-24 00:06:59 -04:00
Heikki Linnakangas 8b6b50a34d Fix typo in example. 2012-08-23 11:58:11 +03:00
Peter Eisentraut 26a6267226 Add instructions for setting up documentation tool chain on Mac OS X 2012-08-23 02:29:21 -04:00
Tom Lane 6e2e12c947 Remove overly-pessimistic statement about constraint exclusion.
As of 9.2, constraint exclusion should work okay with prepared statements:
the planner will try custom plans with actual values of the parameters,
and observe that they are a lot cheaper than the generic plan, and thus
never fall back to using the generic plan.  Noted by Tatsuhito Kasahara.
2012-08-22 23:55:34 -04:00
Tom Lane b33f611682 Make a cut at a major-features list for 9.2.
This is open to debate of course, but it's past time we had *something*
here.
2012-08-22 17:58:06 -04:00
Tom Lane 979f8f0431 Make an editorial pass over the 9.2 release notes.
A very large number of small improvements ...
2012-08-22 17:37:02 -04:00
Tom Lane 932a271956 Fix erroneous documentation of synchronous_commit = remote_write.
The docs claimed that this mode only waits for the standby to receive WAL
data, but actually it waits for the data to be written out to the standby's
OS; which is a pretty significant difference because it removes the risk of
crash of the walreceiver process.
2012-08-22 14:04:36 -04:00
Bruce Momjian 03af60c010 Fix typo. 2012-08-22 12:05:25 -04:00
Bruce Momjian 7dff5b8edd Document that pg_reload_conf() is also an easy way to reload the
configuration file.
2012-08-22 12:01:27 -04:00
Tom Lane 0830cc9fe0 Update 9.2 release notes to reflect commits to date.
I was unable to entirely resist the temptation to copy-edit related
entries, but will save most of that for a separate pass.
2012-08-21 22:56:45 -04:00
Robert Haas 82ef3d3008 Add a note to the MVCC chapter that some things aren't transactional.
Craig Ringer, slightly edited by me.
2012-08-21 11:10:17 -04:00
Tom Lane 18226849ea Copy-editing for recent window-functions documentation rewrite.
Fix grammar, put back some removed information, rearrange for clarity.
2012-08-17 15:40:35 -04:00
Bruce Momjian 305557984d Update 'int' protocol documentation mention to be "signed", per request
from Dmitriy Igrishin
2012-08-16 22:07:14 -04:00
Bruce Momjian 1037f2f646 Document that tab completation can interfere with some SQL commands. 2012-08-16 18:41:38 -04:00
Bruce Momjian c99016f1d0 Add warning about pg_ctl restart and the use of relative paths on the command-line. 2012-08-16 18:15:58 -04:00
Bruce Momjian c6ce4c1322 In docs, clarify that, without ORDER BY, the window frame is all rows in
the partition.
2012-08-16 11:32:22 -04:00
Bruce Momjian 5c1b2f5daa Revert: In docs, change a few cases of "not important" to
"unimportant".

Per request from Heikki
2012-08-16 11:26:40 -04:00
Bruce Momjian d5816d11af Rewrite window function reference section to more clearly explain
keywords and concepts, based on suggestions by Florian Pflug.
2012-08-16 10:42:42 -04:00
Bruce Momjian 7c97f6a0cb In docs, change a few cases of "not important" to "unimportant". 2012-08-16 10:36:43 -04:00
Bruce Momjian de3773d951 Fix SGML markup; missing tag. 2012-08-15 23:57:19 -04:00
Bruce Momjian 077908aed7 Document that PGDATA has to point to the configuration files, rather
than the actual data storage directory.

Per suggestion from Thom Brown
2012-08-15 22:59:37 -04:00
Bruce Momjian 6ff55ebe3d Document that pg_ctl -w allows for the entry of an SSL passphase on
startup.

Per report from Thom Brown
2012-08-15 20:52:12 -04:00
Bruce Momjian 16d508ccbc Add CREATE FOREIGN TABLE doc reference to CREATE SERVER.
Per suggestion from Ray Stell
2012-08-15 20:38:01 -04:00
Bruce Momjian 0729271adf Properly document that NEW is unassigned in plpgsql for DELETE (not
NULL), and OLD is unassigned for INSERT, and NEW/OLD are unassigned (not
NULL) for statement-level triggers.

Per report from Pavel Stehule
2012-08-15 20:29:58 -04:00
Bruce Momjian 083b9133aa On second thought, explain why date_trunc("week") on interval values is
not supported in the error message, rather than the docs.
2012-08-15 16:48:05 -04:00
Bruce Momjian 74f4881d7c Document why you can't use date_trunc("week") on intervals. 2012-08-15 16:03:58 -04:00
Bruce Momjian fc5f20057f Document that foreign "version" and "type" values are only useful to
certain foreign data wrappers.
2012-08-15 11:47:02 -04:00
Bruce Momjian a973296598 Properly escape usernames in initdb, so names with single-quotes are
supported.  Also add assert to catch future breakage.

Also, improve documentation that "double"-quotes must be used in
pg_hba.conf (not single quotes).
2012-08-15 11:23:15 -04:00
Bruce Momjian 864de654c8 Add more limited large object trigger example. 2012-08-14 23:25:20 -04:00
Bruce Momjian 9e84cccff2 Add doc example of restricting large object trigger firing to only
updates of the column of interest.
2012-08-14 23:21:28 -04:00
Tom Lane e45ae40181 Update release notes for 9.1.5, 9.0.9, 8.4.13, 8.3.20. 2012-08-14 18:33:51 -04:00
Tom Lane adc97d03b9 Prevent access to external files/URLs via contrib/xml2's xslt_process().
libxslt offers the ability to read and write both files and URLs through
stylesheet commands, thus allowing unprivileged database users to both read
and write data with the privileges of the database server.  Disable that
through proper use of libxslt's security options.

Also, remove xslt_process()'s ability to fetch documents and stylesheets
from external files/URLs.  While this was a documented "feature", it was
long regarded as a terrible idea.  The fix for CVE-2012-3489 broke that
capability, and rather than expend effort on trying to fix it, we're just
going to summarily remove it.

While the ability to write as well as read makes this security hole
considerably worse than CVE-2012-3489, the problem is mitigated by the fact
that xslt_process() is not available unless contrib/xml2 is installed,
and the longstanding warnings about security risks from that should have
discouraged prudent DBAs from installing it in security-exposed databases.

Reported and fixed by Peter Eisentraut.

Security: CVE-2012-3488
2012-08-14 18:31:18 -04:00
Bruce Momjian 1d96cf9404 In documentation, change "recommendable" to "recommended", per
consultation with word definitions.

Backpatch to 9.2.
2012-08-14 12:36:48 -04:00
Tom Lane 83af58f6b5 Add link from COPY ref page to psql \copy.
Jeff Janes
2012-08-11 13:51:22 -04:00
Tom Lane c9b0cbe98b Support having multiple Unix-domain sockets per postmaster.
Replace unix_socket_directory with unix_socket_directories, which is a list
of socket directories, and adjust postmaster's code to allow zero or more
Unix-domain sockets to be created.

This is mostly a straightforward change, but since the Unix sockets ought
to be created after the TCP/IP sockets for safety reasons (better chance
of detecting a port number conflict), AddToDataDirLockFile needs to be
fixed to support out-of-order updates of data directory lockfile lines.
That's a change that had been foreseen to be necessary someday anyway.

Honza Horak, reviewed and revised by Tom Lane
2012-08-10 17:27:15 -04:00
Magnus Hagander b3055ab4fb Fix upper limit of superuser_reserved_connections, add limit for wal_senders
Should be limited to the maximum number of connections excluding
autovacuum workers, not including.

Add similar check for max_wal_senders, which should never be higher than
max_connections.
2012-08-10 14:50:45 +02:00
Robert Haas be690e291d Make psql -1 < file behave as expected.
Previously, the -1 option was silently ignored.

Also, emit an error if -1 is used in a context where it won't be
respected, to avoid user confusion.

Original patch by Fabien COELHO, but this version is quite different
from the original submission.
2012-08-09 10:02:50 -04:00
Simon Riggs 42020a89c7 Doc correction to point out that 9.2+ can overwrite pg_xlog files.
Noted by Noah Misch, patch by Fujii Masao
2012-08-08 22:34:46 +01:00
Tom Lane 5ebaaa4944 Implement SQL-standard LATERAL subqueries.
This patch implements the standard syntax of LATERAL attached to a
sub-SELECT in FROM, and also allows LATERAL attached to a function in FROM,
since set-returning function calls are expected to be one of the principal
use-cases.

The main change here is a rewrite of the mechanism for keeping track of
which relations are visible for column references while the FROM clause is
being scanned.  The parser "namespace" lists are no longer lists of bare
RTEs, but are lists of ParseNamespaceItem structs, which carry an RTE
pointer as well as some visibility-controlling flags.  Aside from
supporting LATERAL correctly, this lets us get rid of the ancient hacks
that required rechecking subqueries and JOIN/ON and function-in-FROM
expressions for invalid references after they were initially parsed.
Invalid column references are now always correctly detected on sight.

In passing, remove assorted parser error checks that are now dead code by
virtue of our having gotten rid of add_missing_from, as well as some
comments that are obsolete for the same reason.  (It was mainly
add_missing_from that caused so much fudging here in the first place.)

The planner support for this feature is very minimal, and will be improved
in future patches.  It works well enough for testing purposes, though.

catversion bump forced due to new field in RangeTblEntry.
2012-08-07 19:02:54 -04:00
Bruce Momjian ac78c4178b Fix to_char(), to_date(), and to_timestamp() to handle negative/BC
century specifications just like positive/AD centuries.  Previously the
behavior was either wrong or inconsistent with positive/AD handling.

Centuries without years now always assume the first year of the century,
which is now documented.
2012-08-07 13:34:44 -04:00
Robert Haas b112df8421 Typo fixes for previous commit.
Noted by Thom Brown.
2012-08-06 16:12:17 -04:00
Robert Haas 95282d3522 Warn more vigorously about the non-transactional behavior of sequences.
Craig Ringer, edited fairly heavily by me
2012-08-06 15:19:31 -04:00
Bruce Momjian 4639432597 Reword documentation for concurrent index rebuilds to be clearer.
Backpatch to 9.1 and 9.2.
2012-08-04 10:35:47 -04:00
Bruce Momjian 95e750520c Add link to synchronous_commit variables in high availability docs.
Backpatch to 9.2

Erik Rijkers
2012-08-03 16:33:20 -04:00
Bruce Momjian 9fb5952cdf Document that trying to exceed temp_file_limit causes a query cancel.
Backpatch to 9.2.
2012-08-03 15:15:27 -04:00
Bruce Momjian 7b8c798362 Document that, for psql -c, only the result of the last command is
returned, per report from Aleksey Tsalolikhin

Backpatch to 9.2 and 9.1.
2012-08-03 14:02:22 -04:00
Tom Lane 7719ed04bc Update release notes for libpq feature change. 2012-08-02 13:21:19 -04:00
Tom Lane 41b9c8452b Replace libpq's "row processor" API with a "single row" mode.
After taking awhile to digest the row-processor feature that was added to
libpq in commit 92785dac2e, we've concluded
it is over-complicated and too hard to use.  Leave the core infrastructure
changes in place (that is, there's still a row processor function inside
libpq), but remove the exposed API pieces, and instead provide a "single
row" mode switch that causes PQgetResult to return one row at a time in
separate PGresult objects.

This approach incurs more overhead than proper use of a row processor
callback would, since construction of a PGresult per row adds extra cycles.
However, it is far easier to use and harder to break.  The single-row mode
still affords applications the primary benefit that the row processor API
was meant to provide, namely not having to accumulate large result sets in
memory before processing them.  Preliminary testing suggests that we can
probably buy back most of the extra cycles by micro-optimizing construction
of the extra results, but that task will be left for another day.

Marko Kreen
2012-08-02 13:10:30 -04:00
Tom Lane 7c0fecdaef Add documentation cross-reference for JSON functions.
Thom Brown
2012-08-01 00:41:41 -04:00
Alvaro Herrera 2f29f011c8 pg_basebackup: stylistic adjustments
The most user-visible part of this is to change the long options
--statusint and --noloop to --status-interval and --no-loop,
respectively, per discussion.

Also, consistently enclose file names in double quotes, per our
conventions; and consistently use the term "transaction log file" to
talk about WAL segments.  (Someday we may need to go over this
terminology and make it consistent across the whole source code.)

Finally, reflow the code to better fit in 80 columns, and have pgindent
fix it up some more.
2012-07-31 11:02:39 -04:00