Commit Graph

10586 Commits

Author SHA1 Message Date
Tom Lane 5943d40168 Remove erroneous claim about use of pg_locks.objid for advisory locks.
The correct information appears in the text, so just remove the statement
in the table, where it did not fit nicely anyway.  (Curiously, the correct
info has been there much longer than the erroneous table entry.)
Resolves problem noted by Daniele Varrazzo.

In HEAD and 9.1, also do a bit of wordsmithing on other text on the page.
2011-11-28 13:51:58 -05:00
Magnus Hagander 64aea1ebc7 Add libpq connection option to disable SSL compression
This can be used to remove the overhead of SSL compression on
fast networks.

Laurenz Albe
2011-11-28 13:13:42 +01:00
Tom Lane 9ed439a9c0 Fix unsupported options in CREATE TABLE ... AS EXECUTE.
The WITH [NO] DATA option was not supported, nor the ability to specify
replacement column names; the former limitation wasn't even documented, as
per recent complaint from Naoya Anzai.  Fix by moving the responsibility
for supporting these options into the executor.  It actually takes less
code this way ...

catversion bump due to change in representation of IntoClause, which might
affect stored rules.
2011-11-24 23:21:45 -05:00
Tom Lane 604d4c4c95 Some more editing of the range-types documentation.
Be more thorough about specifying the expectations for canonical and
subtype_diff functions, and move that info to the same place.
2011-11-23 19:13:56 -05:00
Tom Lane 74c1723fc8 Remove user-selectable ANALYZE option for range types.
It's not clear that a per-datatype typanalyze function would be any more
useful than a generic typanalyze for ranges.  What *is* clear is that
letting unprivileged users select typanalyze functions is a crash risk or
worse.  So remove the option from CREATE TYPE AS RANGE, and instead put in
a generic typanalyze function for ranges.  The generic function does
nothing as yet, but hopefully we'll improve that before 9.2 release.
2011-11-23 00:03:22 -05:00
Tom Lane df73584431 Remove zero- and one-argument range constructor functions.
Per discussion, the zero-argument forms aren't really worth the catalog
space (just write 'empty' instead).  The one-argument forms have some use,
but they also have a serious problem with looking too much like functional
cast notation; to the point where in many real use-cases, the parser would
misinterpret what was wanted.

Committing this as a separate patch, with the thought that we might want
to revert part or all of it if we can think of some way around the cast
ambiguity.
2011-11-22 20:45:05 -05:00
Peter Eisentraut 024ea25ccd Small markup and wording improvement 2011-11-22 21:14:53 +02:00
Tom Lane b985d48779 Further code review for range types patch.
Fix some bugs in coercion logic and pg_dump; more comment cleanup;
minor cosmetic improvements.
2011-11-20 23:50:27 -05:00
Tom Lane a1a233af66 Further review of range-types patch.
Lots of documentation cleanup today, and still more type_sanity tests.
2011-11-18 18:24:32 -05:00
Tom Lane 1a8b9fb549 Extend the unknowns-are-same-as-known-inputs type resolution heuristic.
For a very long time, one of the parser's heuristics for resolving
ambiguous operator calls has been to assume that unknown-type literals are
of the same type as the other input (if it's known).  However, this was
only used in the first step of quickly checking for an exact-types match,
and thus did not help in resolving matches that require coercion, such as
matches to polymorphic operators.  As we add more polymorphic operators,
this becomes more of a problem.  This patch adds another use of the same
heuristic as a last-ditch check before failing to resolve an ambiguous
operator or function call.  In particular this will let us define the range
inclusion operator in a less limited way (to come in a follow-on patch).
2011-11-17 18:28:41 -05:00
Robert Haas 67dc4eed42 Remove ancient downcasing code from procedural language operations.
A very long time ago, language names were specified as literals rather
than identifiers, so this code was added to do case-folding.  But that
style has ben deprecated for many years so this isn't needed any more.
Language names will still be downcased when specified as unquoted
identifiers, but quoted identifiers or the old style using string
literals will be left as-is.
2011-11-17 14:25:18 -05:00
Tom Lane 4f9e33063c Return NULL instead of throwing error when desired bound is not available.
Change range_lower and range_upper to return NULL rather than throwing an
error when the input range is empty or the relevant bound is infinite.  Per
discussion, throwing an error seems likely to be unduly hard to work with.
Also, this is more consistent with the behavior of the constructors, which
treat NULL as meaning an infinite bound.
2011-11-14 15:34:39 -05:00
Tom Lane 851c83fc81 Return FALSE instead of throwing error for comparisons with empty ranges.
Change range_before, range_after, range_adjacent to return false rather
than throwing an error when one or both input ranges are empty.

The original definition is unnecessarily difficult to use, and also can
result in undesirable planner failures since the planner could try to
compare an empty range to something else while deriving statistical
estimates.  (This was, in fact, the cause of repeatable regression test
failures on buildfarm member jaguar, as well as intermittent failures
elsewhere.)

Also tweak rangetypes regression test to not drop all the objects it
creates, so that the final state of the regression database contains
some rangetype objects for pg_dump testing.
2011-11-14 15:15:53 -05:00
Peter Eisentraut 95d2af1646 Add psql expanded auto mode
This adds the "auto" option to the \x command, which switches to the
expanded mode when the normal output would be wider than the screen.

reviewed by Noah Misch
2011-11-12 17:03:10 +02:00
Robert Haas 788cb1c2e8 Correct documentation for trace_userlocks. 2011-11-10 18:00:34 -05:00
Robert Haas 71b2b657c0 Revert removal of trace_userlocks, because userlocks aren't gone.
This reverts commit 0180bd6180.
contrib/userlock is gone, but user-level locking still exists,
and is exposed via the pg_advisory* family of functions.
2011-11-10 17:54:27 -05:00
Bruce Momjian d5873b6359 Document that PQexec() can handle a NULL res pointer just fine.
Backpatch to 9.1.

Mark Hills
2011-11-10 13:00:44 -05:00
Heikki Linnakangas fbf99d2f16 Adjust range type docs for some last-minute changes I made to the patch.
non_empty(anyrange) function was removed, empty(anyrange) was renamed to
isempty(anyrange), and !? operators were removed.
2011-11-08 09:42:32 +02:00
Peter Eisentraut 6477d66780 -DLINUX_OOM_ADJ=0 should be in CPPFLAGS, not CFLAGS 2011-11-08 06:49:50 +02:00
Robert Haas b60653bc0b Remove hstore's text => text operator.
Since PostgreSQL 9.0, we've emitted a warning message when an operator
named => is created, because the SQL standard now reserves that token
for another use.  But we've also shipped such an operator with hstore.
Use of the function hstore(text, text) has been recommended in
preference to =>(text, text).  Per discussion, it's now time to take
the next step and stop shipping the operator.  This will allow us to
prohibit the use of => as an operator name in a future release if and
when we wish to support the SQL standard use of this token.

The release notes should mention this incompatibility.

Patch by me, reviewed by David Wheeler, Dimitri Fontaine and Tom Lane.
2011-11-07 21:47:45 -05:00
Robert Haas bd2396988a Minor grammar improvements. 2011-11-07 12:27:26 -05:00
Peter Eisentraut 27ef415a71 Fix archive_command example
The given archive_command example didn't use %p or %f, which wouldn't
really work in practice.
2011-11-04 22:01:35 +02:00
Peter Eisentraut 39b2d9ffb0 Add note about using GNU tar warning options for base backups 2011-11-04 21:52:37 +02:00
Andrew Dunstan f66c8252ab Role membership of superusers is only by explicit membership for HBA.
Document that this rule applies to 'samerole' as well as to named roles.

Per gripe from Tom Lane.
2011-11-03 16:29:41 -04:00
Andrew Dunstan 94cd0f1ad8 Do not treat a superuser as a member of every role for HBA purposes.
This makes it possible to use reject lines with group roles.

Andrew Dunstan, reviewd by Robert Haas.
2011-11-03 12:45:02 -04:00
Heikki Linnakangas 4429f6a9e3 Support range data types.
Selectivity estimation functions are missing for some range type operators,
which is a TODO.

Jeff Davis
2011-11-03 13:42:15 +02:00
Simon Riggs 4334289186 Improve docs for timing and skipping of checkpoints
Greg Smith
2011-11-03 08:52:20 +00:00
Magnus Hagander 589adb86ee Document that multiple LDAP servers can be specified 2011-11-01 15:44:26 +01:00
Robert Haas 9cf12dfd4e Clarify that ORDER BY/FOR UPDATE can't malfunction at higher iso levels.
Kevin Grittner
2011-10-28 12:02:04 -04:00
Robert Haas 6c21105fb4 Change "and and" to "and".
Report by Vik Reykja, patch by Kevin Grittner.
2011-10-28 11:59:55 -04:00
Tom Lane bf82013631 Typo fixes.
expect -> except, noted by Andrew Dunstan.  Also, "cannot" seems more
readable here than "can not", per David Wheeler.
2011-10-26 18:04:13 -04:00
Magnus Hagander d9bae53173 Implement streaming xlog for backup tools
Add option for parallel streaming of the transaction log while a
base backup is running, to get the logfiles before the server has
removed them.

Also add a tool called pg_receivexlog, which streams the transaction
log into files, creating a log archive without having to wait for
segments to complete, thus decreasing the window of data loss without
having to waste space using archive_timeout. This works best in
combination with archive_command - suggested usage docs etc coming later.
2011-10-26 20:13:33 +02:00
Magnus Hagander b0bec068e2 Fix typo 2011-10-25 22:46:14 +02:00
Magnus Hagander d8ea33f2c0 Support configurable eventlog application names on Windows
This allows different instances to use the eventlog with different
identifiers, by setting the event_source GUC, similar to how
syslog_ident works.

Original patch by MauMau, heavily modified by Magnus Hagander
2011-10-25 20:02:55 +02:00
Tom Lane bb446b689b Support synchronization of snapshots through an export/import procedure.
A transaction can export a snapshot with pg_export_snapshot(), and then
others can import it with SET TRANSACTION SNAPSHOT.  The data does not
leave the server so there are not security issues.  A snapshot can only
be imported while the exporting transaction is still running, and there
are some other restrictions.

I'm not totally convinced that we've covered all the bases for SSI (true
serializable) mode, but it works fine for lesser isolation modes.

Joachim Wieland, reviewed by Marko Tiikkaja, and rather heavily modified
by Tom Lane
2011-10-22 18:23:30 -04:00
Robert Haas 3716ab2c0c Document that postmaster.opts is excluded from base backups
Fujii Masao
2011-10-19 00:20:21 -04:00
Robert Haas c53d3a9ee1 Make the CHECKPOINT reference page more clear.
Josh Kupershmidt, reviewed by Fujii Masao
2011-10-18 20:14:51 -04:00
Tom Lane 336c1d7a51 Avoid assuming that index-only scan data matches the index's rowtype.
In general the data returned by an index-only scan should have the
datatypes originally computed by FormIndexDatum.  If the index opclasses
use "storage" datatypes different from their input datatypes, the scan
tuple will not have the same rowtype attributed to the index; but we had
a hard-wired assumption that that was true in nodeIndexonlyscan.c.  We'd
already hacked around the issue for the one case where the types are
different in btree indexes (btree name_ops), but this would definitely
come back to bite us if we ever implement index-only scans in GiST.

To fix, require the index AM to explicitly provide the tupdesc for the
tuple it is returning.  btree can just pass back the index's tupdesc, but
GiST will have to work harder when and if it supports index-only scans.

I had previously proposed fixing this by allowing the index AM to fill the
scan tuple slot directly; but on reflection that seemed like a module
layering violation, since TupleTableSlots are creatures of the executor.
At least in the btree case, it would also be less efficient, since the
tuple deconstruction work would occur even for rows later found to be
invisible to the scan's snapshot.
2011-10-16 19:15:04 -04:00
Tom Lane 9e8da0f757 Teach btree to handle ScalarArrayOpExpr quals natively.
This allows "indexedcol op ANY(ARRAY[...])" conditions to be used in plain
indexscans, and particularly in index-only scans.
2011-10-16 15:39:24 -04:00
Tom Lane 0898d71f66 Marginal improvements to documentation of plpgsql's OPEN cursor statement.
Rearrange text to improve clarity, and add an example of implicit reference
to a plpgsql variable in a bound cursor's query.  Byproduct of some work
I'd done on the "named cursor parameters" patch before giving up on it.
2011-10-15 13:02:37 -04:00
Bruce Momjian b4aec388d8 Document that is the psql version number, not the server version number,
that controls .psqlrc.
2011-10-15 11:43:19 -04:00
Bruce Momjian 2deba6d405 Improve doc wording of drop table permission. 2011-10-15 10:08:02 -04:00
Bruce Momjian 2795592e52 Allow a major PG version psql .psqlrc file to be used if a minor
matching version file does not exist.  This avoids needing to rename
.psqlrc files after minor version upgrades.
2011-10-14 20:27:14 -04:00
Tom Lane e6858e6657 Measure the number of all-visible pages for use in index-only scan costing.
Add a column pg_class.relallvisible to remember the number of pages that
were all-visible according to the visibility map as of the last VACUUM
(or ANALYZE, or some other operations that update pg_class.relpages).
Use relallvisible/relpages, instead of an arbitrary constant, to estimate
how many heap page fetches can be avoided during an index-only scan.

This is pretty primitive and will no doubt see refinements once we've
acquired more field experience with the index-only scan mechanism, but
it's way better than using a constant.

Note: I had to adjust an underspecified query in the window.sql regression
test, because it was changing answers when the plan changed to use an
index-only scan.  Some of the adjacent tests perhaps should be adjusted
as well, but I didn't do that here.
2011-10-14 17:23:46 -04:00
Bruce Momjian ad30d36642 Document actual string that has to be returned by the client for MD5
authentication.

Report and pseudo code by Cyan Ogilvie
2011-10-13 20:48:50 -04:00
Bruce Momjian 0180bd6180 Remove all "traces" of trace_userlocks, because userlocks were removed
in PG 8.2.
2011-10-13 19:59:57 -04:00
Bruce Momjian fb4340c5ea Update documentation about ts_rank(). 2011-10-13 14:17:20 -04:00
Bruce Momjian 12ff9fa771 Have pg_ctl return an exit status of 3 if the server is not running, to
match the Linux Standard Base Core Specification 3.1.

Aaron W. Swenson
2011-10-13 13:02:36 -04:00
Tom Lane de1bf53a25 Fix typo in dummy_seclabel documentation.
dummy_label -> dummy_seclabel

Thom Brown
2011-10-13 12:16:07 -04:00
Bruce Momjian cf72528e87 Document who can drop a table (owner and user with permissions). 2011-10-13 10:05:54 -04:00