]> granicus.if.org Git - postgresql/log
postgresql
18 years agoFix markup because older releases couldn't like to refernce pages. REL7_3_17
Bruce Momjian [Sat, 6 Jan 2007 04:15:43 +0000 (04:15 +0000)]
Fix markup because older releases couldn't like to refernce pages.

18 years agoFix markup because lc_numeric didn't have an SGML tag in this release.
Bruce Momjian [Sat, 6 Jan 2007 03:14:18 +0000 (03:14 +0000)]
Fix markup because lc_numeric didn't have an SGML tag in this release.

18 years agotag for 7.3.17 ...
PostgreSQL Daemon [Sat, 6 Jan 2007 02:25:19 +0000 (02:25 +0000)]
tag for 7.3.17 ...

18 years agoMinor copy-editing for release note updates.
Tom Lane [Fri, 5 Jan 2007 22:35:22 +0000 (22:35 +0000)]
Minor copy-editing for release note updates.

18 years agoStamp release 7.3.17.
Bruce Momjian [Fri, 5 Jan 2007 20:52:58 +0000 (20:52 +0000)]
Stamp release 7.3.17.

18 years agoCreate release notes for 7.3.17.
Bruce Momjian [Fri, 5 Jan 2007 20:02:22 +0000 (20:02 +0000)]
Create release notes for 7.3.17.

18 years agoFix regex_fixed_prefix() to cope reasonably well with regex patterns of the
Tom Lane [Wed, 3 Jan 2007 22:40:04 +0000 (22:40 +0000)]
Fix regex_fixed_prefix() to cope reasonably well with regex patterns of the
form '^(foo)$'.  Before, these could never be optimized into indexscans.
The recent changes to make psql and pg_dump generate such patterns (for \d
commands and -t and related switches, respectively) therefore represented
a big performance hit for people with large pg_class catalogs, as seen in
recent gripe from Erik Jones.  While at it, be more paranoid about
case-sensitivity checking in multibyte encodings, and fix some other
corner cases in which a regex might be interpreted too liberally.

18 years agoRepair bug #2839: the various ExecReScan functions need to reset
Tom Lane [Tue, 26 Dec 2006 19:27:26 +0000 (19:27 +0000)]
Repair bug #2839: the various ExecReScan functions need to reset
ps_TupFromTlist in plan nodes that make use of it.  This was being done
correctly in join nodes and Result nodes but not in any relation-scan nodes.
Bug would lead to bogus results if a set-returning function appeared in the
targetlist of a subquery that could be rescanned after partial execution,
for example a subquery within EXISTS().  Bug has been around forever :-(
... surprising it wasn't reported before.

18 years agoMark to_number() and the numeric-type variants of to_char() as stable, not
Tom Lane [Tue, 28 Nov 2006 19:19:25 +0000 (19:19 +0000)]
Mark to_number() and the numeric-type variants of to_char() as stable, not
immutable, because their results depend on lc_numeric; this is a longstanding
oversight.  We cannot force initdb for this in the back branches, but we can
at least provide correct catalog entries for future installations.

18 years agoFix 1-byte buffer overrun when OID exceeds 1 billion. This probably can't
Tom Lane [Wed, 22 Nov 2006 21:13:16 +0000 (21:13 +0000)]
Fix 1-byte buffer overrun when OID exceeds 1 billion.  This probably can't
cause any serious harm in normal cases, but if you have gcc buffer overrun
checking turned on, that will notice.  Found by Jack Orenstein.  Problem
was already fixed in CVS HEAD.

18 years agoStamp 7.3.16. REL7_3_16
Tom Lane [Thu, 12 Oct 2006 19:42:21 +0000 (19:42 +0000)]
Stamp 7.3.16.

18 years agoA bit of copy-editing on back-branch release notes.
Tom Lane [Wed, 11 Oct 2006 20:56:31 +0000 (20:56 +0000)]
A bit of copy-editing on back-branch release notes.

18 years agoFix psql \d commands to behave properly when a pattern using regex | is given.
Tom Lane [Tue, 10 Oct 2006 16:15:42 +0000 (16:15 +0000)]
Fix psql \d commands to behave properly when a pattern using regex | is given.
Formerly they'd emit '^foo|bar$' which is wrong because the anchors are
parsed as part of the alternatives; must emit '^(foo|bar)$' to get expected
behavior.  Same as bug found previously in similar_escape().  Already fixed
in HEAD, this is just back-porting the part of that patch that was a bug fix.

18 years agoUpdate libpq.rc for 7.3.16 and 7.4.14. Later releases use libpq.rc.in,
Bruce Momjian [Tue, 10 Oct 2006 00:19:51 +0000 (00:19 +0000)]
Update libpq.rc for 7.3.16 and 7.4.14.  Later releases use libpq.rc.in,
which was already updated.

18 years agoStamp releases 7.3.16, 7.4.14, 8.0.9, and 8.1.5.
Bruce Momjian [Mon, 9 Oct 2006 23:38:14 +0000 (23:38 +0000)]
Stamp releases 7.3.16, 7.4.14, 8.0.9, and 8.1.5.

18 years agoUpdate release notes for releases 7.3.16, 7.4.14, 8.0.9, and 8.1.5.
Bruce Momjian [Mon, 9 Oct 2006 23:22:58 +0000 (23:22 +0000)]
Update release notes for releases 7.3.16, 7.4.14, 8.0.9, and 8.1.5.

18 years agoFix back-branch pg_regress scripts to try the "canonical" expected file if we
Tom Lane [Mon, 9 Oct 2006 01:46:04 +0000 (01:46 +0000)]
Fix back-branch pg_regress scripts to try the "canonical" expected file if we
tried a variant file from resultmap and it didn't match.  This is already done
in HEAD's C-code version, and is needed because OpenBSD has recently migrated
to a more standard handling of float underflow --- see buildfarm results
from emu.

18 years agoFix ancient oversight in psql's \d pattern processing code: when seeing two
Tom Lane [Sat, 7 Oct 2006 22:22:04 +0000 (22:22 +0000)]
Fix ancient oversight in psql's \d pattern processing code: when seeing two
quote chars inside quote marks, should emit one quote *and stay in inquotes
mode*.  No doubt the lack of reports of this have something to do with the
poor documentation of the feature ...

18 years agoClean up rather sloppy fix in HEAD for the ancient bug that CREATE CONVERSION
Tom Lane [Thu, 31 Aug 2006 17:32:01 +0000 (17:32 +0000)]
Clean up rather sloppy fix in HEAD for the ancient bug that CREATE CONVERSION
didn't create a dependency from the new conversion to its schema.  Back-patch
to all supported releases.

18 years agoFix bug introduced by last patch, thanks again to Mario Weilguni <mweilguni@sime...
Teodor Sigaev [Tue, 8 Aug 2006 15:46:31 +0000 (15:46 +0000)]
Fix bug introduced by last patch, thanks again to Mario Weilguni <mweilguni@sime.com>

18 years agofix bug about modifying value in shared buffer,
Teodor Sigaev [Mon, 7 Aug 2006 17:42:54 +0000 (17:42 +0000)]
fix bug about modifying value in shared buffer,
what was a reason to corrupt index.
Thank to Mario Weilguni <mweilguni@sime.com> to
discover a bug.

18 years agoA recent backpatch to 7.3's contrib/ltree got mixed up, putting code in
Neil Conway [Fri, 14 Jul 2006 00:32:46 +0000 (00:32 +0000)]
A recent backpatch to 7.3's contrib/ltree got mixed up, putting code in
the wrong place.  This moves it to the right place which allows it to
compile. Patch from Kris Jurka.

18 years agoFix bug corrupting query in gist consistent function.
Teodor Sigaev [Tue, 11 Jul 2006 16:11:06 +0000 (16:11 +0000)]
Fix bug corrupting query in gist consistent function.
Thank to Mario Weilguni <mweilguni@sime.com> to discover a bug.

18 years agoFix dbmirror for new backslash escaping:
Bruce Momjian [Thu, 6 Jul 2006 02:02:36 +0000 (02:02 +0000)]
Fix dbmirror for new backslash escaping:

Martin Pitt [2006-06-16  0:15 +0200]:
> Upstream confirmed my reply in the last mail in [1]: the complete
> escaping logic in DBMirror.pl is seriously screwew.
>
> [1] http://archives.postgresql.org/pgsql-bugs/2006-06/msg00065.php

I finally found some time to debug this, and I think I found a better
patch than the one you proposed. Mine is still hackish and is still a
workaround around a proper quoting solution, but at least it repairs
the parsing without introducing the \' quoting again.

I consider this a band-aid patch to fix the recent security update.
PostgreSQL gurus, would you consider applying this until a better
solution is found for DBMirror.pl?

Martin Pitt        http://www.piware.de

18 years agoBack-patch 7.4-era fix for memory leak with SSL connections due to
Tom Lane [Fri, 23 Jun 2006 14:42:52 +0000 (14:42 +0000)]
Back-patch 7.4-era fix for memory leak with SSL connections due to
missing X509_free() calls.  Per a request from a Red Hat customer;
seems silly for Red Hat to be shipping a patch that's not in upstream.

18 years agoBack-port Postgres 7.4 spinlock code into 7.3 branch. This adds
Tom Lane [Thu, 1 Jun 2006 23:18:11 +0000 (23:18 +0000)]
Back-port Postgres 7.4 spinlock code into 7.3 branch.  This adds
previously-missing spinlock code for x86_64 and ppc64 architectures,
converts the ppc/ppc64 code into gcc inlines, and provides a better
spinlock backoff algorithm on all architectures.  Aside from being
almost identical to the community 7.4 source code, this exact patch
has been in use for awhile in Red Hat's RHEL3 RPMs, so I have pretty
good confidence in it.  Why bother, you ask?  I'm taking pity on a
couple of buildfarm members that have been vainly trying to build 7.3
on these 64-bit architectures.

18 years agoPre-8.0 branches need to cope with possibility that the system libc knows
Tom Lane [Thu, 1 Jun 2006 04:10:33 +0000 (04:10 +0000)]
Pre-8.0 branches need to cope with possibility that the system libc knows
about the recent changes in US DST law.  Add a variant horology file, so
that either the old or new rules will be considered valid test results.

18 years agoStamp release 7.3.15. REL7_3_15
Tom Lane [Sun, 21 May 2006 21:54:31 +0000 (21:54 +0000)]
Stamp release 7.3.15.

18 years agoUpdate release notes for upcoming releases.
Tom Lane [Sun, 21 May 2006 21:50:14 +0000 (21:50 +0000)]
Update release notes for upcoming releases.

18 years agoStamp releases 7.3.15, 7.4.13, and 8.0.8.
Bruce Momjian [Sun, 21 May 2006 20:28:22 +0000 (20:28 +0000)]
Stamp releases 7.3.15, 7.4.13, and 8.0.8.

18 years agoModify libpq's string-escaping routines to be aware of encoding considerations
Tom Lane [Sun, 21 May 2006 20:20:48 +0000 (20:20 +0000)]
Modify libpq's string-escaping routines to be aware of encoding considerations
and standard_conforming_strings.  The encoding changes are needed for proper
escaping in multibyte encodings, as per the SQL-injection vulnerabilities
noted in CVE-2006-2313 and CVE-2006-2314.  Concurrent fixes are being applied
to the server to ensure that it rejects queries that may have been corrupted
by attempted SQL injection, but this merely guarantees that unpatched clients
will fail rather than allow injection.  An actual fix requires changing the
client-side code.  While at it we have also fixed these routines to understand
about standard_conforming_strings, so that the upcoming changeover to SQL-spec
string syntax can be somewhat transparent to client code.

Since the existing API of PQescapeString and PQescapeBytea provides no way to
inform them which settings are in use, these functions are now deprecated in
favor of new functions PQescapeStringConn and PQescapeByteaConn.  The new
functions take the PGconn to which the string will be sent as an additional
parameter, and look inside the connection structure to determine what to do.
So as to provide some functionality for clients using the old functions,
libpq stores the latest encoding and standard_conforming_strings values
received from the backend in static variables, and the old functions consult
these variables.  This will work reliably in clients using only one Postgres
connection at a time, or even multiple connections if they all use the same
encoding and string syntax settings; which should cover many practical
scenarios.

Clients that use homebrew escaping methods, such as PHP's addslashes()
function or even hardwired regexp substitution, will require extra effort
to fix :-(.  It is strongly recommended that such code be replaced by use of
PQescapeStringConn/PQescapeByteaConn if at all feasible.

18 years agoAdd a new GUC parameter backslash_quote, which determines whether the SQL
Tom Lane [Sun, 21 May 2006 20:12:20 +0000 (20:12 +0000)]
Add a new GUC parameter backslash_quote, which determines whether the SQL
parser will allow "\'" to be used to represent a literal quote mark.  The
"\'" representation has been deprecated for some time in favor of the
SQL-standard representation "''" (two single quote marks), but it has been
used often enough that just disallowing it immediately won't do.  Hence
backslash_quote allows the settings "on", "off", and "safe_encoding",
the last meaning to allow "\'" only if client_encoding is a valid server
encoding.  That is now the default, and the reason is that in encodings
such as SJIS that allow 0x5c (ASCII backslash) to be the last byte of a
multibyte character, accepting "\'" allows SQL-injection attacks as per
CVE-2006-2314 (further details will be published after release).  The
"on" setting is available for backward compatibility, but it must not be
used with clients that are exposed to untrusted input.

Thanks to Akio Ishida and Yasuo Ohgaki for identifying this security issue.

18 years agoChange the backend to reject strings containing invalidly-encoded multibyte
Tom Lane [Sun, 21 May 2006 20:07:13 +0000 (20:07 +0000)]
Change the backend to reject strings containing invalidly-encoded multibyte
characters in all cases.  Formerly we mostly just threw warnings for invalid
input, and failed to detect it at all if no encoding conversion was required.
The tighter check is needed to defend against SQL-injection attacks as per
CVE-2006-2313 (further details will be published after release).  Embedded
zero (null) bytes will be rejected as well.  The checks are applied during
input to the backend (receipt from client or COPY IN), so it no longer seems
necessary to check in textin() and related routines; any string arriving at
those functions will already have been validated.  Conversion failure
reporting (for characters with no equivalent in the destination encoding)
has been cleaned up and made consistent while at it.

Also, fix a few longstanding errors in little-used encoding conversion
routines: win1251_to_iso, win866_to_iso, euc_tw_to_big5, euc_tw_to_mic,
mic_to_euc_tw were all broken to varying extents.

Patches by Tatsuo Ishii and Tom Lane.  Thanks to Akio Ishida and Yasuo Ohgaki
for identifying the security issues.

18 years agoChange \' to '', for SQL standards compliance. Backpatch to 7.3, 7.4,
Bruce Momjian [Sun, 21 May 2006 19:56:41 +0000 (19:56 +0000)]
Change \' to '', for SQL standards compliance.  Backpatch to 7.3, 7.4,
and 8.0.  Later releases already patched.

18 years agoFix the sense of the test on DH_check()'s return value. This was preventing
Tom Lane [Fri, 12 May 2006 22:45:06 +0000 (22:45 +0000)]
Fix the sense of the test on DH_check()'s return value.  This was preventing
custom-generated DH parameters from actually being used by the server.
Found by Michael Fuhr.

18 years agoRemove unnecessary .seg/.section directives, per Alan Stange.
Tom Lane [Thu, 11 May 2006 22:00:12 +0000 (22:00 +0000)]
Remove unnecessary .seg/.section directives, per Alan Stange.

18 years agoFix ancient memory leak in PQprintTuples(); our code no longer uses this
Tom Lane [Wed, 19 Apr 2006 16:16:08 +0000 (16:16 +0000)]
Fix ancient memory leak in PQprintTuples(); our code no longer uses this
routine, but perhaps some applications do.  Found by Martijn van Oosterhout
using Coverity.

19 years agoMinor teak.
Tatsuo Ishii [Sat, 4 Mar 2006 12:35:08 +0000 (12:35 +0000)]
Minor teak.

19 years agoTighten up SJIS byte sequence check. Now we reject invalid SJIS byte
Tatsuo Ishii [Sat, 4 Mar 2006 12:32:59 +0000 (12:32 +0000)]
Tighten up SJIS byte sequence check. Now we reject invalid SJIS byte
sequence such as "0x95 0x27". Patches from Akio Ishida.

19 years agoFix three Python reference leaks in PLy_traceback(). This would result
Neil Conway [Mon, 20 Feb 2006 20:10:48 +0000 (20:10 +0000)]
Fix three Python reference leaks in PLy_traceback(). This would result
in leaking memory when invoking a PL/Python procedure that raises an
exception. Unfortunately this still leaks memory, but at least the
largest leak has been plugged.

This patch also fixes a reference counting mistake in PLy_modify_tuple()
for 8.0, 8.1 and HEAD: we don't actually own a reference to `platt', so
we shouldn't Py_DECREF() it.

19 years agoPatch from Marko Kreen:
Neil Conway [Sat, 18 Feb 2006 20:49:02 +0000 (20:49 +0000)]
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.

19 years agoStamp 7.3.14. REL7_3_14
Tom Lane [Sun, 12 Feb 2006 22:38:54 +0000 (22:38 +0000)]
Stamp 7.3.14.

19 years agoUpdate release notes.
Tom Lane [Sun, 12 Feb 2006 22:36:16 +0000 (22:36 +0000)]
Update release notes.

19 years agoFix bug in SET SESSION AUTHORIZATION that allows unprivileged users to crash
Tom Lane [Sun, 12 Feb 2006 22:33:47 +0000 (22:33 +0000)]
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.

19 years agoUpdate FAQ latest version
Bruce Momjian [Sun, 12 Feb 2006 18:50:07 +0000 (18:50 +0000)]
Update FAQ latest version

19 years agoStamp releases for 2006-02-14 release
Bruce Momjian [Sun, 12 Feb 2006 18:41:22 +0000 (18:41 +0000)]
Stamp releases for 2006-02-14 release

19 years agoUpdate release notes for 2006-02-14 release
Bruce Momjian [Sun, 12 Feb 2006 18:23:00 +0000 (18:23 +0000)]
Update release notes for 2006-02-14 release

19 years agoRepair longstanding bug in slru/clog logic: it is possible for two backends
Tom Lane [Sat, 21 Jan 2006 04:38:54 +0000 (04:38 +0000)]
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.

19 years agoRepair "Halloween problem" in EvalPlanQual: a tuple that's been inserted by
Tom Lane [Thu, 12 Jan 2006 21:49:41 +0000 (21:49 +0000)]
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.

19 years agoUse a more bulletproof test for whether finite() and isinf() are present.
Tom Lane [Thu, 12 Jan 2006 19:24:48 +0000 (19:24 +0000)]
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.

19 years agoFix pg_dump to add the required OPERATOR() decoration to schema-qualified
Tom Lane [Mon, 9 Jan 2006 21:16:57 +0000 (21:16 +0000)]
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 :-(

19 years agoFix failure to apply domain constraints to a NULL constant that's added to
Tom Lane [Fri, 6 Jan 2006 20:11:36 +0000 (20:11 +0000)]
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.

19 years agoRelease-note updates and copy editing. REL7_3_13
Tom Lane [Fri, 6 Jan 2006 03:00:46 +0000 (03:00 +0000)]
Release-note updates and copy editing.

19 years agoGenerate back-branch configure scripts with the appropriate version of autoconf.
Tom Lane [Fri, 6 Jan 2006 02:31:25 +0000 (02:31 +0000)]
Generate back-branch configure scripts with the appropriate version of autoconf.

19 years agoNew pgcrypto item wording.
Bruce Momjian [Thu, 5 Jan 2006 15:17:08 +0000 (15:17 +0000)]
New pgcrypto item wording.

19 years agoWording improvements.
Bruce Momjian [Thu, 5 Jan 2006 15:11:07 +0000 (15:11 +0000)]
Wording improvements.

19 years agoImprove markup.
Bruce Momjian [Thu, 5 Jan 2006 14:52:40 +0000 (14:52 +0000)]
Improve markup.

19 years ago*** empty log message ***
Bruce Momjian [Thu, 5 Jan 2006 05:21:40 +0000 (05:21 +0000)]
*** empty log message ***

19 years agoStamp release 7.3.13.
Bruce Momjian [Thu, 5 Jan 2006 03:59:21 +0000 (03:59 +0000)]
Stamp release 7.3.13.

19 years agoArrange to set the LC_XXX environment variables to match our locale setup.
Tom Lane [Thu, 5 Jan 2006 00:55:36 +0000 (00:55 +0000)]
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.

19 years agoAdd port support for unsetenv() in back branches. Needed for locale
Tom Lane [Thu, 5 Jan 2006 00:51:52 +0000 (00:51 +0000)]
Add port support for unsetenv() in back branches.  Needed for locale
environment fix.

19 years agoWhen the remote query result has a different number of columns
Joe Conway [Tue, 3 Jan 2006 23:48:42 +0000 (23:48 +0000)]
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.

19 years agoThere is a signedness bug in Openwall gen_salt code that pgcrypto uses.
Tom Lane [Tue, 3 Jan 2006 23:46:56 +0000 (23:46 +0000)]
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

19 years agoFix long standing Asian multibyte charsets bug.
Tatsuo Ishii [Sat, 24 Dec 2005 12:08:10 +0000 (12:08 +0000)]
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.

19 years agoAdjust string comparison so that only bitwise-equal strings are considered
Tom Lane [Thu, 22 Dec 2005 22:50:29 +0000 (22:50 +0000)]
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.

19 years agoBack-patch 7.4 change to show that freebsd 5 and up don't need
Tom Lane [Thu, 15 Dec 2005 05:43:35 +0000 (05:43 +0000)]
Back-patch 7.4 change to show that freebsd 5 and up don't need
float8-small-is-zero.  Per Mark Kirkwood.

19 years agoRemove unused HAVE_STRUCT_SOCKCRED code, which was causing a duplicate-
Tom Lane [Tue, 13 Dec 2005 03:36:14 +0000 (03:36 +0000)]
Remove unused HAVE_STRUCT_SOCKCRED code, which was causing a duplicate-
variable-definition error on recent FreeBSDen (evidently, that platform
also HAS_STRUCT_CMSGCRED).  Backport of 7.4 fix dated 2003-10-25.

19 years agoStamp 7.3.12. REL7_3_12
Tom Lane [Fri, 9 Dec 2005 20:56:45 +0000 (20:56 +0000)]
Stamp 7.3.12.

19 years agoAdd release notes for back branches (7.3 and up).
Tom Lane [Fri, 9 Dec 2005 20:41:11 +0000 (20:41 +0000)]
Add release notes for back branches (7.3 and up).
Also minor improvements to 8.1.1 release notes.

19 years agoFix stupid bug with sizeof
Teodor Sigaev [Tue, 6 Dec 2005 18:22:09 +0000 (18:22 +0000)]
Fix stupid bug with sizeof

19 years agoAdd regression test to see if the min/max values of int8 convert correctly.
Tom Lane [Mon, 5 Dec 2005 04:14:39 +0000 (04:14 +0000)]
Add regression test to see if the min/max values of int8 convert correctly.

19 years agoProperly document return value of strpos().
Bruce Momjian [Wed, 16 Nov 2005 03:58:08 +0000 (03:58 +0000)]
Properly document return value of strpos().

19 years agoFix longstanding race condition in transaction log management: there was a
Tom Lane [Thu, 3 Nov 2005 00:23:57 +0000 (00:23 +0000)]
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.

19 years agoFix longstanding bug that would sometimes let the planner generate a bad plan
Tom Lane [Tue, 25 Oct 2005 20:30:52 +0000 (20:30 +0000)]
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.

19 years agoPass a strdup'd ident string to openlog(), to ensure that reallocation
Tom Lane [Fri, 14 Oct 2005 16:41:41 +0000 (16:41 +0000)]
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.

19 years agoFix longstanding bug found by Atsushi Ogawa: _bt_check_unique would mark
Tom Lane [Wed, 12 Oct 2005 17:18:45 +0000 (17:18 +0000)]
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.

19 years agoStamp release 7.3.11. REL7_3_11
Tom Lane [Mon, 3 Oct 2005 17:24:27 +0000 (17:24 +0000)]
Stamp release 7.3.11.

19 years agoUpdate release notes for pending back-branch releases.
Tom Lane [Mon, 3 Oct 2005 16:05:29 +0000 (16:05 +0000)]
Update release notes for pending back-branch releases.

19 years agoFix missing rows in query
Teodor Sigaev [Tue, 30 Aug 2005 08:48:16 +0000 (08:48 +0000)]
Fix missing rows in query
update a=.. where a... with GiST index on column 'a'
Backpatch from 8.0 branch

19 years agoBack-patch fixes for problems with VACUUM destroying t_ctid chains too soon,
Tom Lane [Fri, 26 Aug 2005 20:07:17 +0000 (20:07 +0000)]
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.

19 years agoRemove registration message in all the supported back branches;
Tom Lane [Tue, 16 Aug 2005 03:32:34 +0000 (03:32 +0000)]
Remove registration message in all the supported back branches;
we had decided to drop it for 7.4, and no one misses it.

19 years agoReject operator names >= NAMEDATALEN characters. These will not work
Tom Lane [Tue, 16 Aug 2005 00:48:58 +0000 (00:48 +0000)]
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.

19 years agoint_array_enum function should be using fcinfo->flinfo->fn_extra for
Tom Lane [Mon, 15 Aug 2005 19:05:58 +0000 (19:05 +0000)]
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.

19 years agoFix bogus backslash sequences, per Kris Jurka.
Tom Lane [Mon, 18 Jul 2005 17:48:30 +0000 (17:48 +0000)]
Fix bogus backslash sequences, per Kris Jurka.

19 years agoMemSet() must not cast its pointer argument to int32* until after it has
Tom Lane [Mon, 18 Jul 2005 15:54:30 +0000 (15:54 +0000)]
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.

19 years agoLooks like cube_1 variant is also needed in 7.3 branch.
Tom Lane [Sun, 17 Jul 2005 17:36:56 +0000 (17:36 +0000)]
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.

19 years agoAdjust alter_table regression test to avoid conflicts with rangefuncs
Tom Lane [Sun, 17 Jul 2005 17:26:31 +0000 (17:26 +0000)]
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.

19 years agoMark the geometry regression test as an ignorable failure in the pre-7.4
Tom Lane [Sat, 16 Jul 2005 19:01:50 +0000 (19:01 +0000)]
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.

19 years agoFix bogus "extern int errno;" in back branches, per Andrew Dunstan.
Tom Lane [Sat, 16 Jul 2005 15:23:37 +0000 (15:23 +0000)]
Fix bogus "extern int errno;" in back branches, per Andrew Dunstan.

19 years agoFix mis-backport of libpq memory leak fix. Per Michael Fuhr.
Tom Lane [Thu, 14 Jul 2005 14:07:50 +0000 (14:07 +0000)]
Fix mis-backport of libpq memory leak fix.  Per Michael Fuhr.

19 years agoFix libpq memory leak during PQreset() --- closePGconn() was not
Tom Lane [Wed, 13 Jul 2005 15:26:25 +0000 (15:26 +0000)]
Fix libpq memory leak during PQreset() --- closePGconn() was not
freeing all transient state of the PGconn object.

19 years agoMake libpq_gettext save and restore errno in a Windows-compatible way.
Tom Lane [Fri, 8 Jul 2005 15:25:36 +0000 (15:25 +0000)]
Make libpq_gettext save and restore errno in a Windows-compatible way.
Also, back-patch fix into back branches.

19 years agoFix ancient memory leak in index_create(): RelationInitIndexAccessInfo
Tom Lane [Sat, 25 Jun 2005 16:54:30 +0000 (16:54 +0000)]
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.

19 years agoplpgsql's exec_assign_value() freed the old value of a variable before
Tom Lane [Mon, 20 Jun 2005 20:45:06 +0000 (20:45 +0000)]
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.

19 years agoThe random selection in function linear() could deliver a value equal to max
Tom Lane [Tue, 14 Jun 2005 14:21:37 +0000 (14:21 +0000)]
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.

19 years agoFix bug in MIC -> EUC_JP conversion. Per Atsushi Ogawa.
Tatsuo Ishii [Sat, 11 Jun 2005 07:44:40 +0000 (07:44 +0000)]
Fix bug in MIC -> EUC_JP conversion. Per Atsushi Ogawa.

19 years agoCode for SET/SHOW TIME ZONE with a fixed-interval timezone was not
Tom Lane [Sun, 5 Jun 2005 01:49:06 +0000 (01:49 +0000)]
Code for SET/SHOW TIME ZONE with a fixed-interval timezone was not
prepared for HAVE_INT64_TIMESTAMP.  Per report from Guillaume Beaudoin.

19 years agoPush enable/disable of notify and catchup interrupts all the way down
Tom Lane [Thu, 2 Jun 2005 21:04:30 +0000 (21:04 +0000)]
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.

19 years agoAdd test to WAL replay to verify that xl_prev points back to the previous
Tom Lane [Tue, 31 May 2005 19:11:14 +0000 (19:11 +0000)]
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.

19 years agoexpandRTE and get_rte_attribute_type mistakenly always imputed typmod -1
Tom Lane [Sun, 29 May 2005 17:11:07 +0000 (17:11 +0000)]
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.