Commit Graph

12260 Commits

Author SHA1 Message Date
Tom Lane 30ffdd24d7 Stamp 9.4.26. 2020-02-10 17:25:31 -05:00
Tom Lane f6117744d1 Last-minute updates for release notes.
Security: CVE-2020-1720
2020-02-10 12:51:07 -05:00
Tom Lane dbae284f31 Release notes for 12.2, 11.7, 10.12, 9.6.17, 9.5.21, 9.4.26. 2020-02-09 14:14:19 -05:00
Fujii Masao bf18402551 Add note about access permission checks by inherited TRUNCATE and LOCK TABLE.
Inherited queries perform access permission checks on the parent
table only. But there are two exceptions to this rule in v12 or before;
TRUNCATE and LOCK TABLE commands through a parent table check
the permissions on not only the parent table but also the children
tables. Previously these exceptions were not documented.

This commit adds the note about these exceptions, into the document.

Back-patch to v9.4. But we don't apply this commit to the master
because commit e6f1e560e4 already got rid of the exception about
inherited TRUNCATE and upcoming commit will do for the exception
about inherited LOCK TABLE.

Author: Amit Langote
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/CA+HiwqHfTnMU6SUkyHxCmpHUKk7ERLHCR3vZVq19ZOQBjPBLmQ@mail.gmail.com
2020-02-07 00:45:38 +09:00
Michael Paquier d76652edc5 Fix concurrent indexing operations with temporary tables
Attempting to use CREATE INDEX, DROP INDEX or REINDEX with CONCURRENTLY
on a temporary relation with ON COMMIT actions triggered unexpected
errors because those operations use multiple transactions internally to
complete their work.  Here is for example one confusing error when using
ON COMMIT DELETE ROWS:
ERROR:  index "foo" already contains data

Issues related to temporary relations and concurrent indexing are fixed
in this commit by enforcing the non-concurrent path to be taken for
temporary relations even if using CONCURRENTLY, transparently to the
user.  Using a non-concurrent path does not matter in practice as locks
cannot be taken on a temporary relation by a session different than the
one owning the relation, and the non-concurrent operation is more
effective.

The problem exists with REINDEX since v12 with the introduction of
CONCURRENTLY, and with CREATE/DROP INDEX since CONCURRENTLY exists for
those commands.  In all supported versions, this caused only confusing
error messages to be generated.  Note that with REINDEX, it was also
possible to issue a REINDEX CONCURRENTLY for a temporary relation owned
by a different session, leading to a server crash.

The idea to enforce transparently the non-concurrent code path for
temporary relations comes originally from Andres Freund.

Reported-by: Manuel Rigger
Author: Michael Paquier, Heikki Linnakangas
Reviewed-by: Andres Freund, Álvaro Herrera, Heikki Linnakangas
Discussion: https://postgr.es/m/CA+u7OA6gP7YAeCguyseusYcc=uR8+ypjCcgDDCTzjQ+k6S9ksQ@mail.gmail.com
Backpatch-through: 9.4
2020-01-22 09:49:48 +09:00
Michael Paquier 27676e22d3 doc: Fix naming of SELinux
Reported-by: Tham Nguyen
Discussion: https://postgr.es/m/157851402876.29175.12977878383183540468@wrigleys.postgresql.org
Backpatch-through: 9.4
2020-01-10 09:37:44 +09:00
Bruce Momjian ce758a3d75 Update copyrights for 2020
Backpatch-through: update all files in master, backpatch legal files through 9.4
2020-01-01 12:21:44 -05:00
Bruce Momjian 645694731c doc: add examples of creative use of unique expression indexes
Unique expression indexes can constrain data in creative ways, so show
two examples.

Reported-by: Tuomas Leikola

Discussion: https://postgr.es/m/156760275564.1127.12321702656456074572@wrigleys.postgresql.org

Backpatch-through: 9.4
2019-12-27 14:49:08 -05:00
Bruce Momjian 820b1d1a48 docs: clarify infinite range values from data-type infinities
The previous docs referenced these distinct ideas confusingly.

Reported-by: Eugen Konkov

Discussion: https://postgr.es/m/376945611.20191026161529@yandex.ru

Backpatch-through: 9.4
2019-12-27 14:33:30 -05:00
Bruce Momjian 530b5d53f6 docs: clarify handling of column lists in COPY TO/FROM
Previously it was unclear how COPY FROM handled cases where not all
columns were specified, or if the order didn't match.

Reported-by: pavlo.golub@gmail.com

Discussion: https://postgr.es/m/157487729344.7213.14245726713444755296@wrigleys.postgresql.org

Backpatch-through: 9.4
2019-12-21 12:44:38 -05:00
Tom Lane 875c7d70de libpq should expose GSS-related parameters even when not implemented.
We realized years ago that it's better for libpq to accept all
connection parameters syntactically, even if some are ignored or
restricted due to lack of the feature in a particular build.
However, that lesson from the SSL support was for some reason never
applied to the GSSAPI support.  This is causing various buildfarm
members to have problems with a test case added by commit 6136e94dc,
and it's just a bad idea from a user-experience standpoint anyway,
so fix it.

While at it, fix some places where parameter-related infrastructure
was added with the aid of a dartboard, or perhaps with the aid of
the anti-pattern "add new stuff at the end".  It should be safe
to rearrange the contents of struct pg_conn even in released
branches, since that's private to libpq (and we'd have to move
some fields in some builds to fix this, anyway).

Back-patch to all supported branches.

Discussion: https://postgr.es/m/11297.1576868677@sss.pgh.pa.us
2019-12-20 15:34:08 -05:00
Tom Lane 3ddd8ee716 Doc: back-patch documentation about limitations of CHECK constraints.
Back-patch commits 36d442a25 and 1f66c657f into all supported
branches.  I'd considered doing this when putting in the latter
commit, but failed to pull the trigger.  Now that we've had an
actual field complaint about the lack of such docs, let's do it.

Per bug #16158 from Piotr Jander.  Original patches by Lætitia Avrot,
Patrick Francelle, and me.

Discussion: https://postgr.es/m/16158-7ccf2f74b3d655db@postgresql.org
2019-12-11 15:53:36 -05:00
Noah Misch 08395e592c Document search_path security with untrusted dbowner or CREATEROLE.
Commit 5770172cb0 wrote, incorrectly, that
certain schema usage patterns are secure against CREATEROLE users and
database owners.  When an untrusted user is the database owner or holds
CREATEROLE privilege, a query is secure only if its session started with
SELECT pg_catalog.set_config('search_path', '', false) or equivalent.
Back-patch to 9.4 (all supported versions).

Discussion: https://postgr.es/m/20191013013512.GC4131753@rfd.leadboat.com
2019-12-08 11:06:31 -08:00
Magnus Hagander d81d4c36ac Remove incorrect markup
Author: Daniel Gustafsson <daniel@yesql.se>
2019-11-20 17:06:06 +01:00
Tom Lane 6e8516ef6c Doc: clarify use of RECURSIVE in WITH.
Apparently some people misinterpreted the syntax as being that
RECURSIVE is a prefix of individual WITH queries.  It's a modifier
for the WITH clause as a whole, so state that more clearly.

Discussion: https://postgr.es/m/ca53c6ce-a0c6-b14a-a8e3-162f0b2cc119@a-kretschmer.de
2019-11-19 14:43:37 -05:00
Tom Lane e5df9bb017 Doc: clarify behavior of ALTER DEFAULT PRIVILEGES ... IN SCHEMA.
The existing text stated that "Default privileges that are specified
per-schema are added to whatever the global default privileges are for
the particular object type".  However, that bare-bones observation is
not quite clear enough, as demonstrated by the complaint in bug #16124.
Flesh it out by stating explicitly that you can't revoke built-in
default privileges this way, and by providing an example to drive
the point home.

Back-patch to all supported branches, since it's been like this
from the beginning.

Discussion: https://postgr.es/m/16124-423d8ee4358421bc@postgresql.org
2019-11-19 14:21:42 -05:00
Tom Lane 6cd1549235 Stamp 9.4.25. 2019-11-11 17:13:41 -05:00
Tom Lane 84aad60b9c Doc: fix ancient mistake, or at least obsolete info, in rules example.
The example of expansion of multiple views claimed that the resulting
subquery nest would not get fully flattened because of an aggregate
function.  There's no aggregate in the example, though, only a user
defined function confusingly named MIN().  In a modern server, the
reason for the non-flattening is that MIN() is volatile, but I'm
unsure whether that was true back when this text was written.

Let's reduce the confusion level by using LEAST() instead (which
we didn't have at the time this example was created).  And then
we can just say that the planner will flatten the sub-queries, so
the rewrite system doesn't have to.

Noted by Paul Jungwirth.  This text is old enough to vote, so
back-patch to all supported branches.

Discussion: https://postgr.es/m/CA+renyXZFnmp9PcvX1EVR2dR=XG5e6E-AELr8AHCNZ8RYrpnPw@mail.gmail.com
2019-11-11 14:39:55 -05:00
Tom Lane 8a2e037a15 Release notes for 12.1, 11.6, 10.11, 9.6.16, 9.5.20, 9.4.25. 2019-11-10 18:31:13 -05:00
Etsuro Fujita 1bd67d5358 postgres_fdw: Fix error message for PREPARE TRANSACTION.
Currently, postgres_fdw does not support preparing a remote transaction
for two-phase commit even in the case where the remote transaction is
read-only, but the old error message appeared to imply that that was not
supported only if the remote transaction modified remote tables.  Change
the message so as to include the case where the remote transaction is
read-only.

Also fix a comment above the message.

Also add a note about the lack of supporting PREPARE TRANSACTION to the
postgres_fdw documentation.

Reported-by: Gilles Darold
Author: Gilles Darold and Etsuro Fujita
Reviewed-by: Michael Paquier and Kyotaro Horiguchi
Backpatch-through: 9.4
Discussion: https://postgr.es/m/08600ed3-3084-be70-65ba-279ab19618a5%40darold.net
2019-11-08 17:00:38 +09:00
Bruce Momjian 87477b6771 docs: clarify that only INSERT and UPDATE triggers can mod. NEW
The point is that DELETE triggers cannot modify any values.

Reported-by: Eugen Konkov

Discussion: https://postgr.es/m/919823407.20191029175436@yandex.ru

Backpatch-through: 9.4
2019-11-07 15:49:59 -05:00
Bruce Momjian 00ac1eced6 doc: fix plurality typo on bgwriter doc sentence
Reported-by: matthew.alton@gmail.com

Discussion: https://postgr.es/m/157204060717.1042.8194076510523669244@wrigleys.postgresql.org

Backpatch-through: 9.4
2019-11-05 20:54:04 -05:00
Alvaro Herrera 9fb25fda6d Change pg_restore -f- to dump to stdout instead of to ./-
Starting with PostgreSQL 12, pg_restore refuses to run when neither -d
nor -f are specified (c.f. commit 413ccaa74d), and it also makes "-f -"
mean the old implicit behavior of dumping to stdout.  However, older
branches write to a file called ./- when invoked like that, making it
impossible to write pg_restore scripts that work across versions.  This
is a partial backpatch of the aforementioned commit to all older
supported branches, providing an upgrade path.

Discussion: https://postgr.es/m/20191006190839.GE18030@telsasoft.com
2019-11-05 09:57:35 -03:00
Bruce Momjian 7db3651090 docs: fix wording of REFRESH CONCURRENTLY manual page
Reported-by: Asim / apraveen@pivotal.io

Discussion: https://postgr.es/m/157076828181.26165.15231292023740913543@wrigleys.postgresql.org

Backpatch-through: 9.4
2019-10-23 20:29:02 -04:00
Michael Paquier 952af2476f Doc: Fix various inconsistencies
This fixes multiple areas of the documentation:
- COPY for its past compatibility section.
- SET ROLE mentioning INHERITS instead of INHERIT
- PREPARE referring to stmt_name, that is not present.
- Extension documentation about format name with upgrade scripts.

Backpatch down to 9.4 for the relevant parts.

Author: Alexander Lakhin
Discussion: https://postgr.es/m/bf95233a-9943-b341-e2ff-a860c28af481@gmail.com
Backpatch-through: 9.4
2019-10-16 13:11:01 +09:00
Bruce Momjian 7ae8a9959c docs: Improve A?synchronous Multimaster Replication descr.
The docs for sync and async multimaster replication were unclear about
when to use it, and when it has benefits;  this change clarifies that.

Reported-by: juha-pekka.eloranta@reaktor.fi

Discussion: https://postgr.es/m/156856543824.1274.12180817186798859836@wrigleys.postgresql.org

Backpatch-through: 9.4
2019-10-07 18:06:07 -04:00
Bruce Momjian 630a8f5e2d docs: clarify that today/tomorrow/yesterday is at 00:00
This should help people clearly know that these days start at midnight.

Reported-by: David Harper

Discussion: https://postgr.es/m/156258047907.1181.11324468080514061996@wrigleys.postgresql.org

Backpatch-through: 9.4
2019-10-07 17:26:46 -04:00
Bruce Momjian 873cd4f606 doc: move mention of log_min_error_statement in a better spot
Previously it was mentioned in the lock_timeout docs in a confusing
location.

Reported-by: ivaylo.zlatanov@gmail.com

Discussion: https://postgr.es/m/157019615723.25307.15449102262106437404@wrigleys.postgresql.org

Backpatch-through: 9.4
2019-10-07 14:33:31 -04:00
Tom Lane 70c1245064 Doc: clarify handling of duplicate elements in array containment tests.
The array <@ and @> operators do not worry about duplicates: if every
member of array X matches some element of array Y, then X is contained
in Y, even if several members of X get matched to the same Y member.
This was not explicitly stated in the docs though, so improve matters.

Discussion: https://postgr.es/m/156614120484.1310.310161642239149585@wrigleys.postgresql.org
2019-09-23 12:37:04 -04:00
Amit Kapila c16eb2d530 Fix typo in commit 82fa3ff867.
Reported-By: Kuntal Ghosh (off-list)
Backpatch-through: 9.4, like 82fa3ff867
2019-09-20 08:34:12 +05:30
Michael Paquier 27b4121311 Doc: Fix incorrect mention to connection_object in CONNECT command of ECPG
This fixes an inconsistency with this parameter name not listed in the
command synopsis, and connection_name is the parameter name more
commonly used in the docs for ECPG commands.

Reported-by: Yusuke Egashita
Discussion: https://postgr.es/m/156870956796.1259.11456186889345212399@wrigleys.postgresql.org
Backpatch-through: 9.4
2019-09-19 13:19:23 +09:00
Amit Kapila 3698c4480b Doc: document autovacuum interruption.
It's important users be able to know (without looking at the source code)
that running DDL or DDL-like commands can interrupt autovacuum which can
lead to a lot of dead tuples and hence slower database operations.

Reported-by: James Coleman
Author: James Coleman
Reviewed-by: Amit Kapila
Backpatch-through: 9.4
Discussion:https://postgr.es/m/CAAaqYe-XYyNwML1=f=gnd0qWg46PnvD=BDrCZ5-L94B887XVxQ@mail.gmail.com
2019-09-19 09:26:33 +05:30
Amit Kapila 1f705e68ee Doc: Update PL/pgSQL sample function in plpgsql.sgml.
The example used to explain 'Looping Through Query Results' uses
pseudo-materialized views.  Replace it with a more up-to-date example
which does the same thing with actual materialized views, which have
been available since PostgreSQL 9.3.

In the passing, change '%' as format specifier instead of '%s' as is used
in other examples in plpgsql.sgml.

Reported-by: Ian Barwick
Author: Ian Barwick
Reviewed-by: Amit Kapila
Backpatch-through: 9.4
Discussion: https://postgr.es/m/9a70d393-7904-4918-c97c-649f6d114b6a@2ndquadrant.com
2019-09-12 14:27:05 +05:30
Tom Lane 96db9d5e2b configure: Update python search order
Some systems don't ship with "python" by default anymore, only
"python3" or "python2" or some combination, so include those in the
configure search.

Back-patch of commit 7291733ac.  At the time that was only pushed
back as far as v10, because of concerns about interactions with
commit b21c569ce.  Closer analysis shows that if we just
s/AC_PATH_PROG/AC_PATH_PROGS/, there is no effect on the older
branches' behavior when PYTHON is explicitly specified, so it should
be okay to back-patch: this will not break any configuration that
worked before.  And the need to support platforms with only a
"python3" or "python2" executable is getting ever more urgent.

Original patch by Peter Eisentraut, back-patch analysis by me

Discussion: https://www.postgresql.org/message-id/flat/1457.1543184081%40sss.pgh.pa.us#c9cc1199338fd6a257589c6dcea6cf8d
2019-09-08 13:45:13 -04:00
Peter Eisentraut 603a53431f doc: Fix awkward markup 2019-09-06 22:21:49 +02:00
Tom Lane bea87c02ce Doc: describe the "options" allowed in an ECPG connection target string.
These have been there a long time, but their format was never explained
in the docs.  Per complaint from Yusuke Egashira.

Discussion: https://postgr.es/m/848B1649C8A6274AA527C4472CA11EDD5FC70CBE@G01JPEXMBYT02
2019-08-31 14:05:32 -04:00
Tom Lane fe50481899 Doc: clarify behavior of standard aggregates for null inputs.
Section 4.2.7 says that unless otherwise specified, built-in
aggregates ignore rows in which any input is null.  This is
not true of the JSON aggregates, but it wasn't documented.
Fix that.

Of the other entries in table 9.55, some were explicit about
ignoring nulls, and some weren't; for consistency and
self-contained-ness, make them all say it explicitly.

Per bug #15884 from Tim Möhlmann.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/15884-c32d848f787fcae3@postgresql.org
2019-08-27 16:37:22 -04:00
Michael Paquier 157b233c44 Doc: Remove mention to "Visual Studio Express 2019"
The "Express" flavor of Visual Studio exists up to 2017, and the
documentation referred to "Express" for Visual Studio 2019.

Author: Takuma Hoshiai
Discussion: https://postgr.es/m/20190820120231.f905542e685140258ca73d82@sraoss.co.jp
Backpatch-through: 9.4
2019-08-22 09:59:49 +09:00
Michael Paquier fbfa2bba86 Doc: Fix various typos
All those fixes are already included on HEAD thanks to for example
c96581a and 66bde49, and have gone missing on back-branches.

Author: Alexander Lakhin, Liudmila Mantrova
Discussion: https://postgr.es/m/CAEkD-mDJHV3bhgezu3MUafJLoAKsOOT86+wHukKU8_NeiJYhLQ@mail.gmail.com
Backpatch-through: 9.4
2019-08-20 13:46:23 +09:00
Tom Lane 57980bdf62 Doc: improve documentation about postgresql.auto.conf.
Clarify what external tools can do to this file, and add a bit
of detail about what ALTER SYSTEM itself does.

Discussion: https://postgr.es/m/aed6cc9f-98f3-2693-ac81-52bb0052307e@2ndquadrant.com
2019-08-15 11:14:26 -04:00
Tom Lane b7c1c33d90 Doc: document permissions required for ANALYZE.
VACUUM's reference page had this text, but ANALYZE's didn't.  That's
a clear oversight given that section 5.7 explicitly delegates the
responsibility to define permissions requirements to the individual
commands' man pages.

Per gripe from Isaac Morland.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/CAMsGm5fp3oBUs-2iRfii0iEO=fZuJALVyM2zJLhNTjG34gpAVQ@mail.gmail.com
2019-08-07 18:09:28 -04:00
Tom Lane 246893dce8 Stamp 9.4.24. 2019-08-05 17:22:47 -04:00
Tom Lane 4908df4a60 Last-minute updates for release notes.
Security: CVE-2019-10208, CVE-2019-10209
2019-08-05 11:49:14 -04:00
Noah Misch 86737438b2 Require the schema qualification in pg_temp.type_name(arg).
Commit aa27977fe2 introduced this
restriction for pg_temp.function_name(arg); do likewise for types
created in temporary schemas.  Programs that this breaks should add
"pg_temp." schema qualification or switch to arg::type_name syntax.
Back-patch to 9.4 (all supported versions).

Reviewed by Tom Lane.  Reported by Tom Lane.

Security: CVE-2019-10208
2019-08-05 07:48:46 -07:00
Tom Lane 83c8b61771 Release notes for 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24. 2019-08-04 17:08:42 -04:00
Michael Paquier 5f2a94a38d Doc: Fix event trigger firing table
The table has not been updated for some commands introduced in recent
releases, so refresh it.  While on it, reorder entries alphabetically.

Backpatch all the way down for all the commands which have gone
missing.

Reported-by: Jeremy Smith
Discussion: https://postgr.es/m/15883-afff0ea3cc2dbbb6@postgresql.org
Backpatch-through: 9.4
2019-07-28 22:02:56 +09:00
Bruce Momjian 5dbe666ff8 doc: mention pg_reload_conf() for reloading the config file
Reported-by: Ian Barwick

Discussion: https://postgr.es/m/538950ec-b86a-1650-6078-beb7091c09c2@2ndquadrant.com

Backpatch-through: 9.4
2019-07-15 20:57:24 -04:00
Michael Paquier d49c127d90 Add support for Visual Studio 2019 in build scripts
This adjusts the documentation and the scripts related to the versions
of Windows SDK supported.

Author: Haribabu Kommi
Reviewed-by: Andrew Dunstan, Juan José Santamaría Flecha, Michael
Paquier
Discussion: https://postgr.es/m/CAJrrPGcfqXhfPyMrny9apoDU7M1t59dzVAvoJ9AeAh5BJi+UzA@mail.gmail.com
Backpatch-through: 9.4
2019-07-03 08:58:34 +09:00
Tom Lane a01e72fb69 Stamp 9.4.23. 2019-06-17 17:26:08 -04:00
Tom Lane 7f6a69050f Release notes for 10.9, 9.6.14, 9.5.18, 9.4.23.
(11.4 notes are already done.)
2019-06-16 15:39:08 -04:00