1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-28 05:21:27 +03:00

14450 Commits

Author SHA1 Message Date
Tom Lane
26f1202ca3 Back-patch fixes for problems with VACUUM destroying t_ctid chains too soon,
and with insufficient paranoia in code that follows t_ctid links.
This patch covers the 7.3 branch.
2005-08-26 20:07:17 +00:00
Tom Lane
d5bd53c2c5 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:32:34 +00:00
Tom Lane
bec2f429af Reject operator names >= NAMEDATALEN characters. These will not work
anyway, and in assert-enabled builds you are likely to get an assertion
failure.  Backpatch as far as 7.3; 7.2 seems not to have the problem.
2005-08-16 00:48:58 +00:00
Tom Lane
f739566069 int_array_enum function should be using fcinfo->flinfo->fn_extra for
working state, not fcinfo->context.  Silly oversight on my part in last
go-round of fixes.
2005-08-15 19:05:58 +00:00
Tom Lane
76f39619d7 Fix bogus backslash sequences, per Kris Jurka. 2005-07-18 17:48:30 +00:00
Tom Lane
5394771580 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:54:30 +00:00
Tom Lane
509741d3d5 Looks like cube_1 variant is also needed in 7.3 branch.
(Don't bother adding it in 7.2, though, since pg_regress doesn't
have the capability to use it that far back.
2005-07-17 17:36:56 +00:00
Tom Lane
cb083b26d5 Adjust alter_table regression test to avoid conflicts with rangefuncs
and prepare tests, which cause intermittent failures in parallel test
mode.  Back-port of fix originally applied to 8.0 and 7.4 branches;
the problems do not appear to exist in 7.2 branch but they do occur
in 7.3.  Per buildfarm results.
2005-07-17 17:26:31 +00:00
Tom Lane
2401cfa155 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:01:50 +00:00
Tom Lane
24ede218a1 Fix bogus "extern int errno;" in back branches, per Andrew Dunstan. 2005-07-16 15:23:37 +00:00
Tom Lane
f3d95f3c7f Fix mis-backport of libpq memory leak fix. Per Michael Fuhr. 2005-07-14 14:07:50 +00:00
Tom Lane
32f9bc6f7d Fix libpq memory leak during PQreset() --- closePGconn() was not
freeing all transient state of the PGconn object.
2005-07-13 15:26:25 +00:00
Tom Lane
d53f22de86 Make libpq_gettext save and restore errno in a Windows-compatible way.
Also, back-patch fix into back branches.
2005-07-08 15:25:36 +00:00
Tom Lane
577759f8bf Fix ancient memory leak in index_create(): RelationInitIndexAccessInfo
was being called twice in normal operation, leading to a leak of one set
of relcache subsidiary info.  Per report from Jeff Gold.
2005-06-25 16:54:30 +00:00
Tom Lane
19cc0c4faf 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:06 +00:00
Tom Lane
d4b7dfacfa 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:37 +00:00
Tatsuo Ishii
8154f06301 Fix bug in MIC -> EUC_JP conversion. Per Atsushi Ogawa. 2005-06-11 07:44:40 +00:00
Tom Lane
7ef90f5aad Code for SET/SHOW TIME ZONE with a fixed-interval timezone was not
prepared for HAVE_INT64_TIMESTAMP.  Per report from Guillaume Beaudoin.
2005-06-05 01:49:06 +00:00
Tom Lane
cd48aa0e96 Push enable/disable of notify and catchup interrupts all the way down
to just around the bare recv() call that gets a command from the client.
The former placement in PostgresMain was unsafe because the intermediate
processing layers (especially SSL) use facilities such as malloc that are
not necessarily re-entrant.  Per report from counterstorm.com.
2005-06-02 21:04:30 +00:00
Tom Lane
2e1229671a 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:14 +00:00
Tom Lane
4f142baf37 expandRTE and get_rte_attribute_type mistakenly always imputed typmod -1
to columns of an RTE that was a function returning RECORD with a column
definition list.  Apparently no one has tried to use non-default typmod
with a function returning RECORD before.
2005-05-29 17:11:07 +00:00
Tatsuo Ishii
5454eb0456 Fix previous patch to exprTypmod. 2005-05-25 02:03:52 +00:00
Tatsuo Ishii
8f5702ebd5 Inserting 5 characters into char(10) does not produce 5 padding spaces
if they are two-byte multibyte characters. Same thing can be happen
if octet_length(multibyte_chars) == n where n is char(n).
Long standing bug since 7.3 days. Per report and fix from Yoshiyuki Asaba.
2005-05-24 23:52:02 +00:00
Tom Lane
e3d0bd8d48 Guard against duplicate IDs in input file in SortTocFromFile().
Per report from Brian Hackett.
2005-05-17 17:31:15 +00:00
Tom Lane
e5921b3230 Update release notes for upcoming re-releases. REL7_3_10 2005-05-09 00:10:35 +00:00
Tom Lane
dc9e82d0e6 Update release checklist to reflect that HISTORY and INSTALL don't
need to be created by hand anymore.
2005-05-08 23:34:44 +00:00
Tom Lane
54d314c93c The release process is now generating HISTORY/INSTALL on the fly in
the 7.3 branch as well as later branches ... so no need to update
manually.
2005-05-08 23:32:37 +00:00
Tom Lane
ad12a7b9e2 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:33:47 +00:00
Tom Lane
4beb9cd5eb 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:24 +00:00
Tom Lane
07e3879c95 Stamp release 7.3.10. 2005-05-05 20:09:12 +00:00
Tom Lane
5d0d60efe6 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:01 +00:00
Tom Lane
ecbc6dd3e9 Alter the signature for encoding conversion functions to declare the
output area as INTERNAL not CSTRING.  This is to prevent people from
calling the functions by hand.  This is a permanent solution for the
back branches but I hope it is just a stopgap for HEAD.
2005-05-03 19:18:48 +00:00
Neil Conway
0d8cdcfe88 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.
2005-04-30 08:42:17 +00:00
Neil Conway
8f54b05551 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:29 +00:00
Tom Lane
2cfb3b6d4d 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:03 +00:00
Tom Lane
ca1e578d62 int_aggregate's int_enum() doesn't work correctly with arrays that
aren't 1-D, so give an error message instead of failing.  Per report
from Ron Mayer.
2005-04-23 05:39:19 +00:00
Tom Lane
daa7e6604c 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:31 +00:00
Tom Lane
7735c39aa0 Fix mis-display of negative fractional seconds in interval values for
--enable-integer-datetimes case.  Per report from Oliver Siegmar.
2005-04-20 17:15:19 +00:00
Tom Lane
aa4762e7c8 Don't try to constant-fold functions returning RECORD, since the optimizer
isn't presently set up to pass them an expected tuple descriptor.  Bug has
been there since 7.3 but was just recently reported by Thomas Hallgren.
2005-04-14 21:44:46 +00:00
Tom Lane
536b3af7e3 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:44 +00:00
Tom Lane
ce49ae9041 Previous "64-bit fix" for intagg didn't actually work. This is already
fixed properly in CVS tip, but we need a band-aid for back branches.
Per report from Ron Mayer.
2005-03-23 19:07:18 +00:00
Neil Conway
acb42e9cb9 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:45:56 +00:00
Neil Conway
638eb4938c 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:41:44 +00:00
Tom Lane
013d778e32 Back-patch Neil's four additional buffer overrun checks. 2005-02-08 18:22:45 +00:00
Tom Lane
d40cda00f5 Recommend security@postgresql.org as the contact point for security-related bugs. REL7_3_9 2005-01-30 21:32:20 +00:00
Tom Lane
7929303d61 Stamp release 7.3.9. 2005-01-30 20:08:15 +00:00
Tom Lane
24162978b7 Make sure contrib C functions are marked strict where needed.
Kris Jurka
2005-01-29 22:35:53 +00:00
Tom Lane
1263d7b8d1 Check that aggregate creator has the right to execute the transition
functions of the aggregate, at both aggregate creation and execution times.
2005-01-27 23:43:45 +00:00
Tom Lane
64e3271ebc Now that I look at it, int_array_enum() didn't work either. 2005-01-27 21:50:23 +00:00
Tom Lane
05dadca2a0 Fix security and 64-bit issues in contrib/intagg. This code could
stand to be rewritten altogether, but for now just stick a finger in
the dike.
2005-01-27 21:36:10 +00:00