Commit Graph

12087 Commits

Author SHA1 Message Date
Tom Lane f47f4be902 Remove registration message in all the supported back branches;
we had decided to drop it for 7.4, and no one misses it.
2005-08-16 03:33:39 +00:00
Tom Lane a55a75f02d MemSet() must not cast its pointer argument to int32* until after it has
checked that the pointer is actually word-aligned.  Casting a non-aligned
pointer to int32* is technically illegal per the C spec, and some recent
versions of gcc actually generate bad code for the memset() when given
such a pointer.  Per report from Andrew Morrow.
2005-07-18 15:55:01 +00:00
Tom Lane 84e5ce7eb9 Back-patch into 7.2 branch the 7.3 changes that made contrib/seg
error messages reasonably independent of the bison version used to
build segparse.c.   Needed to get this branch passing on buildfarm.
2005-07-16 19:48:16 +00:00
Tom Lane 44e7a2ae60 Back-patch into 7.2 branch the 7.3 changes that made contrib/cube
error messages reasonably independent of the bison version used to
build cubeparse.c.  Needed to get this branch passing on buildfarm.
2005-07-16 19:27:20 +00:00
Tom Lane 861e3c7a07 Mark the geometry regression test as an ignorable failure in the pre-7.4
branches.  Per discussion, this seems saner than trying to maintain
last-significant-digit regression test outputs for all supported platforms.
2005-07-16 19:02:01 +00:00
Tom Lane c969e30d7d Fix bogus "extern int errno;" in back branches, per Andrew Dunstan. 2005-07-16 15:24:08 +00:00
Tom Lane 91d381e3c0 Make libpq_gettext save and restore errno in a Windows-compatible way.
Also, back-patch fix into back branches.
2005-07-08 15:25:46 +00:00
Tom Lane 224501ed68 plpgsql's exec_assign_value() freed the old value of a variable before
copying/converting the new value, which meant that it failed badly on
"var := var" if var is of pass-by-reference type.  Fix this and a similar
hazard in exec_move_row(); not sure that the latter can manifest before
8.0, but patch it all the way back anyway.  Per report from Dave Chapeskie.
2005-06-20 20:45:12 +00:00
Tom Lane 2b91c8cf00 The random selection in function linear() could deliver a value equal to max
if geqo_rand() returns exactly 1.0, resulting in failure due to indexing
off the end of the pool array.  Also, since this is using inexact float math,
it seems wise to guard against roundoff error producing values slightly
outside the expected range.  Per report from bug@zedware.org.
2005-06-14 14:21:43 +00:00
Tom Lane e4ce3e76ce Add test to WAL replay to verify that xl_prev points back to the previous
WAL record; this is necessary to be sure we recognize stale WAL records
when a WAL page was only partially written during a system crash.
2005-05-31 19:11:28 +00:00
Tom Lane ce93521be0 Guard against duplicate IDs in input file in SortTocFromFile().
Per report from Brian Hackett.
2005-05-17 17:31:24 +00:00
Tom Lane 6a36111eca Update release notes for upcoming re-releases. 2005-05-09 00:10:53 +00:00
Tom Lane cb0ddb62e2 Repair very-low-probability race condition between relation extension
and VACUUM: in the interval between adding a new page to the relation
and formatting it, it was possible for VACUUM to come along and decide
it should format the page too.  Though not harmful in itself, this would
cause data loss if a third transaction were able to insert tuples into
the vacuumed page before the original extender got control back.
2005-05-07 21:34:20 +00:00
Tom Lane 2e6482493a Adjust time qual checking code so that we always check TransactionIdIsInProgress
before we check commit/abort status.  Formerly this was done in some paths
but not all, with the result that a transaction might be considered
committed for some purposes before it became committed for others.
Per example found by Jan Wieck.
2005-05-07 21:23:49 +00:00
Tom Lane 68ab4de905 Stamp release 7.2.8. 2005-05-05 20:10:08 +00:00
Tom Lane ffac21ec13 Make standalone backends ignore pg_database.datallowconn, so that there
is a way to recover from disabling connections to all databases at once.
2005-05-05 19:54:13 +00:00
Neil Conway a4c3f7dd19 GCC 4.0 includes a new warning option, -Wformat-literal, that emits
a warning when a variable is used as a format string for printf()
and similar functions (if the variable is derived from untrusted
data, it could include unexpected formatting sequences). This
emits too many warnings to be enabled by default, but it does
flag a few dubious constructs in the Postgres tree. This patch
fixes up the obvious variants: functions that are passed a variable
format string but no additional arguments.

This patch fixes a bug in pg_dump (triggers with formatting sequences
in their names are not dumped correctly) and some related pg_dump
code that looks dubious; cleanups for more harmless instances have
been applied to more recent branches. This patch also fixes an
additional format string bug that is present in 7.2 but not in later
releases: pg_dump would also fail to correctly dump indexes with
formatting sequences in their names.
2005-04-30 09:08:14 +00:00
Neil Conway 6dce59ced9 This patch fixes a bug in the error message emitted by pg_restore on an
incorrect -F argument: write_msg() expects its first parameter to be a
"module name", not the format string.
2005-04-30 08:01:58 +00:00
Tom Lane 9524c6b8ae Repair two TIME WITH TIME ZONE bugs found by Dennis Vshivkov. Comparison
of timetz values misbehaved in --enable-integer-datetime cases, and
EXTRACT(EPOCH) subtracted the zone instead of adding it in all cases.
Backpatch to all supported releases (except --enable-integer-datetime code
does not exist in 7.2).
2005-04-23 22:54:23 +00:00
Tom Lane 6fbda16518 Don't try to run clauseless index scans on index types that don't support
it.  Per report from Marinos Yannikos.
2005-04-20 21:48:39 +00:00
Tom Lane bdb2d697a7 Prevent to_char(interval) from dumping core on month-related formats
when a zero-month interval is given.  Per discussion with Karel.
2005-03-26 00:42:56 +00:00
Neil Conway 826f14f6d3 Some builds (depends on crypto engine support?) of OpenSSL
0.9.7x have EVP_DigestFinal function which which clears all of
EVP_MD_CTX.  This makes pgcrypto crash in functions which
re-use one digest context several times: hmac() and crypt()
with md5 algorithm.

Following patch fixes it by carring the digest info around
EVP_DigestFinal and re-initializing cipher.

Marko Kreen.
2005-03-13 23:46:27 +00:00
Neil Conway 5e72d01d20 Update contrib/pgcrypto in 7.3 and 7.2 branches to avoid problems with
recent versions of OpenSSL. From Marko Kreen.
2005-03-13 23:42:07 +00:00
Tom Lane 46ace73498 Back-patch Neil's four additional buffer overrun checks. 2005-02-08 18:22:54 +00:00
Tom Lane ebe0341927 Recommend security@postgresql.org as the contact point for security-related bugs. 2005-01-30 21:32:38 +00:00
Tom Lane bcc1c7b1ea Stamp release 7.2.7. 2005-01-30 20:32:42 +00:00
Tom Lane 2c03786309 Make sure contrib C functions are marked strict where needed.
Kris Jurka
2005-01-29 22:36:03 +00:00
Neil Conway 9eeeb9809e Backpatch fix for buffer overrun in parsing refcursor parameters to
REL7_2_STABLE.
2005-01-27 01:52:34 +00:00
Neil Conway 13fab5b3ad Mark the text_soundex() function as "strict", to avoid crashing on NULL
input. Also, may as well mark it "cacheable" as well. From Kris Jurka.
2005-01-26 08:25:46 +00:00
Tom Lane ae5b7a0c5b Disallow LOAD to non-superusers. Per report from John Heasman. 2005-01-24 17:46:58 +00:00
Tom Lane 66bb44cf63 The result of a FULL or RIGHT join can't be assumed to be sorted by the
left input's sorting, because null rows may be inserted at various points.
Per report from Ferenc Lutischá¸n.
2005-01-23 02:26:05 +00:00
Tom Lane 2b47146a07 interval_out failed to mention 'ago' for negative intervals in SQL and
GERMAN datestyles.  Ancient bug reported by Terry Lee Tucker.
2005-01-11 18:34:41 +00:00
Tom Lane 643bb8125c Back-patch removal of extraneous semicolon, so that this will build
with recent bisons (if anyone still cares).
2004-10-24 23:02:41 +00:00
Tom Lane 6452043ec8 Stamp release 7.2.6. 2004-10-22 00:27:34 +00:00
Tom Lane 6acddf56b4 Prevent pg_ctl from being run as root. Since it uses configuration files
owned by postgres, doing "pg_ctl start" as root could allow a privilege
escalation attack, as pointed out by iDEFENSE.  Of course the postmaster would
fail, but we ought to fail a little sooner to protect sysadmins unfamiliar
with Postgres.  The chosen fix is to disable root use of pg_ctl in all cases,
just to be confident there are no other holes.
2004-10-22 00:24:39 +00:00
Tom Lane 02571d4e20 Back-patch make_oidjoins_check security improvement. 2004-10-21 17:12:35 +00:00
Tom Lane 6b3d751747 Repair possible failure to update hint bits back to disk, per
http://archives.postgresql.org/pgsql-hackers/2004-10/msg00464.php.
I plan a more permanent fix in HEAD, but for the back branches it seems
best to just touch the places that actually have a problem.
2004-10-13 22:22:41 +00:00
Tom Lane 7b0919047f Fix breakage in hashjoin from recent backpatch of left-join bug fix.
(That's what I get for not testing the back branches *before* committing.)
2004-10-13 21:56:14 +00:00
Tom Lane 44ed69c8f3 Hashed LEFT JOIN would miss outer tuples with no inner match if the join
was large enough to be batched and the tuples fell into a batch where
there were no inner tuples at all.  Thanks to Xiaoyu Wang for finding a
test case that exposed this long-standing bug.
2004-09-17 18:29:40 +00:00
Tom Lane a59084fe5e Update 7.2 regression tests to match what you get when using a modern
version of Bison.
2004-08-19 20:03:49 +00:00
Tom Lane 9f7cf9c0a6 Stamp 7.2.5. 2004-08-15 01:23:30 +00:00
Tom Lane d0b776b2be Fix failure to guarantee that a checkpoint will write out pg_clog updates
for transaction commits that occurred just before the checkpoint.  This is
an EXTREMELY serious bug --- kudos to Satoshi Okada for creating a
reproducible test case to prove its existence.
2004-08-11 04:09:14 +00:00
Tom Lane fbec0d7e94 Repair multiple memory leaks in getTables(), including one that could
easily exhaust memory on databases with more than a few hundred triggers.
I don't expect any more releases of these old versions, but let's put the
fix in CVS just so it's archived.
2004-03-20 18:12:32 +00:00
Tom Lane 5925377401 Fix longstanding error in _bt_search(): should moveright at top of loop not
bottom.  Otherwise we fail to moveright when the root page was split while
we were "in flight" to it.  This is not a significant problem when the root
is above the leaf level, but if the root was also a leaf (ie, a single-page
index just got split) we may return the wrong leaf page to the caller,
resulting in failure to find a key that is in fact present.  Bug has existed
at least since 7.1, probably forever.
2003-07-29 22:18:53 +00:00
Tom Lane 90011a8918 Fix a *second* buffer overrun bug in to_ascii(). Grumble. 2003-07-14 16:41:56 +00:00
Tom Lane e3859d1ad9 Second try at avoiding conflicts with system isblank(). 2003-04-13 04:07:43 +00:00
Tom Lane afed1af696 Guard against macro versions of isblank(). 2003-04-12 22:28:45 +00:00
Tom Lane 680dc79f17 Add #include <errno.h> per recent reports that it's now necessary on
RHL 9.  (Not clear why it didn't break long before, actually...)
2003-04-11 20:51:27 +00:00
Tom Lane 07b776f52f Fix buffer overrun in to_ascii(), per report from Guido Notari. 2003-04-02 21:08:14 +00:00
Tom Lane 28afe6f8ef TestConfiguration returns int, not bool. This mistake is relatively
harmless on signed-char machines but would lead to core dump in the
deadlock detection code if char is unsigned.  Amazingly, this bug has
been here since 7.1 and yet wasn't reported till now.  Thanks to Robert
Bruccoleri for providing the opportunity to track it down.
2003-03-31 20:33:09 +00:00