1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-17 06:41:24 +03:00

9395 Commits

Author SHA1 Message Date
Fujii Masao
08ca107425 Fix START_REPLICATION syntax in document.
Enclose "TIMELINE tli" part with brackets because it's optional.

Backport to 9.3 where TIMELINE option was introduced.

Noted by Marko Tiikkaja
2014-03-24 19:47:35 +09:00
Tom Lane
fc61da7c91 Release notes for 9.3.4, 9.2.8, 9.1.13, 9.0.17, 8.4.21. 2014-03-17 15:28:26 -04:00
Bruce Momjian
28d92026f0 release notes: add item missed in 9.2.5 release
Item is "Prevent errors in WAL replay due to references to uninitialized
empty pages".

Report and text by Andres Freund

Backpatch through 9.2.
2014-03-07 13:45:38 -05:00
Heikki Linnakangas
886c4ebfa3 Fix name of syslog_ident GUC in docs.
Michael Paquier
2014-03-07 10:38:53 +02:00
Alvaro Herrera
9b4bd35aa1 doc: bgw_main takes a Datum argument, not void *.
Per report from James Harper.
2014-02-27 11:41:43 -03:00
Heikki Linnakangas
5a7e75849c Add a GUC to report whether data page checksums are enabled.
Backported from master. It was an oversight in the original data checksums
patch to not have a GUC like this.
2014-02-20 10:46:54 +02:00
Tom Lane
4239753338 Last-minute updates for release notes.
Add entries for security issues.

Security: CVE-2014-0060 through CVE-2014-0067
2014-02-17 14:25:40 -05:00
Tom Lane
81f4c2867f Improve documentation about multixact IDs.
Per gripe from Josh Berkus.
2014-02-17 12:21:01 -05:00
Tom Lane
1ec5988f31 Document risks of "make check" in the regression testing instructions.
Since the temporary server started by "make check" uses "trust"
authentication, another user on the same machine could connect to it
as database superuser, and then potentially exploit the privileges of
the operating-system user who started the tests.  We should change
the testing procedures to prevent this risk; but discussion is required
about the best way to do that, as well as more testing than is practical
for an undisclosed security problem.  Besides, the same issue probably
affects some user-written test harnesses.  So for the moment, we'll just
warn people against using "make check" when there are untrusted users on
the same machine.

In passing, remove some ancient advice that suggested making the
regression testing subtree world-writable if you'd built as root.
That looks dangerously insecure in modern contexts, and anyway we
should not be encouraging people to build Postgres as root.

Security: CVE-2014-0067
2014-02-17 11:24:38 -05:00
Noah Misch
30b1c40f98 Document security implications of check_function_bodies.
Back-patch to 8.4 (all supported versions).
2014-02-17 09:33:32 -05:00
Noah Misch
fc4a04a3c4 Prevent privilege escalation in explicit calls to PL validators.
The primary role of PL validators is to be called implicitly during
CREATE FUNCTION, but they are also normal functions that a user can call
explicitly.  Add a permissions check to each validator to ensure that a
user cannot use explicit validator calls to achieve things he could not
otherwise achieve.  Back-patch to 8.4 (all supported versions).
Non-core procedural language extensions ought to make the same two-line
change to their own validators.

Andres Freund, reviewed by Tom Lane and Noah Misch.

Security: CVE-2014-0061
2014-02-17 09:33:32 -05:00
Noah Misch
475a1fbc41 Shore up ADMIN OPTION restrictions.
Granting a role without ADMIN OPTION is supposed to prevent the grantee
from adding or removing members from the granted role.  Issuing SET ROLE
before the GRANT bypassed that, because the role itself had an implicit
right to add or remove members.  Plug that hole by recognizing that
implicit right only when the session user matches the current role.
Additionally, do not recognize it during a security-restricted operation
or during execution of a SECURITY DEFINER function.  The restriction on
SECURITY DEFINER is not security-critical.  However, it seems best for a
user testing his own SECURITY DEFINER function to see the same behavior
others will see.  Back-patch to 8.4 (all supported versions).

The SQL standards do not conflate roles and users as PostgreSQL does;
only SQL roles have members, and only SQL users initiate sessions.  An
application using PostgreSQL users and roles as SQL users and roles will
never attempt to grant membership in the role that is the session user,
so the implicit right to add or remove members will never arise.

The security impact was mostly that a role member could revoke access
from others, contrary to the wishes of his own grantor.  Unapproved role
member additions are less notable, because the member can still largely
achieve that by creating a view or a SECURITY DEFINER function.

Reviewed by Andres Freund and Tom Lane.  Reported, independently, by
Jonas Sundman and Noah Misch.

Security: CVE-2014-0060
2014-02-17 09:33:32 -05:00
Tom Lane
0a8793333b Release notes for 9.3.3, 9.2.7, 9.1.12, 9.0.16, 8.4.20. 2014-02-16 22:08:30 -05:00
Tom Lane
bfd59426db Update regression testing instructions.
This documentation never got the word about the existence of check-world or
installcheck-world.  Revise to recommend use of those, and document all the
subsidiary test suites.  Do some minor wordsmithing elsewhere, too.

In passing, remove markup related to generation of plain-text regression
test instructions, since we don't do that anymore.

Back-patch to 9.1 where check-world was added.  (installcheck-world exists
in 9.0; but since check-world doesn't, this patch would need additional
work to cover that branch, and it doesn't seem worth the effort.)
2014-02-14 16:50:25 -05:00
Tom Lane
6cafc4fb09 Suggest shell here-documents instead of psql -c for multiple commands.
The documentation suggested using "echo | psql", but not the often-superior
alternative of a here-document.  Also, be more direct about suggesting
that people avoid -c for multiple commands.  Per discussion.
2014-02-14 12:54:43 -05:00
Alvaro Herrera
fb47de2be6 Separate multixact freezing parameters from xid's
Previously we were piggybacking on transaction ID parameters to freeze
multixacts; but since there isn't necessarily any relationship between
rates of Xid and multixact consumption, this turns out not to be a good
idea.

Therefore, we now have multixact-specific freezing parameters:

vacuum_multixact_freeze_min_age: when to remove multis as we come across
them in vacuum (default to 5 million, i.e. early in comparison to Xid's
default of 50 million)

vacuum_multixact_freeze_table_age: when to force whole-table scans
instead of scanning only the pages marked as not all visible in
visibility map (default to 150 million, same as for Xids).  Whichever of
both which reaches the 150 million mark earlier will cause a whole-table
scan.

autovacuum_multixact_freeze_max_age: when for cause emergency,
uninterruptible whole-table scans (default to 400 million, double as
that for Xids).  This means there shouldn't be more frequent emergency
vacuuming than previously, unless multixacts are being used very
rapidly.

Backpatch to 9.3 where multixacts were made to persist enough to require
freezing.  To avoid an ABI break in 9.3, VacuumStmt has a couple of
fields in an unnatural place, and StdRdOptions is split in two so that
the newly added fields can go at the end.

Patch by me, reviewed by Robert Haas, with additional input from Andres
Freund and Tom Lane.
2014-02-13 19:30:30 -03:00
Tom Lane
2d77f16c1d Improve cross-references between minor version release notes.
We have a practice of providing a "bread crumb" trail between the minor
versions where the migration section actually tells you to do something.
Historically that was just plain text, eg, "see the release notes for
9.2.4"; but if you're using a browser or PDF reader, it's a lot nicer
if it's a live hyperlink.  So use "<xref>" instead.  Any argument against
doing this vanished with the recent decommissioning of plain-text release
notes.

Vik Fearing
2014-02-12 19:09:21 -05:00
Bruce Momjian
8247236c63 doc: Postgres date-style date-only output is ISO
Backpatch to 9.3

Report from MauMau
2014-02-12 11:25:04 -05:00
Tom Lane
f1e522696f Don't generate plain-text HISTORY and src/test/regress/README anymore.
Providing this information as plain text was doubtless worth the trouble
ten years ago, but it seems likely that hardly anyone reads it in this
format anymore.  And the effort required to maintain these files (in the
form of extra-complex markup rules in the relevant parts of the SGML
documentation) is significant.  So, let's stop doing that and rely solely
on the other documentation formats.

Per discussion, the plain-text INSTALL instructions might still be worth
their keep, so we continue to generate that file.

Rather than remove HISTORY and src/test/regress/README from distribution
tarballs entirely, replace them with simple stub files that tell the reader
where to find the relevant documentation.  This is mainly to avoid possibly
breaking packaging recipes that expect these files to exist.

Back-patch to all supported branches, because simplifying the markup
requirements for release notes won't help much unless we do it in all
branches.
2014-02-10 20:48:12 -05:00
Robert Haas
5203b6a752 Rephrase text to avoid links in regress.sgml
Otherwise, the standalone regress_README build gets unhappy.
2014-02-03 20:14:46 -05:00
Robert Haas
5056607ae3 Document a few more regression test hazards.
Michael Paquier, reviewed by Christian Kruse
2014-02-03 10:48:58 -05:00
Bruce Momjian
5dc6cab2d2 doc: mention data page checksums in WAL section
Backpatch to 9.3

Adjusted patch from Ian Lawrence Barwick
2014-01-31 19:06:24 -05:00
Bruce Momjian
e3ec8015d0 docs: add mention of index swapping
Backpatch to 9.3

Greg Smith
2014-01-30 12:48:21 -05:00
Andrew Dunstan
56c08df55b Enable building with Visual Studion 2013.
Backpatch to 9.3.

Brar Piening.
2014-01-26 09:45:43 -05:00
Tom Lane
74c32f3455 Improve FILES section of psql reference page.
Primarily, explain where to find the system-wide psqlrc file, per recent
gripe from John Sutton.  Do some general wordsmithing and improve the
markup, too.

Also adjust psqlrc.sample so its comments about file location are somewhat
trustworthy.  (Not sure why we bother with this file when it's empty,
but whatever.)

Back-patch to 9.2 where the startup file naming scheme was last changed.
2014-01-14 19:28:06 -05:00
Heikki Linnakangas
370178172f Add OVERLAPS to index in the docs.
Per report from Adam Mackler and Jonathan Katz
2014-01-13 15:19:24 +02:00
Bruce Momjian
a826773bf6 Update copyright for 2014
Update all files in head, and files COPYRIGHT and legal.sgml in all back
branches.
2014-01-07 16:05:29 -05:00
Tom Lane
140b0626e8 Fix alphabetization in catalogs.sgml.
Some recent patches seem not to have grasped the concept that the catalogs
are described in alphabetical order.
2013-12-30 13:27:54 -05:00
Tom Lane
b57947aa9c Fix ancient docs/comments thinko: XID comparison is mod 2^32, not 2^31.
Pointed out by Gianni Ciolli.
2013-12-12 12:39:54 -05:00
Tom Lane
9cb631d984 Update release notes for 9.3.2, 9.2.6, 9.1.11, 9.0.15, 8.4.19. 2013-12-02 15:53:58 -05:00
Peter Eisentraut
19ffa951e6 doc: Put data types in alphabetical order
From: Andreas Karlsson <andreas@proxel.se>
2013-11-27 21:51:56 -05:00
Michael Meskes
55c18bcfa2 Documentation fix for ecpg.
The latest fixes removed a limitation that was still in the docs, so Zoltan updated the docs, too.
2013-11-27 11:14:44 +01:00
Fujii Masao
d982881487 Fix typo in release note.
Backpatch to 9.1.

Josh Kupershmidt
2013-11-27 13:46:34 +09:00
Bruce Momjian
57282cdeda docs: update page format to specify page checksum field
Backpatch to 9.3

Per report from Steffen Hildebrandt
2013-11-19 16:54:42 -05:00
Robert Haas
8674f1fba9 doc: Restore proper alphabetical order.
Colin 't Hart
2013-11-15 08:55:45 -05:00
Tom Lane
a1c29c1fe1 Clarify CREATE FUNCTION documentation about handling of typmods.
The previous text was a bit misleading, as well as unnecessarily vague
about what information would be discarded.  Per gripe from Craig Skinner.
2013-11-13 13:26:40 -05:00
Tom Lane
66e6daa3e1 Support default arguments and named-argument notation for window functions.
These things didn't work because the planner omitted to do the necessary
preprocessing of a WindowFunc's argument list.  Add the few dozen lines
of code needed to handle that.

Although this sounds like a feature addition, it's really a bug fix because
the default-argument case was likely to crash previously, due to lack of
checking of the number of supplied arguments in the built-in window
functions.  It's not a security issue because there's no way for a
non-superuser to create a window function definition with defaults that
refers to a built-in C function, but nonetheless people might be annoyed
that it crashes rather than producing a useful error message.  So
back-patch as far as the patch applies easily, which turns out to be 9.2.
I'll put a band-aid in earlier versions as a separate patch.

(Note that these features still don't work for aggregates, and fixing that
case will be harder since we represent aggregate arg lists as target lists
not bare expression lists.  There's no crash risk though because CREATE
AGGREGATE doesn't accept defaults, and we reject named-argument notation
when parsing an aggregate call.)
2013-11-06 13:33:18 -05:00
Tom Lane
b474871385 Improve the error message given for modifying a window with frame clause.
For rather inscrutable reasons, SQL:2008 disallows copying-and-modifying a
window definition that has any explicit framing clause.  The error message
we gave for this only made sense if the referencing window definition
itself contains an explicit framing clause, which it might well not.
Moreover, in the context of an OVER clause it's not exactly obvious that
"OVER (windowname)" implies copy-and-modify while "OVER windowname" does
not.  This has led to multiple complaints, eg bug #5199 from Iliya
Krapchatov.  Change to a hopefully more intelligible error message, and
in the case where we have just "OVER (windowname)", add a HINT suggesting
that omitting the parentheses will fix it.  Also improve the related
documentation.  Back-patch to all supported branches.
2013-11-05 21:58:12 -05:00
Tom Lane
01c1b1aa25 Improve documentation about usage of FDW validator functions.
SGML documentation, as well as code comments, failed to note that an FDW's
validator will be applied to foreign-table options for foreign tables using
the FDW.

Etsuro Fujita
2013-10-28 10:30:10 -04:00
Bruce Momjian
41b46ed8a2 docs: correct 9.1 and 9.2 release note mention of timeline switch fix
Backpatch through 9.1.

KONDO Mitsumasa
2013-10-15 10:34:05 -04:00
Peter Eisentraut
d42d839e52 doc: Fix table column number declaration 2013-10-10 21:18:07 -04:00
Bruce Momjian
7453b8db75 doc: fix typo in release notes
Backpatch through 8.4

Per suggestion by Amit Langote
2013-10-09 08:44:52 -04:00
Bruce Momjian
ac9558c2fd docs: clarify references to md5 hash and md5 crypt in pgcrypto docs
Backpatch to 9.3.X.

Suggestion from Richard Neill
2013-10-08 12:25:18 -04:00
Peter Eisentraut
4e80950042 Revert "Document support for VPATH builds of extensions."
This reverts commit 9598134e3030a883ff6eea8a822466ce5143ffeb.
2013-10-07 22:42:52 -04:00
Bruce Momjian
2589a5a59b docs: update release notes for 8.4.18, 9.0.14, 9.1.10, 9.2.5, 9.3.1 2013-10-07 21:35:02 -04:00
Andrew Dunstan
9598134e30 Document support for VPATH builds of extensions.
Cédric Villemain and me.
2013-10-06 23:03:57 -04:00
Bruce Momjian
6f85b317d6 pg_upgrade doc: link mode additions
Mention that link mode uses less disk space, and uses junction points on
Windows.

Backpatch to 9.3.
2013-10-05 10:18:17 -04:00
Peter Eisentraut
e632b6b594 doc: Correct psycopg URL 2013-10-02 21:34:06 -04:00
Magnus Hagander
513251832e Fix copy/paste error 2013-10-02 16:43:46 +02:00
Andrew Dunstan
32d8602852 Fix erroneous statements about multiply specified JSON columns.
The behaviour in json_populate_record() and json_populate_recordset()
was changed during development but the docs were not.
2013-09-26 17:46:07 -04:00