Commit Graph

9198 Commits

Author SHA1 Message Date
Tom Lane
9d4e01ca3e Update release notes with security issues.
Security: CVE-2010-1169, CVE-2010-1170
2010-05-13 21:27:08 +00:00
Tom Lane
0554358756 Use an entity instead of non-ASCII letter. Thom Brown 2010-05-13 19:16:21 +00:00
Tom Lane
099aff05c3 Use "TOAST table" in place of the vague, not-used-elsewhere phrase
"supplementary storage table".
2010-05-13 18:54:23 +00:00
Tom Lane
a5389c1ad5 Prevent PL/Tcl from loading the "unknown" module from pltcl_modules unless
that is a regular table or view owned by a superuser.  This prevents a
trojan horse attack whereby any unprivileged SQL user could create such a
table and insert code into it that would then get executed in other users'
sessions whenever they call pltcl functions.

Worse yet, because the code was automatically loaded into both the "normal"
and "safe" interpreters at first use, the attacker could execute unrestricted
Tcl code in the "normal" interpreter without there being any pltclu functions
anywhere, or indeed anyone else using pltcl at all: installing pltcl is
sufficient to open the hole.  Change the initialization logic so that the
"unknown" code is only loaded into an interpreter when the interpreter is
first really used.  (That doesn't add any additional security in this
particular context, but it seems a prudent change, and anyway the former
behavior violated the principle of least astonishment.)

Security: CVE-2010-1170
2010-05-13 18:29:19 +00:00
Andrew Dunstan
bfdfc4ecd3 Abandon the use of Perl's Safe.pm to enforce restrictions in plperl, as it is
fundamentally insecure. Instead apply an opmask to the whole interpreter that
imposes restrictions on unsafe operations. These restrictions are much harder
to subvert than is Safe.pm, since there is no container to be broken out of.
Backported to release 7.4.

In releases 7.4, 8.0 and 8.1 this also includes the necessary backporting of
the two interpreters model for plperl and plperlu adopted in release 8.2.

In versions 8.0 and up, the use of Perl's POSIX module to undo its locale
mangling on Windows has become insecure with these changes, so it is
replaced by our own routine, which is also faster.

Nice side effects of the changes include that it is now possible to use perl's
"strict" pragma in a natural way in plperl, and that perl's $a and
$b variables now work as expected in sort routines, and that function
compilation is significantly faster.

Tim Bunce and Andrew Dunstan, with reviews from Alex Hunsaker and
Alexey Klyukin.

Security: CVE-2010-1169
2010-05-13 16:40:36 +00:00
Magnus Hagander
08c3330cbc Fix some spelling errors.
Thom Brown
2010-05-13 14:16:58 +00:00
Tom Lane
a4da7e2139 Preliminary release notes for releases 8.4.4, 8.3.11, 8.2.17, 8.1.21, 8.0.25,
7.4.29.
2010-05-12 23:27:26 +00:00
Heikki Linnakangas
e761afaba4 Fix incorrect parameter tag in docs, spotted by KOIZUMI Satoru. 2010-05-05 15:13:25 +00:00
Robert Haas
a696df1b57 Provide better guidance for adjusting shared_buffers.
This change was previously committed to HEAD, but the consensus seems to be
in favor of back-patching it.  I'm only backpatching as far as 8.3.X, however,
because it's not clear to me to what degree this advice applies to older
branches, and in any case our first advice to anyone attempting to tune those
versions is likely to be "upgrade".
2010-04-18 23:59:55 +00:00
Peter Eisentraut
b6953bc189 IP port -> TCP port
backpatched to 8.1, where this first appeared
2010-04-15 20:47:47 +00:00
Tom Lane
555b5a25dc Fix missing parentheses for current_query(), per bug #5378.
Also make a couple other minor editorial improvements.
2010-03-18 15:29:51 +00:00
Magnus Hagander
c487a9540c Typo fixes.
Fujii Masao
2010-03-17 18:04:29 +00:00
Tom Lane
3c1e84ad00 Fix incorrect example in CREATE INDEX reference page, per Josh Kupershmidt.
Also fix and uncomment an old example of creating a GIST index, and make
a couple of other minor editorial adjustments.
2010-03-17 15:55:55 +00:00
Marc G. Fournier
d6c7c7c6bc tag 8.4.3 2010-03-12 03:23:23 +00:00
Alvaro Herrera
bfc04a92ab Improve PL/Perl documentation of database access functions. (Backpatch to 8.4
of a patch previously applied by Bruce Momjian to CVS HEAD)

Alexey Klyukin
2010-03-11 21:53:53 +00:00
Tom Lane
1b84d0f574 Preliminary release notes for releases 8.4.3, 8.3.10, 8.2.16, 8.1.20, 8.0.24,
7.4.28.
2010-03-10 01:58:24 +00:00
Magnus Hagander
b98e532137 Add missing space in example.
Tim Landscheidt
2010-03-08 12:39:51 +00:00
Magnus Hagander
5ea449e06e Add configuration parameter ssl_renegotiation_limit to control
how often we do SSL session key renegotiation. Can be set to
0 to disable renegotiation completely, which is required if
a broken SSL library is used (broken patches to CVE-2009-3555
a known cause) or when using a client library that can't do
renegotiation.
2010-02-25 13:26:26 +00:00
Alvaro Herrera
7379835935 Remove stray semicolon, per report from strk 2010-02-24 14:11:40 +00:00
Robert Haas
c740350856 Remove incorrect statement that PostgreSQL 8.4 has no default parameters.
Tom Lane already removed this from HEAD as par of the plpgsql variable
resolution behavior patch, but this part of his patch also applies to 8.4.
2010-02-19 23:55:52 +00:00
Tom Lane
d1e0eb30c0 Ooops, let's get the non-null vs null bit right ... 2010-02-14 01:01:40 +00:00
Tom Lane
9908950f11 Document the behavior of STRICT VARIADIC functions. 2010-02-14 00:48:20 +00:00
Bruce Momjian
d0483aec16 Properly document that OVER and WINDOW are Postgres reserved words. 2010-02-05 19:34:57 +00:00
Magnus Hagander
69273fb018 Fix spelling error, noticed by Thomas Shinnick 2010-01-16 20:38:57 +00:00
Magnus Hagander
48eb3e6351 Update Windows installation notes.
pginstaller isn't used anymore, in favor of the one-click installers.
Make it clear that we support Windows 2000 and newer with the native
port, instead of first saying we support NT4 and then saying we don't.
2010-01-10 15:54:14 +00:00
Heikki Linnakangas
a1ffb01217 Always pass catalog id to the options validator function specified in
CREATE FOREIGN DATA WRAPPER. Arguably it wasn't a bug because the
documentation said that it's passed the catalog ID or zero, but surely
we should provide it when it's known. And there isn't currently any
scenario where it's not known, and I can't imagine having one in the
future either, so better remove the "or zero" escape hatch and always
pass a valid catalog ID. Backpatch to 8.4.

Martin Pihlak
2009-12-23 12:24:16 +00:00
Marc G. Fournier
5cc7c13022 tag for 8.4.2 2009-12-10 02:56:56 +00:00
Tom Lane
e8df3579fe Update release notes for releases 8.4.2, 8.3.9, 8.2.15, 8.1.19, 8.0.23,
7.4.27.
2009-12-10 00:31:24 +00:00
Magnus Hagander
a493b4224b Update size references in installation instructions to be a bit
more up-to-date with current versions.
2009-12-09 16:16:45 +00:00
Magnus Hagander
fd1b31fa11 Fix a couple of broken links to third-party sites. 2009-12-08 20:08:37 +00:00
Magnus Hagander
652dad6d32 Replace broken link to custom local gettext package with one to the main
GNU site for gettext.
2009-12-08 19:22:49 +00:00
Magnus Hagander
8c5a1d9366 Update CVS documentation to be more current and add documentation about
git mirror.

Remove information about cvsup and documentation that's more about cvs
than our use of cvs.

Backpatch to 8.4 so we get the git information up on the website as
soon as possible.
2009-12-07 19:20:01 +00:00
Peter Eisentraut
7c605d5dfa Fix syntax in extract() examples
Author: Erik Rijkers <er@xs4all.nl>
2009-11-24 19:21:04 +00:00
Tom Lane
bd02b48ba4 Make FOR UPDATE/SHARE in the primary query not propagate into WITH queries;
for example in
  WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE
the FOR UPDATE will now affect bar but not foo.  This is more useful and
consistent than the original 8.4 behavior, which tried to propagate FOR UPDATE
into the WITH query but always failed due to assorted implementation
restrictions.  Even though we are in process of removing those restrictions,
it seems correct on philosophical grounds to not let the outer query's
FOR UPDATE affect the WITH query.

In passing, fix isLockedRel which frequently got things wrong in
nested-subquery cases: "FOR UPDATE OF foo" applies to an alias foo in the
current query level, not subqueries.  This has been broken for a long time,
but it doesn't seem worth back-patching further than 8.4 because the actual
consequences are minimal.  At worst the parser would sometimes get
RowShareLock on a relation when it should be AccessShareLock or vice versa.
That would only make a difference if someone were using ExclusiveLock
concurrently, which no standard operation does, and anyway FOR UPDATE
doesn't result in visible changes so it's not clear that the someone would
notice any problem.  Between that and the fact that FOR UPDATE barely works
with subqueries at all in existing releases, I'm not excited about worrying
about it.
2009-10-27 17:11:30 +00:00
Alvaro Herrera
0dfba4e98f Fix documentation on the toast.fillfactor reloption: it doesn't exist.
Per note from Zoltan Boszormenyi.
2009-10-27 14:00:15 +00:00
Tom Lane
ac317a8474 Fix erroneous handling of shared dependencies (ie dependencies on roles)
in CREATE OR REPLACE FUNCTION.  The original code would update pg_shdepend
as if a new function was being created, even if it wasn't, with two bad
consequences: pg_shdepend might record the wrong owner for the function,
and any dependencies for roles mentioned in the function's ACL would be lost.
The fix is very easy: just don't touch pg_shdepend at all when doing a
function replacement.

Also update the CREATE FUNCTION reference page, which never explained
exactly what changes and doesn't change in a function replacement.
In passing, fix the CREATE VIEW reference page similarly; there's no
code bug there, but the docs didn't say what happens.
2009-10-02 18:13:10 +00:00
Tom Lane
4853c1eb2f A bit more wordsmithing on the COPY CSV NULL business. 2009-09-18 20:01:18 +00:00
Bruce Momjian
541569caed CSV NULL Documentation
Update docs to clearly explain NULL value matching behavior, per Andrew.

Backpatch to 8.4.X.
2009-09-17 21:49:22 +00:00
Bruce Momjian
77b2388b24 CVS NULL Documentation
Clearify documentation of CVS's output of NULL values, per suggestion
from Magnus.

Backpatch to 8.4.X.
2009-09-17 21:28:30 +00:00
Marc G. Fournier
6883b7df92 Tag 8.4.1 2009-09-04 00:36:51 +00:00
Tom Lane
b58a4b2ee8 Final updates of release notes for 8.4.1, 8.3.8, 8.2.14, 8.1.18, 8.0.22,
7.4.26.
2009-09-03 22:13:58 +00:00
Tom Lane
57710f39cc Make LOAD of an already-loaded library into a no-op, instead of attempting
to unload and re-load the library.

The difficulty with unloading a library is that we haven't defined safe
protocols for doing so.  In particular, there's no safe mechanism for
getting out of a "hook" function pointer unless libraries are unloaded
in reverse order of loading.  And there's no mechanism at all for undefining
a custom GUC variable, so GUC would be left with a pointer to an old value
that might or might not still be valid, and very possibly wouldn't be in
the same place anymore.

While the unload and reload behavior had some usefulness in easing
development of new loadable libraries, it's of no use whatever to normal
users, so just disabling it isn't giving up that much.  Someday we might
care to expend the effort to develop safe unload protocols; but even if
we did, there'd be little certainty that every third-party loadable module
was following them, so some security restrictions would still be needed.

Back-patch to 8.2; before that, LOAD was superuser-only anyway.

Security: unprivileged users could crash backend.  CVE not assigned yet
2009-09-03 22:11:13 +00:00
Tom Lane
3f2fa308d1 Modify the definition of window-function PARTITION BY and ORDER BY clauses
so that their elements are always taken as simple expressions over the
query's input columns.  It originally seemed like a good idea to make them
act exactly like GROUP BY and ORDER BY, right down to the SQL92-era behavior
of accepting output column names or numbers.  However, that was not such a
great idea, for two reasons:

1. It permits circular references, as exhibited in bug #5018: the output
column could be the one containing the window function itself.  (We actually
had a regression test case illustrating this, but nobody thought twice about
how confusing that would be.)

2. It doesn't seem like a good idea for, eg, "lead(foo) OVER (ORDER BY foo)"
to potentially use two completely different meanings for "foo".

Accordingly, narrow down the behavior of window clauses to use only the
SQL99-compliant interpretation that the expressions are simple expressions.
2009-08-27 20:08:12 +00:00
Alvaro Herrera
6c593b9ca0 Fix broken markup
Jan Urbański
2009-08-27 20:05:46 +00:00
Bruce Momjian
95ac06c85b Update release notes for 7.4.26, 8.0.22, 8.1.18, 8.2.14, 8.3.8, 8.4.1. 2009-08-27 01:27:43 +00:00
Tom Lane
824e0e4686 Try to make silent_mode behave somewhat reasonably.
Instead of sending stdout/stderr to /dev/null after forking away from the
terminal, send them to postmaster.log within the data directory.  Since
this opens the door to indefinite logfile bloat, recommend even more
strongly that log output be redirected when using silent_mode.

Move the postmaster's initial calls of load_hba() and load_ident() down
to after we have started the log collector, if we are going to.  This
is so that errors reported by them will appear in the "usual" place.

Reclassify silent_mode as a LOGGING_WHERE, not LOGGING_WHEN, parameter,
since it's got absolutely nothing to do with the latter category.

In passing, fix some obsolete references to -S ... this option hasn't
had that switch letter for a long time.

Back-patch to 8.4, since as of 8.4 load_hba() and load_ident() are more
picky (and thus more likely to fail) than they used to be.  This entire
change was driven by a complaint about those errors disappearing into
the bit bucket.
2009-08-24 20:08:40 +00:00
Tom Lane
55ea948feb Fix imprecise documentation of random(): it never returns 1.0.
This was changed in 8.2 but the documentation was not corrected.
Per gripe from Sam Mason.
2009-08-16 19:55:28 +00:00
Bruce Momjian
08d1d61769 Remove tab in SGML. 2009-08-15 19:33:29 +00:00
Alvaro Herrera
d2c3dbf186 Fix URL to "The Hitch-Hiker's Guide to Evolutionary Computation".
Per Andreas Wenk, Andres Freund and Rob Wultsh.  Thanks, Robert Haas, for the
patch.
2009-08-10 22:42:41 +00:00
Alvaro Herrera
8d0961466e Fix number of columns declared for pg_user_mappings description table. 2009-08-10 22:16:11 +00:00