Commit Graph

11841 Commits

Author SHA1 Message Date
Tom Lane d5bea1fbcc Stamp 9.4rc1. 2014-11-17 15:54:40 -05:00
Tom Lane c7b412380d Update 9.4 release notes for commits through today. 2014-11-17 14:47:13 -05:00
Magnus Hagander e668b36630 Mention the TZ environment variable for initdb
Daniel Gustafsson
2014-11-16 15:48:30 +01:00
Magnus Hagander 6d301af4c0 Fix duplicated platforms due to copy/paste error
Patch from Michael Paquier, mistake spotted by KOIZUMI Satoru
2014-11-16 15:47:10 +01:00
Tom Lane df3e23e1b5 Document evaluation-order considerations for aggregate functions.
The SELECT reference page didn't really address the question of when
aggregate function evaluation occurs, nor did the "expression evaluation
rules" documentation mention that CASE can't be used to control whether
an aggregate gets evaluated or not.  Improve that.

Per discussion of bug #11661.  Original text by Marti Raudsepp and Michael
Paquier, rewritten significantly by me.
2014-11-14 17:19:42 -05:00
Stephen Frost 2113f7215d Revert change to ALTER TABLESPACE summary.
When ALTER TABLESPACE MOVE ALL was changed to be ALTER TABLE ALL IN
TABLESPACE, the ALTER TABLESPACE summary should have been adjusted back
to its original definition.

Patch by Thom Brown (thanks!).
2014-11-14 15:18:04 -05:00
Alvaro Herrera 955b4ba7f6 Tweak row-level locking documentation
Move the meat of locking levels to mvcc.sgml, leaving only a link to it
in the SELECT reference page.

Michael Paquier, with some tweaks by Álvaro
2014-11-13 14:45:58 -03:00
Peter Eisentraut a3408059dd doc: Add index entry for "hypothetical-set aggregate" 2014-11-13 11:57:33 -05:00
Peter Eisentraut 342bcee4aa doc: Update pg_receivexlog note
The old note about how to use pg_receivexlog as an alternative to
archive_command was obsoleted by replication slots.
2014-11-07 20:16:41 -05:00
Peter Eisentraut 63ff971e06 doc: Move misplaced paragraph 2014-11-04 16:13:38 -05:00
Tom Lane 21495a2bb7 Docs: fix incorrect spelling of contrib/pgcrypto option.
pgp_sym_encrypt's option is spelled "sess-key", not "enable-session-key".
Spotted by Jeff Janes.

In passing, improve a comment in pgp-pgsql.c to make it clearer that
the debugging options are intentionally undocumented.
2014-11-03 11:11:43 -05:00
Peter Eisentraut 25ca2a69ea Fix generation of INSTALL file by removing link 2014-11-02 20:18:15 -05:00
Peter Eisentraut 16381b2a78 Add configure --enable-tap-tests option
Don't skip the TAP tests anymore when IPC::Run is not found.  This will
fail normally now.
2014-11-02 09:17:49 -05:00
Peter Eisentraut 4ffa8806ee PL/Python: Fix example
Revert "6f6b46c9c0ca3d96acbebc5499c32ee6369e1eec", which was broken.

Reported-by: Jonathan Rogers <jrogers@socialserve.com>
2014-11-01 11:33:30 -04:00
Peter Eisentraut f41ed7b66a doc: Fix typos
per Andres Freund
2014-10-31 08:11:49 -04:00
Peter Eisentraut 1414868d08 doc: Wording and formatting improvements in new logical decoding docs 2014-10-30 22:52:21 -04:00
Peter Eisentraut 7dacab9769 doc: Improve CREATE VIEW / WITH documentation
Similar to 590eb0c14e, remove the options
list from the synopsis and elaborate in the main description.
2014-10-30 22:50:02 -04:00
Robert Haas 89fbe97fca Add missing equals signs to pg_recvlogical documentation.
Michael Paquier
2014-10-27 11:08:31 -04:00
Peter Eisentraut 5c8758e6ed doc: Clean up pg_recvlogical reference page
This needed a general cleanup of wording, typos, outdated terminology,
formatting, and hard-to-understand and borderline incorrect information.

Also tweak the pg_receivexlog page a bit to make the two more
consistent.
2014-10-18 09:26:49 -04:00
Tom Lane 4b3b44b141 Support timezone abbreviations that sometimes change.
Up to now, PG has assumed that any given timezone abbreviation (such as
"EDT") represents a constant GMT offset in the usage of any particular
region; we had a way to configure what that offset was, but not for it
to be changeable over time.  But, as with most things horological, this
view of the world is too simplistic: there are numerous regions that have
at one time or another switched to a different GMT offset but kept using
the same timezone abbreviation.  Almost the entire Russian Federation did
that a few years ago, and later this month they're going to do it again.
And there are similar examples all over the world.

To cope with this, invent the notion of a "dynamic timezone abbreviation",
which is one that is referenced to a particular underlying timezone
(as defined in the IANA timezone database) and means whatever it currently
means in that zone.  For zones that use or have used daylight-savings time,
the standard and DST abbreviations continue to have the property that you
can specify standard or DST time and get that time offset whether or not
DST was theoretically in effect at the time.  However, the abbreviations
mean what they meant at the time in question (or most recently before that
time) rather than being absolutely fixed.

The standard abbreviation-list files have been changed to use this behavior
for abbreviations that have actually varied in meaning since 1970.  The
old simple-numeric definitions are kept for abbreviations that have not
changed, since they are a bit faster to resolve.

While this is clearly a new feature, it seems necessary to back-patch it
into all active branches, because otherwise use of Russian zone
abbreviations is going to become even more problematic than it already was.
This change supersedes the changes in commit 513d06ded et al to modify the
fixed meanings of the Russian abbreviations; since we've not shipped that
yet, this will avoid an undesirably incompatible (not to mention incorrect)
change in behavior for timestamps between 2011 and 2014.

This patch makes some cosmetic changes in ecpglib to keep its usage of
datetime lookup tables as similar as possible to the backend code, but
doesn't do anything about the increasingly obsolete set of timezone
abbreviation definitions that are hard-wired into ecpglib.  Whatever we
do about that will likely not be appropriate material for back-patching.
Also, a potential free() of a garbage pointer after an out-of-memory
failure in ecpglib has been fixed.

This patch also fixes pre-existing bugs in DetermineTimeZoneOffset() that
caused it to produce unexpected results near a timezone transition, if
both the "before" and "after" states are marked as standard time.  We'd
only ever thought about or tested transitions between standard and DST
time, but that's not what's happening when a zone simply redefines their
base GMT offset.

In passing, update the SGML documentation to refer to the Olson/zoneinfo/
zic timezone database as the "IANA" database, since it's now being
maintained under the auspices of IANA.
2014-10-16 15:22:13 -04:00
Tom Lane 9bb6b7c5ed Print planning time only in EXPLAIN ANALYZE, not plain EXPLAIN.
We've gotten enough push-back on that change to make it clear that it
wasn't an especially good idea to do it like that.  Revert plain EXPLAIN
to its previous behavior, but keep the extra output in EXPLAIN ANALYZE.
Per discussion.

Internally, I set this up as a separate flag ExplainState.summary that
controls printing of planning time and execution time.  For now it's
just copied from the ANALYZE option, but we could consider exposing it
to users.
2014-10-15 18:50:16 -04:00
Heikki Linnakangas 79ec6e399f Fix typo in docs.
Shigeru Hanada
2014-10-14 09:48:45 +03:00
Peter Eisentraut 590eb0c14e doc: Improve ALTER VIEW / SET documentation
The way the ALTER VIEW / SET options were listed in the synopsis was
very confusing.  Move the list to the main description, similar to how
the ALTER TABLE reference page does it.
2014-10-13 22:18:27 -04:00
Peter Eisentraut 44992e6837 doc: Fix copy-and-paste mistakes 2014-10-13 22:10:01 -04:00
Tom Lane 308ab77b89 Improve documentation about JSONB array containment behavior.
Per gripe from Josh Berkus.
2014-10-11 14:30:05 -04:00
Fujii Masao a0c58b5522 Fix broken example in PL/pgSQL document.
Back-patch to all supported branches.

Marti Raudsepp, per a report from Marko Tiikkaja
2014-10-10 03:18:48 +09:00
Tom Lane abc1a8e509 Stamp 9.4beta3. 2014-10-06 14:32:17 -04:00
Andres Freund 0cd7004774 Rename pg_recvlogical's --create/--drop to --create-slot/--drop-slot.
A future patch (9.5 only) adds slot management to pg_receivexlog. The
verbs create/drop don't seem descriptive enough there. It seems better
to rename pg_recvlogical's commands now, in beta, than live with the
inconsistency forever.

The old form (e.g. --drop) will still be accepted by virtue of most
getopt_long() options accepting abbreviations for long commands.

Backpatch to 9.4 where pg_recvlogical was introduced.

Author: Michael Paquier and Andres Freund
Discussion: CAB7nPqQtt79U6FmhwvgqJmNyWcVCbbV-nS72j_jyPEopERg9rg@mail.gmail.com
2014-10-06 12:12:09 +02:00
Tom Lane 0e7cb5fbd2 Update 9.4 release notes for commits through today.
Add entries for recent changes, including noting the JSONB format change
and the recent timezone data changes.  We should remove those two items
before 9.4 final: the JSONB change will be of no interest in the long
run, and it's not normally our habit to mention timezone updates in
major-release notes.  But it seems important to document them temporarily
for beta testers.

I failed to resist the temptation to wordsmith a couple of existing
entries, too.
2014-10-05 14:14:07 -04:00
Alvaro Herrera 23a8cae6bc Don't balance vacuum cost delay when per-table settings are in effect
When there are cost-delay-related storage options set for a table,
trying to make that table participate in the autovacuum cost-limit
balancing algorithm produces undesirable results: instead of using the
configured values, the global values are always used,
as illustrated by Mark Kirkwood in
http://www.postgresql.org/message-id/52FACF15.8020507@catalyst.net.nz

Since the mechanism is already complicated, just disable it for those
cases rather than trying to make it cope.  There are undesirable
side-effects from this too, namely that the total I/O impact on the
system will be higher whenever such tables are vacuumed.  However, this
is seen as less harmful than slowing down vacuum, because that would
cause bloat to accumulate.  Anyway, in the new system it is possible to
tweak options to get the precise behavior one wants, whereas with the
previous system one was simply hosed.

This has been broken forever, so backpatch to all supported branches.
This might affect systems where cost_limit and cost_delay have been set
for individual tables.
2014-10-03 13:01:27 -03:00
Andres Freund ce84b0682c Improve documentation about binary/textual output mode for output plugins.
Discussion: CAB7nPqQrqFzjqCjxu4GZzTrD9kpj6HMn9G5aOOMwt1WZ8NfqeA@mail.gmail.com,
    CAB7nPqQXc_+g95zWnqaa=mVQ4d3BVRs6T41frcEYi2ocUrR3+A@mail.gmail.com

Per discussion between Michael Paquier, Robert Haas and Andres Freund

Backpatch to 9.4 where logical decoding was introduced.
2014-10-01 13:21:59 +02:00
Stephen Frost 721a8bb546 Correct stdin/stdout usage in COPY .. PROGRAM
The COPY documentation incorrectly stated, for the PROGRAM case,
that we read from stdin and wrote to stdout.  Fix that, and improve
consistency by referring to the 'PostgreSQL' user instead of the
'postgres' user, as is done in the rest of the COPY documentation.

Pointed out by Peter van Dijk.

Back-patch to 9.3 where COPY .. PROGRAM was introduced.
2014-09-30 16:00:34 -04:00
Tom Lane 47288bd08c Fix failure of contrib/auto_explain to print per-node timing information.
This has been broken since commit af7914c662,
which added the EXPLAIN (TIMING) option.  Although that commit included
updates to auto_explain, they evidently weren't tested very carefully,
because the code failed to print node timings even when it should, due to
failure to set es.timing in the ExplainState struct.  Reported off-list by
Neelakanth Nadgir of Salesforce.

In passing, clean up the documentation for auto_explain's options a
little bit, including re-ordering them into what seems to me a more
logical order.
2014-09-19 13:18:59 -04:00
Heikki Linnakangas 4c054ad18e Fix the return type of GIN triConsistent support functions to "char".
They were marked to return a boolean, but they actually return a
GinTernaryValue, which is more like a "char". It makes no practical
difference, as the triConsistent functions cannot be called directly from
SQL because they have "internal" arguments, but this nevertheless seems
more correct.

Also fix the GinTernaryValue name in the documentation. I renamed the enum
earlier, but neglected the docs.

Alexander Korotkov. This is new in 9.4, so backpatch there.
2014-09-16 09:23:55 +03:00
Fujii Masao 7dfab04a8a Support ALTER SYSTEM RESET command.
This patch allows us to execute ALTER SYSTEM RESET command to
remove the configuration entry from postgresql.auto.conf.

Vik Fearing, reviewed by Amit Kapila and me.
2014-09-12 23:15:04 +09:00
Heikki Linnakangas 8c9dd69fc2 Change the way latency is calculated with pgbench --rate option.
The reported latency values now include the "schedule lag" time, that is,
the time between the transaction's scheduled start time and the time it
actually started. This relates better to a model where requests arrive at a
certain rate, and we are interested in the response time to the end user or
application, rather than the response time of the database itself.

Also, when --rate is used, include the schedule lag time in the log output.

The --rate option is new in 9.4, so backpatch to 9.4. It seems better to
make this change in 9.4, while we're still in the beta period, than ship a
9.4 version that calculates the values differently than 9.5.
2014-09-11 12:57:21 +03:00
Bruce Momjian 1e6ba64080 doc: improve configuration management section
Patch by David Johnston

Backpatch through 9.4
2014-09-10 20:50:15 -04:00
Peter Eisentraut 18af7938c1 doc: Reflect renaming of Mac OS X to OS X
bug #10528
2014-09-09 13:58:50 -04:00
Tom Lane fd66ccf7db Fix psql \s to work with recent libedit, and add pager support.
psql's \s (print command history) doesn't work at all with recent libedit
versions when printing to the terminal, because libedit tries to do an
fchmod() on the target file which will fail if the target is /dev/tty.
(We'd already noted this in the context of the target being /dev/null.)
Even before that, it didn't work pleasantly, because libedit likes to
encode the command history file (to ensure successful reloading), which
renders it nigh unreadable, not to mention significantly different-looking
depending on exactly which libedit version you have.  So let's forget using
write_history() for this purpose, and instead print the data ourselves,
using logic similar to that used to iterate over the history for newline
encoding/decoding purposes.

While we're at it, insert the ability to use the pager when \s is printing
to the terminal.  This has been an acknowledged shortcoming of \s for many
years, so while you could argue it's not exactly a back-patchable bug fix
it still seems like a good improvement.  Anyone who's seriously annoyed
at this can use "\s /dev/tty" or local equivalent to get the old behavior.

Experimentation with this showed that the history iteration logic was
actually rather broken when used with libedit.  It turns out that with
libedit you have to use previous_history() not next_history() to advance
to more recent history entries.  The easiest and most robust fix for this
seems to be to make a run-time test to verify which function to call.
We had not noticed this because libedit doesn't really need the newline
encoding logic: its own encoding ensures that command entries containing
newlines are reloaded correctly (unlike libreadline).  So the effective
behavior with recent libedits was that only the oldest history entry got
newline-encoded or newline-decoded.  However, because of yet other bugs in
history_set_pos(), some old versions of libedit allowed the existing loop
logic to reach entries besides the oldest, which means there may be libedit
~/.psql_history files out there containing encoded newlines in more than
just the oldest entry.  To ensure we can reload such files, it seems
appropriate to back-patch this fix, even though that will result in some
incompatibility with older psql versions (ie, multiline history entries
written by a psql with this fix will look corrupted to a psql without it,
if its libedit is reasonably up to date).

Stepan Rutz and Tom Lane
2014-09-08 16:09:49 -04:00
Tom Lane b1a7c9e387 Documentation fix: sum(float4) returns float4, not float8.
The old claim is from my commit d06ebdb8d3 of
2000-07-17, but it seems to have been a plain old thinko; sum(float4) has
been distinct from sum(float8) since Berkeley days.  Noted by KaiGai Kohei.

While at it, mention the existence of sum(money), which is also of
embarrassingly ancient vintage.
2014-09-07 22:40:51 -04:00
Bruce Momjian 31189e8627 docs: Improve pg_isready details about username/dbname
Report by Erik Rijkers

Backpatch through 9.4
2014-09-06 12:43:11 -04:00
Bruce Momjian f9c0434ee3 Properly document that -r is only honored from the command-line.
This is for postgres/postmaster options.

Report by Tom Lane

Backpatch through 9.4
2014-09-06 11:10:51 -04:00
Bruce Momjian a6d9b331aa Clarify documentation about "peer" rows in window functions
Peer rows are matching rows when ORDER BY is specified.

Report by arnaud.mouronval@gmail.com, David G Johnston

Backpatch through 9.4
2014-09-05 19:01:26 -04:00
Peter Eisentraut ffb16cf29f doc: Remove dead link
The link to the NIST web page about DES standards leads to nowhere, and
according to archive.org has been forwarded to an unrelated page for
many years.  Therefore, just remove that link.  More up to date
information can be found via Wikipedia, for example.
2014-09-04 14:13:23 -04:00
Fujii Masao 643cad1934 docs: Improve documentation of \pset without arguments.
The syntax summary previously failed to clarify that the first
argument is also optional.  The textual description did mention it,
but all the way at the bottom.  It fits better with the command
overview, so move it there, and fix the summary also.

Back-patch to 9.4 where \pset without arguments was supported.

Dilip Kumar, reviewed by Fabien Coelho
2014-09-04 13:48:09 +09:00
Bruce Momjian 42c73ef9b7 Update URL reference material in /contrib/isn docs
Report by Peter Eisentraut
2014-09-03 17:22:20 -04:00
Bruce Momjian 646deb603e Document use of partial indexes for partial unique constraints
Report by Tomáš Greif

Backpatch through 9.4
2014-09-03 14:34:46 -04:00
Kevin Grittner ae70b9f0ec doc: Various typo/grammar fixes
Errors detected using Topy (https://github.com/intgr/topy), all
changes verified by hand and some manual tweaks added.

Marti Raudsepp

Individual changes backpatched, where applicable, as far as 9.0.
2014-08-30 11:01:47 -05:00
Bruce Momjian f08b5e7577 pg_is_xlog_replay_paused(): remove super-user-only restriction
Also update docs to mention which function are super-user-only.

Report by sys-milan@statpro.com

Backpatch through 9.4
2014-08-29 09:05:40 -04:00
Peter Eisentraut f41381e240 doc: Revert ALTER TABLESPACE summary line
It was changed when ALTER TABLESPACE / MOVE was added but then not
updated when that was moved back out.
2014-08-28 23:59:03 -04:00