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

17012 Commits

Author SHA1 Message Date
Neil Conway
ac2172d6f6 Patch from Marko Kreen:
pgcrypto crypt()/md5 and hmac() leak memory when compiled against
OpenSSL as openssl.c digest ->reset will do two DigestInit calls
against a context.  This happened to work with OpenSSL 0.9.6
but not with 0.9.7+.

Reason for the messy code was that I tried to avoid creating
wrapper structure to transport algorithm info and tried to use
OpenSSL context for it.  The fix is to create wrapper structure.

It also uses newer digest API to avoid memory allocations
on reset with newer OpenSSLs.

Thanks to Daniel Blaisdell for reporting it.
2006-02-18 20:49:00 +00:00
Tom Lane
a41379fbce Stamp 7.4.12. REL7_4_12 2006-02-12 22:38:30 +00:00
Tom Lane
8cef661bcf Update release notes. 2006-02-12 22:36:05 +00:00
Tom Lane
7ef174c032 Fix bug in SET SESSION AUTHORIZATION that allows unprivileged users to crash
the server, if it has been compiled with Asserts enabled (CVE-2006-0553).
Thanks to Akio Ishida for reporting this problem.
2006-02-12 22:33:29 +00:00
Bruce Momjian
86b2da894a Update FAQ latest version 2006-02-12 18:50:26 +00:00
Bruce Momjian
81c303c514 Stamp releases for 2006-02-14 release 2006-02-12 18:41:39 +00:00
Bruce Momjian
dd56158eef Update release notes for 2006-02-14 release 2006-02-12 18:23:22 +00:00
Tom Lane
7da4e7ac6a Repair longstanding bug in slru/clog logic: it is possible for two backends
to try to create a log segment file concurrently, but the code erroneously
specified O_EXCL to open(), resulting in a needless failure.  Before 7.4,
it was even a PANIC condition :-(.  Correct code is actually simpler than
what we had, because we can just say O_CREAT to start with and not need a
second open() call.  I believe this accounts for several recent reports of
hard-to-reproduce "could not create file ...: File exists" errors in both
pg_clog and pg_subtrans.
2006-01-21 04:38:46 +00:00
Neil Conway
e05a95bc00 We neglected to apply domain constraints on UNKNOWN parameters to
prepared statements, per report from David Wheeler.
2006-01-12 22:29:31 +00:00
Tom Lane
e76bb5cfec Repair "Halloween problem" in EvalPlanQual: a tuple that's been inserted by
our own command (or more generally, xmin = our xact and cmin >= current
command ID) should not be seen as good.  Else we may try to update rows
we already updated.  This error was inserted last August while fixing the
even bigger problem that the old coding wouldn't see *any* tuples inserted
by our own transaction as good.  Per report from Euler Taveira de Oliveira.
2006-01-12 21:49:32 +00:00
Tom Lane
1937d8d9ef Use a more bulletproof test for whether finite() and isinf() are present.
It seems that recent gcc versions can optimize away calls to these functions
even when the functions do not exist on the platform, resulting in a bogus
positive result.  Avoid this by using a non-constant argument and ensuring
that the function result is not simply discarded.  Per report from
François Laupretre.
2006-01-12 19:24:27 +00:00
Tom Lane
1fc010cc96 Fix pg_dump to add the required OPERATOR() decoration to schema-qualified
operator names.  This is needed when dumping operator definitions that have
COMMUTATOR (or similar) links to operators in other schemas.
Apparently Daniel Whitter is the first person ever to try this :-(
2006-01-09 21:16:46 +00:00
Tom Lane
2942023a2a Fix failure to apply domain constraints to a NULL constant that's added to
an INSERT target list during rule rewriting.  Per report from John Supplee.
2006-01-06 20:11:31 +00:00
Tom Lane
e9b0c2d4bd Release-note updates and copy editing. REL7_4_11 2006-01-06 03:00:34 +00:00
Tom Lane
7de3bec056 Generate back-branch configure scripts with the appropriate version of autoconf. 2006-01-06 02:31:08 +00:00
Bruce Momjian
f1f15af055 New pgcrypto item wording. 2006-01-05 15:17:40 +00:00
Bruce Momjian
877ecee373 Wording improvements. 2006-01-05 15:11:33 +00:00
Bruce Momjian
f8c7c069b5 Improve markup. 2006-01-05 14:52:58 +00:00
Bruce Momjian
721205b51c *** empty log message *** 2006-01-05 05:22:09 +00:00
Bruce Momjian
12693c6476 Stamp release 7.4.11. 2006-01-05 03:59:48 +00:00
Tom Lane
d514752dbf Arrange to set the LC_XXX environment variables to match our locale setup.
Back-patch of previous fix in HEAD for plperl-vs-locale issue.
2006-01-05 00:55:24 +00:00
Tom Lane
37cdf43eaa Add port support for unsetenv() in back branches. Needed for locale
environment fix.
2006-01-05 00:51:25 +00:00
Joe Conway
fcacfc96a2 When the remote query result has a different number of columns
than the local query specifies (e.g. in the FROM clause),
throw an ERROR (instead of crashing). Fix for bug #2129 reported
by Akio Iwaasa.
2006-01-03 23:48:04 +00:00
Tom Lane
8dc7c8cf1d There is a signedness bug in Openwall gen_salt code that pgcrypto uses.
This makes the salt space for md5 and xdes algorithms a lot smaller than
it should be.

Marko Kreen
2006-01-03 23:46:51 +00:00
Neil Conway
bf8128f757 Remove DOS line endings ("\r\n") from several .po files. DOS line endings
are inconsistent with the rest of the .po files, and apparently cause
problems for Sun's cc. Per report on IRC from "bitvector2".
2006-01-01 10:14:27 +00:00
Tatsuo Ishii
b2af5a28cc Fix long standing Asian multibyte charsets bug.
See:

Subject: [HACKERS] bugs with certain Asian multibyte charsets
From: Tatsuo Ishii <ishii@sraoss.co.jp>
To: pgsql-hackers@postgresql.org
Date: Sat, 24 Dec 2005 18:25:33 +0900 (JST)

for more details.
2005-12-24 10:40:55 +00:00
Tom Lane
0862aeaeec Adjust string comparison so that only bitwise-equal strings are considered
equal: if strcoll claims two strings are equal, check it with strcmp, and
sort according to strcmp if not identical.  This fixes inconsistent
behavior under glibc's hu_HU locale, and probably under some other locales
as well.  Also, take advantage of the now-well-defined behavior to speed up
texteq, textne, bpchareq, bpcharne: they may as well just do a bitwise
comparison and not bother with strcoll at all.

NOTE: affected databases may need to REINDEX indexes on text columns to be
sure they are self-consistent.
2005-12-22 22:50:22 +00:00
Tom Lane
b1ea82fee1 Defend against crash while processing Describe Statement or Describe Portal
messages, when client attempts to execute these outside a transaction (start
one) or in a failed transaction (reject message, except for COMMIT/ROLLBACK
statements which we can handle).  Per report from Francisco Figueiredo Jr.
2005-12-14 17:07:00 +00:00
Peter Eisentraut
6acbe665f7 Translation updates REL7_4_10 2005-12-09 22:12:26 +00:00
Tom Lane
9c8c45e218 Stamp 7.4.10. 2005-12-09 20:53:26 +00:00
Tom Lane
c8457e0fb8 Add release notes for back branches (7.3 and up).
Also minor improvements to 8.1.1 release notes.
2005-12-09 20:40:56 +00:00
Peter Eisentraut
d45693fb55 Documentation fix: s/event_object_name/event_object_table/g 2005-12-08 20:44:18 +00:00
Teodor Sigaev
9e4caa5abe Fix stupid bug with sizeof 2005-12-06 18:22:13 +00:00
Tom Lane
a025aa179c In a nestloop inner indexscan, it's OK to use pushed-down baserestrictinfo
clauses even if it's an outer join.  This is a corner case since such
clauses could only arise from weird OUTER JOIN ON conditions, but worth
fixing.  Per example from Ron at cheapcomplexdevices.com.
2005-12-06 16:59:22 +00:00
Tom Lane
8b20f8a51d Add regression test to see if the min/max values of int8 convert correctly. 2005-12-05 04:14:27 +00:00
Tom Lane
22868b9e39 Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX.
Per example from Dirk Pirschel.
2005-12-03 20:17:00 +00:00
Tom Lane
22fff8b9f1 Check for overflow in strtol() while parsing datetime inputs.
Michael Fuhr.
2005-12-01 17:57:07 +00:00
Tom Lane
e03c5e2d5a Fix performance issue in exprTypmod(): for a COALESCE expression, it
recursed twice on its first argument, leading to exponential time spent
on a deep nest of COALESCEs ... such as a deeply nested FULL JOIN would
produce.  Per report from Matt Carter.
2005-11-18 23:08:43 +00:00
Bruce Momjian
48fabd257f Properly document return value of strpos(). 2005-11-16 03:56:52 +00:00
Tom Lane
63b2342072 When in transaction-aborted state, reject Bind message for portals containing
anything but transaction-exiting commands (ROLLBACK etc).  We already rejected
Parse and Execute in such cases, so there seems little point in allowing Bind.
This prevents at least an Assert failure, and probably worse things, since
there's a lot of infrastructure that doesn't work when not in a live
transaction.  We can also simplify the Bind logic a bit by rejecting messages
with a nonzero number of parameters, instead of the former kluge to silently
substitute NULL for each parameter.  Per bug #2033 from Joel Stevenson.
2005-11-10 00:31:59 +00:00
Tom Lane
74f224fad4 Fix longstanding race condition in transaction log management: there was a
very narrow window in which SimpleLruReadPage or SimpleLruWritePage could
think that I/O was needed when it wasn't (and indeed the buffer had already
been assigned to another page).  This would result in an Assert failure if
Asserts were enabled, and probably in silent data corruption if not.
Reported independently by Jim Nasby and Robert Creager.

I intend a more extensive fix when 8.2 development starts, but this is a
reasonably low-impact patch for the existing branches.
2005-11-03 00:23:50 +00:00
Tom Lane
fcd978c57d Fix longstanding bug that would sometimes let the planner generate a bad plan
for an outer join; symptom is bogus error "RIGHT JOIN is only supported with
merge-joinable join conditions".  Problem was that select_mergejoin_clauses
did its tests in the wrong order.  We need to force left join not right join
for a merge join when there are non-mergeable join clauses; but the test for
this only accounted for mergejoinability of the clause operator, and not
whether the left and right Vars were of the proper relations.  Per report
from Jean-Pierre Pelletier.
2005-10-25 20:30:45 +00:00
Tom Lane
01145f963f Prevent core dump in contrib version of autovacuum when a table has been
dropped.  Per report from daveg (not his patch, though).
2005-10-20 16:14:47 +00:00
Tom Lane
52e98f8415 Don't convert debug/notice/warning messages into errors just because
they occur inside error processing.  This is a back-port of a logic
change already present in 8.0.  Partial fix for bug#1976 --- doesn't
cure the wrong-encoding problem, but at least stops it from causing
unintended ERRORs.
2005-10-20 01:31:50 +00:00
Tom Lane
a4baf229a4 Pass a strdup'd ident string to openlog(), to ensure that reallocation
of GUC memory doesn't cause us to start emitting a bogus ident string.
Per report from Han Holl.  Also some trivial code cleanup in write_syslog.
2005-10-14 16:41:28 +00:00
Bruce Momjian
e257f28db0 [ Backpatch to 7.4.X.]
Also I fixed a bug in a bug fix I committed a few weeks ago. he check
for a varchar pointer was incomplete.

Michael Meskes
2005-10-14 01:50:58 +00:00
Tom Lane
5c05d165af Fix longstanding bug found by Atsushi Ogawa: _bt_check_unique would mark
the wrong buffer dirty when trying to kill a dead index entry that's on
a page after the one it started on.  No risk of data corruption, just
inefficiency, but still a bug.
2005-10-12 17:18:31 +00:00
Neil Conway
25a5b740cd Fix typo in sample pg_hba.conf; per IRC report from Bernhard Neuhauser. 2005-10-11 23:00:39 +00:00
Tom Lane
31d276d0ed COPY's test for read-only transaction was backward; it prohibited COPY TO
where it should prohibit COPY FROM.  Found by Alon Goldshuv.
REL7_4_9
2005-10-03 23:43:45 +00:00
Tom Lane
4082f5e34f Stamp release 7.4.9. 2005-10-03 17:14:24 +00:00