Commit Graph

12311 Commits

Author SHA1 Message Date
Robert Haas 7aea8e4f2d Determine whether it's safe to attempt a parallel plan for a query.
Commit 924bcf4f16 introduced a framework
for parallel computation in PostgreSQL that makes most but not all
built-in functions safe to execute in parallel mode.  In order to have
parallel query, we'll need to be able to determine whether that query
contains functions (either built-in or user-defined) that cannot be
safely executed in parallel mode.  This requires those functions to be
labeled, so this patch introduces an infrastructure for that.  Some
functions currently labeled as safe may need to be revised depending on
how pending issues related to heavyweight locking under paralllelism
are resolved.

Parallel plans can't be used except for the case where the query will
run to completion.  If portal execution were suspended, the parallel
mode restrictions would need to remain in effect during that time, but
that might make other queries fail.  Therefore, this patch introduces
a framework that enables consideration of parallel plans only when it
is known that the plan will be run to completion.  This probably needs
some refinement; for example, at bind time, we do not know whether a
query run via the extended protocol will be execution to completion or
run with a limited fetch count.  Having the client indicate its
intentions at bind time would constitute a wire protocol break.  Some
contexts in which parallel mode would be safe are not adjusted by this
patch; the default is not to try parallel plans except from call sites
that have been updated to say that such plans are OK.

This commit doesn't introduce any parallel paths or plans; it just
provides a way to determine whether they could potentially be used.
I'm committing it on the theory that the remaining parallel sequential
scan patches will also get committed to this release, hopefully in the
not-too-distant future.

Robert Haas and Amit Kapila.  Reviewed (in earlier versions) by Noah
Misch.
2015-09-16 15:38:47 -04:00
Tom Lane d0f18cde7e Fix documentation of regular expression character-entry escapes.
The docs claimed that \uhhhh would be interpreted as a Unicode value
regardless of the database encoding, but it's never been implemented
that way: \uhhhh and \xhhhh actually mean exactly the same thing, namely
the character that pg_mb2wchar translates to 0xhhhh.  Moreover we were
falsely dismissive of the usefulness of Unicode code points above FFFF.
Fix that.

It's been like this for ages, so back-patch to all supported branches.
2015-09-16 14:50:12 -04:00
Teodor Sigaev 1def9063ca pgbench progress with timestamp
This patch adds an option to replace the "time since pgbench run
started" with a Unix epoch timestamp in the progress report so that,
for instance, it is easier to compare timelines with pgsql log

Fabien COELHO <coelho@cri.ensmp.fr>
2015-09-16 17:24:53 +03:00
Stephen Frost 6820094d1a Add POLICY to COMMENT documentation
COMMENT supports POLICY but the documentation hadn't caught up with
that fact.

Patch by Charles Clavadetscher

Back-patch to 9.5 where POLICY was added.
2015-09-15 10:56:29 -04:00
Teodor Sigaev d02426029b Check existency of table/schema for -t/-n option (pg_dump/pg_restore)
Patch provides command line option --strict-names which requires that at
least one table/schema should present for each -t/-n option.

Pavel Stehule <pavel.stehule@gmail.com>
2015-09-14 16:19:49 +03:00
Peter Eisentraut c193b8ca9d doc: Remove dead links
The web pages of Andy Dong at Berkeley don't exist anymore, and he is no
longer there.
2015-09-12 23:49:11 -04:00
Stephen Frost e7bf508e6b Fix typo in create_policy.sgml
WTIH -> WITH

Pointed out by Dmitriy Olshevskiy

Backpatch to 9.5 where create_policy.sgml was added.
2015-09-12 17:17:00 -04:00
Fujii Masao a1b2888517 Correct description of PageHeaderData layout in documentation
Back-patch to 9.3 where PageHeaderData layout was changed.

Michael Paquier
2015-09-11 13:02:15 +09:00
Peter Eisentraut 103ef20211 doc: Spell checking 2015-09-10 21:35:06 -04:00
Alvaro Herrera 1aba62ec63 Allow per-tablespace effective_io_concurrency
Per discussion, nowadays it is possible to have tablespaces that have
wildly different I/O characteristics from others.  Setting different
effective_io_concurrency parameters for those has been measured to
improve performance.

Author: Julien Rouhaud
Reviewed by: Andres Freund
2015-09-08 12:51:42 -03:00
Alvaro Herrera 49124613f1 contrib/sslinfo: add ssl_extension_info SRF
This new function provides information about SSL extensions present in
the X509 certificate used for the current connection.

Extension version updated to version 1.1.

Author: Дмитрий Воронин (Dmitry Voronin)
Reviewed by: Michael Paquier, Heikki Linnakangas, Álvaro Herrera
2015-09-07 21:24:17 -03:00
Jeff Davis f828654e10 Add log_line_prefix option 'n' for Unix epoch.
Prints time as Unix epoch with milliseconds.

Tomas Vondra, reviewed by Fabien Coelho.
2015-09-07 13:46:31 -07:00
Teodor Sigaev a1c44e1af6 Update site address of Snowball project 2015-09-07 15:20:45 +03:00
Andres Freund c314ead5be Add ability to reserve WAL upon slot creation via replication protocol.
Since 6fcd885 it is possible to immediately reserve WAL when creating a
slot via pg_create_physical_replication_slot(). Extend the replication
protocol to allow that as well.

Although, in contrast to the SQL interface, it is possible to update the
reserved location via the replication interface, it is still useful
being able to reserve upon creation there. Otherwise the logic in
ReplicationSlotReserveWal() has to be repeated in slot employing
clients.

Author: Michael Paquier
Discussion: CAB7nPqT0Wc1W5mdYGeJ_wbutbwNN+3qgrFR64avXaQCiJMGaYA@mail.gmail.com
2015-09-06 13:30:57 +02:00
Tom Lane 0426f349ef Rearrange the handling of error context reports.
Remove the code in plpgsql that suppressed the innermost line of CONTEXT
for messages emitted by RAISE commands.  That was never more than a quick
backwards-compatibility hack, and it's pretty silly in cases where the
RAISE is nested in several levels of function.  What's more, it violated
our design theory that verbosity of error reports should be controlled
on the client side not the server side.

To alleviate the resulting noise increase, introduce a feature in libpq
and psql whereby the CONTEXT field of messages can be suppressed, either
always or only for non-error messages.  Printing CONTEXT for errors only
is now their default behavior.

The actual code changes here are pretty small, but the effects on the
regression test outputs are widespread.  I had to edit some of the
alternative expected outputs by hand; hopefully the buildfarm will soon
find anything I fat-fingered.

In passing, fix up (again) the output line counts in psql's various
help displays.  Add some commentary about how to verify them.

Pavel Stehule, reviewed by Petr Jelínek, Jeevan Chalke, and others
2015-09-05 11:58:33 -04:00
Heikki Linnakangas c80b5f66c6 Fix misc typos.
Oskari Saarenmaa. Backpatch to stable branches where applicable.
2015-09-05 11:35:49 +03:00
Fujii Masao 1ea5ce5c5f Document that max_worker_processes must be high enough in standby.
The setting values of some parameters including max_worker_processes
must be equal to or higher than the values on the master. However,
previously max_worker_processes was not listed as such parameter
in the document. So this commit adds it to that list.

Back-patch to 9.4 where max_worker_processes was added.
2015-09-03 22:30:16 +09:00
Tom Lane 075ab425bd Document that PL/Python now returns floats using repr() not str().
Commit 1ce7a57ca neglected to update the user-facing documentation,
which described the old behavior precisely.
2015-09-01 19:25:58 -04:00
Bruce Momjian 46bd95e2a8 pg_upgrade docs: clarify rsync and move verification step
These are adjustments based on someone using the new standby upgrade
steps.

Report by Andy Colson

Backpatch through 9.5
2015-09-01 16:42:43 -04:00
Alvaro Herrera 9646d2fd62 Use <substeps> in pg_upgrade's procedure
For clarity, so that the substeps are not numbered identically to the
outer procedure's steps.

Per report from Andy Colson in
http://www.postgresql.org/message-id/55D789B5.7040308@squeakycode.net
2015-09-01 14:58:28 -03:00
Bruce Momjian 049a7799df docs: remove outdated note about unique indexes
Patch by Josh Kupershmidt

Backpatch through 9.5
2015-08-31 17:05:23 -04:00
Magnus Hagander 93370076c4 Small grammar fix
Josh Kupershmidt
2015-08-31 14:07:17 +02:00
Bruce Momjian 119cf760d0 dblink docs: fix typo to use "connname" (3 n's), not "conname"
This makes the parameter names match the documented prototype names.

Report by Erwin Brandstetter

Backpatch through 9.0
2015-08-27 13:43:10 -04:00
Bruce Momjian 16d4f94e67 release notes: abbreviated key speedup only for varchar/text
Report by Peter Geoghegan

Backpatch through 9.5
2015-08-26 14:46:48 -04:00
Bruce Momjian 8190f2dfef 9.5 release notes: mention lack of char() sort improvements
Report by Peter Geoghegan

Backpatch through 9.5
2015-08-26 10:33:02 -04:00
Tom Lane 94324abfb9 Docs: be explicit about datatype matching for lead/lag functions.
The default argument, if given, has to be of exactly the same datatype
as the first argument; but this was not stated in so many words, and
the error message you get about it might not lead your thought in the
right direction.  Per bug #13587 from Robert McGehee.

A quick scan says that these are the only two built-in functions with two
anyelement arguments and no other polymorphic arguments.  There are plenty
of cases of, eg, anyarray and anyelement, but those seem less likely to
confuse.  For instance this doesn't seem terribly hard to figure out:
"function array_remove(integer[], numeric) does not exist".  So I've
contented myself with fixing these two cases.
2015-08-25 19:11:17 -04:00
Peter Eisentraut 90a1d0aa76 doc: Whitespace and formatting fixes 2015-08-20 22:47:08 -04:00
Tom Lane a93545e13f Remove xpath namespace-handling change from 9.5 release notes.
Although commit 79af9a1d2 was initially applied to HEAD only, we later
back-patched the change into all branches (commits 6bbf75192 et al).
So it's not a new behavior in 9.5 and should not be release-noted here.
2015-08-20 12:28:15 -04:00
Andres Freund 47ebbdcee7 docs: Fix "typo" introduced in 3f811c2d.
Reported-By: Michael Paquier
Discussion: CAB7nPqSco+RFw9C-VgbCpyurQB3OocS-fuTOa_gFnUy1EE-pyQ@mail.gmail.com
2015-08-17 11:51:52 +02:00
Tom Lane 522400a519 Add docs about postgres_fdw's setting of search_path and other GUCs.
This behavior wasn't documented, but it should be because it's user-visible
in triggers and other functions executed on the remote server.
Per question from Adam Fuchs.

Back-patch to 9.3 where postgres_fdw was added.
2015-08-15 14:31:04 -04:00
Tom Lane 5869cbfef4 Improve documentation about MVCC-unsafe utility commands.
The table-rewriting forms of ALTER TABLE are MVCC-unsafe, in much the same
way as TRUNCATE, because they replace all rows of the table with newly-made
rows with a new xmin.  (Ideally, concurrent transactions with old snapshots
would continue to see the old table contents, but the data is not there
anymore --- and if it were there, it would be inconsistent with the table's
updated rowtype, so there would be serious implementation problems to fix.)
This was nowhere documented though, and the problem was only documented for
TRUNCATE in a note in the TRUNCATE reference page.  Create a new "Caveats"
section in the MVCC chapter that can be home to this and other limitations
on serializable consistency.

In passing, fix a mistaken statement that VACUUM and CLUSTER would reclaim
space occupied by a dropped column.  They don't reconstruct existing tuples
so they couldn't do that.

Back-patch to all supported branches.
2015-08-15 13:30:16 -04:00
Peter Eisentraut 845405a7d8 Update key words table for 9.5 2015-08-14 12:11:05 -04:00
Simon Riggs 47167b7907 Reduce lock levels for ALTER TABLE SET autovacuum storage options
Reduce lock levels down to ShareUpdateExclusiveLock for all autovacuum-related
relation options when setting them using ALTER TABLE.

Add infrastructure to allow varying lock levels for relation options in later
patches. Setting multiple options together uses the highest lock level required
for any option. Works for both main and toast tables.

Fabrízio Mello, reviewed by Michael Paquier, mild edit and additional regression
tests from myself
2015-08-14 14:19:28 +01:00
Tom Lane 750fc78bca Fix broken markup, and copy-edit a bit.
Fix docs build failure introduced by commit 6fcd88511f.
I failed to resist the temptation to rearrange the description of
pg_create_physical_replication_slot(), too.
2015-08-11 10:46:51 -04:00
Andres Freund 6fcd88511f Allow pg_create_physical_replication_slot() to reserve WAL.
When creating a physical slot it's often useful to immediately reserve
the current WAL position instead of only doing after the first feedback
message arrives. That e.g. allows slots to guarantee that all the WAL
for a base backup will be available afterwards.

Logical slots already have to reserve WAL during creation, so generalize
that logic into being usable for both physical and logical slots.

Catversion bump because of the new parameter.

Author: Gurjeet Singh
Reviewed-By: Andres Freund
Discussion: CABwTF4Wh_dBCzTU=49pFXR6coR4NW1ynb+vBqT+Po=7fuq5iCw@mail.gmail.com
2015-08-11 12:34:31 +02:00
Andres Freund 3f811c2d6f Add confirmed_flush column to pg_replication_slots.
There's no reason not to expose both restart_lsn and confirmed_flush
since they have rather distinct meanings. The former is the oldest WAL
still required and valid for both physical and logical slots, whereas
the latter is the location up to which a logical slot's consumer has
confirmed receiving data. Most of the time a slot will require older
WAL (i.e. restart_lsn) than the confirmed
position (i.e. confirmed_flush_lsn).

Author: Marko Tiikkaja, editorialized by me
Discussion: 559D110B.1020109@joh.to
2015-08-10 13:28:18 +02:00
Andres Freund 70fd0e14e8 Don't start to stream after pg_receivexlog --create-slot.
Immediately starting to stream after --create-slot is inconvenient in a
number of situations (e.g. when configuring a slot for use in
recovery.conf) and it's easy to just call pg_receivexlog twice in the
rest of the cases.

Author: Michael Paquier
Discussion: CAB7nPqQ9qEtuDiKY3OpNzHcz5iUA+DUX9FcN9K8GUkCZvG7+Ew@mail.gmail.com
Backpatch: 9.5, where the option was introduced
2015-08-10 13:28:18 +02:00
Tom Lane 1e3e1ae266 Remove gram.y's precedence declaration for OVERLAPS.
The allowed syntax for OVERLAPS, viz "row OVERLAPS row", is sufficiently
constrained that we don't actually need a precedence declaration for
OVERLAPS; indeed removing this declaration does not change the generated
gram.c file at all.  Let's remove it to avoid confusion about whether
OVERLAPS has precedence or not.  If we ever generalize what we allow for
OVERLAPS, we might need to put back a precedence declaration for it,
but we might want some other level than what it has today --- and leaving
the declaration there would just risk confusion about whether that would
be an incompatible change.

Likewise, remove OVERLAPS from the documentation's precedence table.

Per discussion with Noah Misch.  Back-patch to 9.5 where we hacked up some
nearby precedence decisions.
2015-08-09 19:01:04 -04:00
Magnus Hagander 2a330d551c Fix typo in LDAP example
Reported by William Meitzen
2015-08-09 14:49:47 +02:00
Bruce Momjian 08c6178aa4 docs: fix typo in rules.sgml
Report by Dean Rasheed

Patch by Dean Rasheed

Backpatch through 9.5
2015-08-08 20:40:53 -04:00
Bruce Momjian 03249fe2c1 9.5 release notes: add increase buffer mapping partitions item
Report by Robert Haas, Andres Freund

Backpatch through 9.5
2015-08-08 13:38:31 -04:00
Andres Freund 18e8613564 Address points made in post-commit review of replication origins.
Amit reviewed the replication origins patch and made some good
points. Address them. This fixes typos in error messages, docs and
comments and adds a missing error check (although in a
should-never-happen scenario).

Discussion: CAA4eK1JqUBVeWWKwUmBPryFaje4190ug0y-OAUHWQ6tD83V4xg@mail.gmail.com
Backpatch: 9.5, where replication origins were introduced.
2015-08-07 15:09:05 +02:00
Bruce Momjian d6a8c943ab 9.5 release notes: updates from Andres Freund and Jeff Janes
Report by Andres Freund and Jeff Janes

Backpatch through 9.5
2015-08-06 22:33:44 -04:00
Bruce Momjian 58e09b9024 9.5 release notes: mention ON CONFLICT DO NOTHING for FDWs
Report by Peter Geoghegan

Backpatch through 9.5
2015-08-06 21:08:22 -04:00
Bruce Momjian c9351f03f3 9.5 release notes: mention change to CRC-32C
Report by Andres Freund

Backpatch through 9.5
2015-08-06 18:03:39 -04:00
Bruce Momjian c4318c4065 9.5 release notes: adjustments suggested by Andres Freund
Report by Andres Freund

Backpatch through 9.5
2015-08-06 17:34:38 -04:00
Bruce Momjian 68b5163b45 9.5 release notes: add non-LEAKPROOF view pushdown mention
Report by Dean Rasheed

Backpatch through 9.5
2015-08-06 16:07:33 -04:00
Bruce Momjian e641d7b22f docs: HTML-escape '>' in '=>' using HTML entities 2015-08-05 23:03:45 -04:00
Tom Lane 1b5d34ca62 Docs: add an explicit example about controlling overall greediness of REs.
Per discussion of bug #13538.
2015-08-04 21:09:12 -04:00
Tom Lane ecc2d16bc9 Update 9.5 release notes through today. 2015-08-03 12:29:23 -04:00