https://github.com/postgres/postgres

sort by:
Revision Author Date Message Commit Date
c87a4d3 tag 8.3.7 13 March 2009, 02:08:41 UTC
894fc06 Update back-branch release notes. 12 March 2009, 22:35:57 UTC
253cd65 Translation updates 12 March 2009, 13:19:06 UTC
abc48be Fix core dump due to null-pointer dereference in to_char() when datetime format codes are misapplied to a numeric argument. (The code still produces a pretty bogus error message in such cases, but I'll settle for stopping the crash for now.) Per bug #4700 from Sergey Burladyan. Problem exists in all supported branches, so patch all the way back. In HEAD, also clean up some ugly coding in the nearby cache management code. 12 March 2009, 00:53:32 UTC
9a1dd6e Remove pg_trace.h inclusion from c.h and add it to the .c files that need it. Only needed in 8.3 because it's already this way in HEAD, and older branches did not support DTrace. This allows external modules to compile on Linux machines where SystemTap support was recently added, when the required SystemTap headers are not present on the build machine. Approach suggested by Tom, after a RPM build trouble report by Devrim Gunduz. 11 March 2009, 00:08:07 UTC
6f7e1d1 Fix set_subquery_pathlist() to copy the RTE's subquery before it gets mangled by the planning process. This prevents the "failed to locate grouping columns" error recently reported by Dickson Guedes. That happens because planning replaces SubLinks by SubPlans in the subquery's targetlist, and exprTypmod() is smarter about the former than the latter, causing the apparent type of the subquery's output columns to change. This seems to be a deficiency we should fix in exprTypmod(), but that will be a much more invasive patch with possible side-effects elsewhere, so I'll do that only in HEAD. Back-patch to 8.3. Arguably the lack of a copying step is broken/dangerous all the way back, but in the absence of known problems I'll refrain from making the older branches pay the extra cost. (The reason this particular symptom didn't appear before is that exprTypmod() wasn't smart about SubLinks either, until 8.3.) 10 March 2009, 20:58:41 UTC
3597710 Prevent recursion during parse of email-like string with multiple '@'. Patch by Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> 10 March 2009, 17:33:53 UTC
ce66359 Add MUST (Mauritius Island Summer Time) to the list of known abbreviations. Mauritius began using DST in the summer 2008-2009; the Olson library has been updated already. Xavier Bugaud 05 March 2009, 14:28:04 UTC
cfe3b9d Put back our old workaround for machines that declare cbrt() in math.h but fail to provide the function itself. Not sure how we escaped testing anything later than 7.3 on such cases, but they still exist, as per André Volpato's report about AIX 5.3. 04 March 2009, 22:08:28 UTC
1fc5d2a Ooops ... fix some confusion between gettext() and _() in my previous patch. This has moved around in past releases, so just copying-and-pasting from HEAD didn't work as intended. 03 March 2009, 00:17:13 UTC
eb828d9 When we are in error recursion trouble, arrange to suppress translation and encoding conversion of any elog/ereport message being sent to the frontend. This generalizes a patch that I put in last October, which suppressed translation of only specific messages known to be associated with recursive can't-translate-the-message behavior. As shown in bug #4680, we need a more general answer in order to have some hope of coping with broken encoding conversion setups. This approach seems a good deal less klugy anyway. Patch in all supported branches. 02 March 2009, 21:18:50 UTC
327c5e3 Fix usage of char2wchar/wchar2char. Changes: - pg_wchar and wchar_t could have different size, so char2wchar doesn't call pg_mb2wchar_with_len to prevent out-of-bound memory bug - make char2wchar/wchar2char symmetric, now they should not be called with C-locale because mbstowcs/wcstombs oftenly doesn't work correct with C-locale. - Text parser uses pg_mb2wchar_with_len directly in case of C-locale and multibyte encoding Per bug report by Hiroshi Inoue <inoue@tpf.co.jp> and following discussion. Backpatch up to 8.2 when multybyte support was implemented in tsearch. 02 March 2009, 15:11:25 UTC
69daf2d Don't mangle xml and xpath unless xml is not in fact a well-formed document, in xpath(). If mangling xpath, make a saner attempt where xpath expression does not begin with '/'. 28 February 2009, 19:13:28 UTC
6c8f478 Fix buffer allocations in encoding conversion routines so that they won't fail on zero-length inputs. This isn't an issue in normal use because the conversion infrastructure skips calling the converters for empty strings. However a problem was created by yesterday's patch to check whether the right conversion function is supplied in CREATE CONVERSION. The most future-proof fix seems to be to make the converters safe for this corner case. 28 February 2009, 18:49:53 UTC
109177f In CREATE CONVERSION, test that the given function is a valid conversion function for the specified source and destination encodings. We do that by calling the function with an empty string. If it can't perform the requested conversion, it will throw an error. Backport to 7.4 - 8.3. Per bug report #4680 by Denis Afonin. 27 February 2009, 16:35:31 UTC
29d033f Set isnull for errm and sqlstate local variables when they're free'd. Because they are out of scope for any code after that anyway, leaving isnull true should be harmless. However, PL/pgSQL Debugger doesn't seem to care about the scoping and crashed, per report by Robert Walker (bug #4635). And it's good to be tidy for debugging purposes too. Fix in 8.3, 8.2 and 8.1 branches, CVS HEAD was fixed earlier already. Analysis and fix by Ashesh Vashi and Dave Page. 27 February 2009, 10:27:33 UTC
58a36a1 Fix an old problem in decompilation of CASE constructs: the ruleutils.c code looks for a CaseTestExpr to figure out what the parser did, but it failed to consider the possibility that an implicit coercion might be inserted above the CaseTestExpr. This could result in an Assert failure in some cases (but correct results if Asserts weren't enabled), or an "unexpected CASE WHEN clause" error in other cases. Per report from Alan Li. Back-patch to 8.1; problem doesn't exist before that because CASE was implemented differently. 25 February 2009, 18:00:07 UTC
1ae8361 Repair a longstanding bug in CLUSTER and the rewriting variants of ALTER TABLE: if the command is executed by someone other than the table owner (eg, a superuser) and the table has a toast table, the toast table's pg_type row ends up with the wrong typowner, ie, the command issuer not the table owner. This is quite harmless for most purposes, since no interesting permissions checks consult the pg_type row. However, it could lead to unexpected failures if one later tries to drop the role that issued the command (in 8.1 or 8.2), or strange warnings from pg_dump afterwards (in 8.3 and up, which will allow the DROP ROLE because we don't create a "redundant" owner dependency for table rowtypes). Problem identified by Cott Lang. Back-patch to 8.1. The problem is actually far older --- the CLUSTER variant can be demonstrated in 7.0 --- but it's mostly cosmetic before 8.1 because we didn't track ownership dependencies before 8.1. Also, fixing it before 8.1 would require changing the call signature of heap_create_with_catalog(), which seems to carry a nontrivial risk of breaking add-on modules. 24 February 2009, 01:38:49 UTC
5d4ed4d Loop calling CallNamedPipe() several times in case it fails, since it can be transient failures, causing kill() to not properly send signals. Original patch from Steve Marshall, modified by me. 15 February 2009, 13:58:22 UTC
099186d Fix UNLISTEN to fall out quickly if the current backend has never executed any LISTEN command. This is more important than it used to be because DISCARD ALL invokes UNLISTEN. Connection-pooled applications making heavy use of DISCARD ALL were seeing significant contention for pg_listener, as reported by Matteo Beccati. It seems unlikely that clients using LISTEN would use pooled connections, so this simple tweak seems sufficient, especially since the pg_listener implementation is slated to go away soon anyway. Back-patch to 8.3, where DISCARD ALL was introduced. 13 February 2009, 17:12:10 UTC
0940612 Fix plpgsql to not treat INSERT INTO as an INTO-variables clause anywhere in the string, not just at the start. Per bug #4629 from Martin Blazek. Back-patch to 8.2; prior versions don't have the problem, at least not in the reported case, because they don't try to recognize INTO in non-SELECT statements. (IOW, this is really fallout from the RETURNING patch.) 02 February 2009, 20:25:43 UTC
b1abb33 Defend against null input in analyze_requires_snapshot(), per report from Rushabh Lathia. Back-patch of patch of 2009-01-08. This is necessary in 8.3, as reported by Bjorn Munch. It's not currently necessary in 8.2, AFAICS, but seems best to include it there too. 30 January 2009, 16:59:10 UTC
5298d51 tag for 8.3.6 30 January 2009, 02:59:29 UTC
fb85c50 Update back-branch release notes. 30 January 2009, 00:37:42 UTC
612cc94 Translation updates 29 January 2009, 22:07:53 UTC
845948b Update time zone data files to tzdata release 2009a: introduces Asia/Kathmandu as the preferred spelling of that zone name, corrects historical DST information for Switzerland and Cuba. 29 January 2009, 20:00:07 UTC
34ac61c Replace argument-checking Asserts with regular test-and-elog checks in all encoding conversion functions. These are not can't-happen cases because it's possible to create a conversion with the wrong conversion function for the specified encoding pair. That would lead to an Assert crash in an Assert-enabled build, or incorrect conversion otherwise, neither of which is desirable. This would be a DOS issue if production databases were customarily built with asserts enabled, but fortunately that's not so. Per an observation by Heikki. Back-patch to all supported branches. 29 January 2009, 19:23:58 UTC
3c66f7c Fix incorrect dereferencing of char* to array's index. Per Tommy Gildseth <tommy.gildseth@usit.uio.no> report 29 January 2009, 16:09:12 UTC
e40c166 Fix bug with multiple evaluation of tsearch2 compatibility trigger, trigger data should be restored. Backpatch only for 8.3 because previous versions haven't such layer. 28 January 2009, 18:32:55 UTC
20632d5 Go over all OpenSSL return values and make sure we compare them to the documented API value. The previous code got it right as it's implemented, but accepted too much/too little compared to the API documentation. Per comment from Zdenek Kotala. 28 January 2009, 15:06:57 UTC
5b82d26 Support running as a service on Windows 7, by not specifying the JOB_OBJECT_UILIMIT_HANDLES flag. Dave Page & Magnus Hagander 28 January 2009, 11:19:40 UTC
879d780 Document that SELECT FOR UPDATE/SHARE with ORDER BY might return results in the incorrect order, per bug 4593. Backpatch to 8.3.X. 22 January 2009, 22:56:54 UTC
ff8f86e Fix a pg_dump output ordering problem introduced in 8.3 by the addition of array types for composite types. Although pg_dump understood it wasn't supposed to dump these array types as separate objects, it must include them in the dependency ordering analysis, and it was improperly assigning them the same relatively-high sort priority as regular types. This resulted in effectively moving composite types and tables up to that same high priority, which broke any ordering requirements that weren't explicitly enforced by dependencies. In particular user-defined operator classes, which should come out before tables, failed to do so. Per report from Brendan Jurd. In passing, also fix an ill-considered decision to give text search objects the same sort priority as functions and operators --- the sort result looks a lot nicer if different object types are kept separate. The recent foreign-data patch had copied that decision, making the sort ordering even messier :-( 18 January 2009, 20:44:53 UTC
3dc19e4 Change explanation of pg_switch_xlog()'s return value to match code. 15 January 2009, 18:23:17 UTC
87042a1 Fix URL generation in headline. Only tag lexeme will be replaced by space. Per http://archives.postgresql.org/pgsql-bugs/2008-12/msg00013.php 15 January 2009, 17:06:03 UTC
90208cc Fix generation of too long headline with ShortWords. Per http://archives.postgresql.org/pgsql-hackers/2008-09/msg01088.php 15 January 2009, 17:05:39 UTC
09156de Remove broken Assertions that failed if a statement executed in PL/pgSQL is rewritten into another kind of statement, for example if an INSERT is rewritten into an UPDATE. Back-patch to 8.3 and 8.2. For HEAD, Tom suggested inventing a new SPI_OK_REWRITTEN return code, but that's not a backportable solution. I'll do that as a separate patch, this patch will do as a stopgap measure for HEAD too in the meanwhile. 14 January 2009, 09:53:54 UTC
4d4b0f3 Throw an error when using -C and -1 at the same time in pg_restore. It's not possible to do CREATE DATABASE inside a transaction, so previously we just got a server error instead. Backpatch to 8.2, which is where the -1 feature appeared. 13 January 2009, 11:45:03 UTC
74216bc Update release notes for 8.3.5, 8.2.11, and 8.1.15 to mention the need to reindex GiST indexes: If you were running a previous 8.X.X release, REINDEX all GiST indexes after the upgrade. 09 January 2009, 01:47:14 UTC
323dd9f Insert conditional SPI_push/SPI_pop calls into InputFunctionCall, OutputFunctionCall, and friends. This allows SPI-using functions to invoke datatype I/O without concern for the possibility that a SPI-using function will be called (which could be either the I/O function itself, or a function used in a domain check constraint). It's a tad ugly, but not nearly as ugly as what'd be needed to make this work via retail insertion of push/pop operations in all the PLs. This reverts my patch of 2007-01-30 that inserted some retail SPI_push/pop calls into plpgsql; that approach only fixed plpgsql, and not any other PLs. But the other PLs have the issue too, as illustrated by a recent gripe from Christian Schröder. Back-patch to 8.2, which is as far back as this solution will work. It's also as far back as we need to worry about the domain-constraint case, since earlier versions did not attempt to check domain constraints within datatype input. I'm not aware of any old I/O functions that use SPI themselves, so this should be sufficient for a back-patch. 07 January 2009, 20:39:05 UTC
72a3bc4 Remove references to pgsql-ports and pgsql-patches mailing lists from various documentation, since those lists are now dead/deprecated. Point to pgsql-bugs and/or pgsql-hackers as appropriate. 06 January 2009, 17:27:19 UTC
1f2e2aa Fix logic in lazy vacuum to decide if it's worth trying to truncate the heap. If the table was smaller than REL_TRUNCATE_FRACTION (= 16) pages, we always tried to acquire AccessExclusiveLock on it even if there was no empty pages at the end. Report by Simon Riggs. Back-patch all the way to 7.4. 06 January 2009, 14:55:44 UTC
c8fad37 Fix bug per Oleksiy Shchukin - 2nd argument for dblink_get_result(text,bool) is PG_GETARG_BOOL(2), should be PG_GETARG_BOOL(1). Apply simple fix to back branches only. More extensive change to be applied to head per Tom's suggestion. 03 January 2009, 19:57:54 UTC
2a4cd9c Fix an oversight in my patch of a couple weeks ago that ensured a snapshot is available during datatype input in Bind message processing. I put the PopActiveSnapshot() or equivalent just before PortalDefineQuery, which is an unsafe spot for it (in 8.3 and later) because we are carrying a plancache refcount that hasn't yet been assigned to the portal. Any error thrown there would result in leaking the refcount. It's not exactly likely that PopActiveSnapshot would throw an elog, perhaps, but it could happen. Reorder the code and add another comment warning not to do that. 01 January 2009, 17:12:24 UTC
de1b429 Fix oversight in ALTER TABLE ENABLE/DISABLE RULE patch: the new enabled field needs to be included in equalRuleLocks() comparisons, else updates will fail to propagate into relcache entries when they have positive reference count (ie someone is using the relcache entry). Per report from Alex Hunsaker. 30 December 2008, 03:59:28 UTC
b33432a Make heap_update() set newtup->t_tableOid correctly, for consistency with the other major heapam.c functions. The only known consequence of this omission is that UPDATE RETURNING failed to return the correct value for "tableoid", as per report from KaiGai Kohei. Back-patch to 8.2. Arguably it's wrong all the way back; but without evidence of visible breakage before RETURNING was added, I'll desist from patching the older branches. 16 December 2008, 16:26:14 UTC
7cec608 Remove newly-added regression test cases that referenced pg_stats. The proposed fix for this is a behavioral change that probably shouldn't get back-patched, and it doesn't seem worth putting a workaround into a back branch. 15 December 2008, 16:52:16 UTC
4d2fa58 Restore enforce_generic_type_consistency's pre-8.3 behavior of allowing an actual argument type of ANYARRAY to match an argument declared ANYARRAY, so long as ANYELEMENT etc aren't used. I had overlooked the fact that this is a possible case while fixing bug #3852; but it is possible because pg_statistic contains columns declared ANYARRAY. Per gripe from Corey Horton. 14 December 2008, 19:46:02 UTC
8d1d601 Fix failure to ensure that a snapshot is available to datatype input functions when they are invoked by the parser. We had been setting up a snapshot at plan time but really it needs to be done earlier, before parse analysis. Per report from Dmitry Koterov. Also fix two related problems discovered while poking at this one: exec_bind_message called datatype input functions without establishing a snapshot, and SET CONSTRAINTS IMMEDIATE could call trigger functions without establishing a snapshot. Backpatch to 8.2. The underlying problem goes much further back, but it is masked in 8.1 and before because we didn't attempt to invoke domain check constraints within datatype input. It would only be exposed if a C-language datatype input function used the snapshot; which evidently none do, or we'd have heard complaints sooner. Since this code has changed a lot over time, a back-patch is hardly risk-free, and so I'm disinclined to patch further than absolutely necessary. 13 December 2008, 02:00:30 UTC
f6bab28 Clearify how processes are started by autovacuum, and what the effect of autovacuum_max_workers parameter is. Per discussion with Alvaro. 08 December 2008, 20:31:00 UTC
4e00382 Add note that autovacuum can use up several times maintenance_work_mem, with warning against setting it too high. 08 December 2008, 15:11:42 UTC
e78f838 Initialize GISTScanOpaque->qual_ok even if there is no conditions. 04 December 2008, 11:10:06 UTC
07531c6 Fix an oversight in the code that makes transitive-equality deductions from outer join clauses. Given, say, ... from a left join b on a.a1 = b.b1 where a.a1 = 42; we'll deduce a clause b.b1 = 42 and then mark the original join clause redundant (we can't remove it completely for reasons I don't feel like squeezing into this log entry). However the original implementation of that wasn't bulletproof, because clause_selectivity() wouldn't honor this_selec if given nonzero varRelid --- which in practice meant that it worked as desired *except* when considering index scan quals. Which resulted in bogus underestimation of the size of the indexscan result for an inner indexscan in an outer join, and consequently a possibly bad choice of indexscan vs. bitmap scan. Fix by introducing an explicit test into clause_selectivity(). Also, to make sure we don't trigger that test in corner cases, change the convention to be that this_selec > 1, not this_selec = 1, means it's been marked redundant. Per trouble report from Scara Maccai. Back-patch to 8.2, where the problem was introduced. 01 December 2008, 21:06:20 UTC
d044ac3 Ensure that the contents of a holdable cursor don't depend on out-of-line toasted values, since those could get dropped once the cursor's transaction is over. Per bug #4553 from Andrew Gierth. Back-patch as far as 8.1. The bug actually exists back to 7.4 when holdable cursors were introduced, but this patch won't work before 8.1 without significant adjustments. Given the lack of field complaints, it doesn't seem worth the work (and risk of introducing new bugs) to try to make a patch for the older branches. 01 December 2008, 17:06:27 UTC
c0118c1 Fix dblink and tablefunc to not return with the wrong CurrentMemoryContext. Per buildfarm results. 30 November 2008, 23:24:01 UTC
37e4c72 Remove inappropriate memory context switch in shutdown_MultiFuncCall(). This was a thinko introduced in a patch from last February; it results in memory leakage if an SRF is shut down before the actual end of query, because subsequent code will be running in a longer-lived context than it's expecting to be. 30 November 2008, 18:49:42 UTC
b9e8986 Back-patch change to make DISCARD ALL release advisory locks. Per discussion. 27 November 2008, 00:34:49 UTC
0b19538 Replaced strchrnul by strchr. 26 November 2008, 15:37:01 UTC
c892504 When creating a varchar struct name braces must be discarded. 26 November 2008, 13:19:34 UTC
fb2a0a4 information_schema.key_column_usage.position_in_unique_constraint was misdocumented as not being implemented. In reality it has worked since the release of 8.2. 25 November 2008, 20:47:49 UTC
05798c9 Fix crash of xmlconcat(NULL) backpatch from 8.4devel 15 November 2008, 20:53:40 UTC
b608b24 Prevent synchronous scan during GIN index build, because GIN is optimized for inserting tuples in increasing TID order. It's not clear whether this fully explains Ivan Sergio Borgonovo's complaint, but simple testing confirms that a scan that doesn't start at block 0 can slow GIN build by a factor of three or four. Backpatch to 8.3. Sync scan didn't exist before that. 13 November 2008, 17:42:19 UTC
940c412 Since the xmlagg section was moved, "below" is no longer accurate. 13 November 2008, 14:37:32 UTC
a7baa6d In predtest.c, install a limit on the number of branches we will process in AND, OR, or equivalent clauses: if there are too many (more than 100) just exit without proving anything. This ensures that we don't spend O(N^2) time trying (and most likely failing) to prove anything about very long IN lists and similar cases. Also, install a couple of CHECK_FOR_INTERRUPTS calls to ensure that a long proof attempt can be interrupted. Per gripe from Sergey Konoplev. Back-patch the whole patch to 8.2 and just the CHECK_FOR_INTERRUPTS addition to 8.1. (The rest of the patch doesn't apply cleanly, and since 8.1 doesn't show the complained-of behavior anyway, it doesn't seem necessary to work hard on it.) 12 November 2008, 23:08:42 UTC
5b9c854 Fix off-by-one error in autovacuum shmem struct sizing. This could lead to autovacuum worker sending SIGUSR1 signal to wrong process, per Zou Yong's report. Backpatch to 8.3. 12 November 2008, 10:10:43 UTC
9ac53e7 Detect and error out on inability to get proper linkage information required for plperl, usually due to absence of perl ExtUtils::Embed module. Backpatch as far as 8.1. 12 November 2008, 00:00:29 UTC
24e1815 Mention the tup_fetched column in pg_stat_database. Greg Sabino Mullane 11 November 2008, 20:06:25 UTC
213647b Get rid of adjust_appendrel_attr_needed(), which has been broken ever since we extended the appendrel mechanism to support UNION ALL optimization. The reason nobody noticed was that we are not actually using attr_needed data for appendrel children; hence it seems more reasonable to rip it out than fix it. Back-patch to 8.2 because an Assert failure is possible in corner cases. Per examination of an example from Jim Nasby. In HEAD, also get rid of AppendRelInfo.col_mappings, which is quite inadequate to represent UNION ALL situations; depend entirely on translated_vars instead. 11 November 2008, 18:13:44 UTC
47925b8 Fix bugs in sqlchar_to_unicode and unicode_to_sqlchar: both were measuring the length of a UTF8 character with pg_mblen (wrong if DB encoding isn't UTF8), and the latter was blithely assuming that a static buffer would somehow revert to all zeroes for each use. 10 November 2008, 18:02:27 UTC
af9b481 Fix old bug in contrib/sslinfo: X509_NAME_to_text freed the BIO_s_mem buffer it was using too soon. In a situation where pg_do_encoding_conversion is a no-op, this led to garbage data returned. In HEAD, also modify the code that's ensuring null termination to make it a tad more obvious what's happening. 10 November 2008, 14:57:46 UTC
d0d2d74 Document that 'sslmode' is ignored for Unix domain socket communication; backpatch to 8.3.X. 04 November 2008, 22:36:12 UTC
a06dedf commit for 8.3.5 31 October 2008, 02:38:34 UTC
7e23bd3 Update back-branch release notes. 30 October 2008, 22:22:41 UTC
b7c5f65 Translation updates 30 October 2008, 21:30:20 UTC
3a0b0e8 Revert previous patch to put the shared memory segment on win32 in the Global\ namespace, because it caused permission errors on a lot of platforms. We need to come up with something better for 8.4, but for now revert to the pre-8.3.4 behaviour. 30 October 2008, 17:04:11 UTC
f6dc278 Update time zone data files to tzdata release 2008i (DST law changes in Argentina, Brazil, Mauritius, Syria). 30 October 2008, 13:17:02 UTC
2926e1b Missing space in error message 30 October 2008, 12:27:42 UTC
a1bbfa7 Improve new message 30 October 2008, 08:51:13 UTC
b56cdf3 Fix recoveryLastXTime logic so that it actually does what one would expect. Per gripe from Kevin Grittner. Backpatch to 8.3, where the bug was introduced. 30 October 2008, 04:06:25 UTC
4b2315f Install a more robust solution for the problem of infinite error-processing recursion when we are unable to convert a localized error message to the client's encoding. We've been over this ground before, but as reported by Ibrar Ahmed, it still didn't work in the case of conversion failures for the conversion-failure message itself :-(. Fix by installing a "circuit breaker" that disables attempts to localize this message once we get into recursion trouble. Patch all supported branches, because it is in fact broken in all of them; though I had to add some missing translations to the older branches in order to expose the failure in the particular test case I was using. 27 October 2008, 19:37:29 UTC
1d18f94 Better solution to the IN-list issue: instead of having an arbitrary cutoff, treat Var and non-Var IN-list items differently. Only non-Var items are candidates to go into an ANY(ARRAY) construct --- we put all Vars as separate OR conditions on the grounds that that leaves more scope for optimization. Per suggestion from Robert Haas. 26 October 2008, 02:46:30 UTC
6571729 Add a heuristic to transformAExprIn() to make it prefer expanding "x IN (list)" into an OR of equality comparisons, rather than x = ANY(ARRAY[...]), when there are Vars in the right-hand side. This avoids a performance regression compared to pre-8.2 releases, in cases where the OR form can be optimized into scans of multiple indexes. Limit the possible downside by preferring this form only when the list isn't very long (I set the cutoff at 32 elements, which is a bit arbitrary but in the right ballpark). Per discussion with Jim Nasby. In passing, also make it try the OR form if it cannot select a common type for the array elements; we've seen a complaint or two about how the OR form worked for such cases and ARRAY doesn't. 25 October 2008, 17:19:17 UTC
d4a1e5b Fix an old bug in after-trigger handling: AfterTriggerEndQuery took the address of afterTriggers->query_stack[afterTriggers->query_depth] and hung onto it through all its firings of triggers. However, if a trigger causes sufficiently many nested query executions, query_stack will get repalloc'd bigger, leaving AfterTriggerEndQuery --- and hence afterTriggerInvokeEvents --- using a stale pointer. So far as I can find, the only consequence of this error is to stomp on a couple of words of already-freed memory; which would lead to a failure only if that chunk had already gotten re-allocated for something else. So it's hard to exhibit a simple failure case, but this is surely a bug. I noticed this while working on my recent patch to reduce pending-trigger space usage. The present patch is mighty ugly, because it requires making afterTriggerInvokeEvents know about all the possible event lists it might get called on. Fortunately, this is only needed in back branches because CVS HEAD avoids the problem in a different way: afterTriggerInvokeEvents only touches the passed AfterTriggerEventList pointer once at startup. Back branches are stable enough that wiring in knowledge of all possible call usages doesn't seem like a killer problem. Back-patch to 8.0. 7.4's trigger code is completely different and doesn't seem to have the problem (it doesn't even use repalloc). 25 October 2008, 03:32:44 UTC
13a7d7f Fix memory leak when using gsslib parameter in libpq connections 23 October 2008, 16:17:22 UTC
3690d7d On second thought, let's not get involved in correcting the feature list in 8.3. The list is quite outdated, and fixing it up would require more effort. Plus, we don't want diverging information schema contents. 23 October 2008, 11:12:56 UTC
666aad2 Fix GiST's killing tuple: GISTScanOpaque->curpos wasn't correctly set. As result, killtuple() marks as dead wrong tuple on page. Bug was introduced by me while fixing possible duplicates during GiST index scan. 22 October 2008, 12:54:25 UTC
6a11228 Small correction SQL feature table 17 October 2008, 23:21:09 UTC
81a2651 Fix small bug in headline generation. Patch from Sushant Sinha <sushant354@gmail.com> http://archives.postgresql.org/pgsql-hackers/2008-07/msg00785.php 17 October 2008, 17:32:59 UTC
2cae6fe During repeated rescan of GiST index it's possible that scan key is NULL but SK_SEARCHNULL is not set. Add checking IS NULL of keys to set during key initialization. If key is NULL and SK_SEARCHNULL is not set then nothnig can be satisfied. With assert-enabled compilation that causes coredump. Bug was introduced in 8.3 by support of IS NULL index scan. 17 October 2008, 17:02:42 UTC
6a6f47d Fix a small memory leak in ExecReScanAgg() in the hashed aggregation case. In the previous coding, the list of columns that needed to be hashed on was allocated in the per-query context, but we reallocated every time the Agg node was rescanned. Since this information doesn't change over a rescan, just construct the list of columns once during ExecInitAgg(). 16 October 2008, 19:25:58 UTC
b9053b1 Fix SPI_getvalue and SPI_getbinval to range-check the given attribute number according to the TupleDesc's natts, not the number of physical columns in the tuple. The previous coding would do the wrong thing in cases where natts is different from the tuple's column count: either incorrectly report error when it should just treat the column as null, or actually crash due to indexing off the end of the TupleDesc's attribute array. (The second case is probably not possible in modern PG versions, due to more careful handling of inheritance cases than we once had. But it's still a clear lack of robustness here.) The incorrect error indication is ignored by all callers within the core PG distribution, so this bug has no symptoms visible within the core code, but it might well be an issue for add-on packages. So patch all the way back. 16 October 2008, 13:23:28 UTC
7494c0e Fix COPY documentation to not imply that HEADER can be used outside CSV mode. Per gripe from Bill Thoen. 10 October 2008, 21:46:43 UTC
794ccac Fix omission of DiscardStmt in GetCommandLogLevel, per report from Hubert Depesz Lubaczewski. In HEAD, also move a couple of other cases to make the code ordering match up with ProcessUtility. 10 October 2008, 13:48:12 UTC
603972f Optional arguments should be optional. 10 October 2008, 12:20:06 UTC
a4f5d8a Fix overly tense optimization of PLpgSQL_func_hashkey: we must represent the isTrigger state explicitly, not rely on nonzero-ness of trigrelOid to indicate trigger-hood, because trigrelOid will be left zero when compiling for validation. The (useless) function hash entry built by the validator was able to match an ordinary non-trigger call later in the same session, thereby bypassing the check that is supposed to prevent such a call. Per report from Alvaro. It might be worth suppressing the useless hash entry altogether, but that's a bigger change than I want to consider back-patching. Back-patch to 8.0. 7.4 doesn't have the problem because it doesn't have validation mode. 09 October 2008, 16:35:13 UTC
5b61c9a Fix crash in bytea-to-XML mapping when the source value is toasted. Report and fix by Michael McMaster. Some minor code beautification by me, also avoid memory leaks in the special-case paths. 09 October 2008, 15:49:10 UTC
95f3c35 Force a checkpoint in CREATE DATABASE before starting to copy the files, to process any pending unlinks for the source database. Before, if you dropped a relation in the template database just before CREATE DATABASE, and a checkpoint happened during copydir(), the checkpoint might delete a file that we're just about to copy, causing lstat() in copydir() to fail with ENOENT. Backpatch to 8.3, where the pending unlinks were introduced. Per report by Matthew Wakeling and analysis by Tom Lane. 09 October 2008, 10:34:22 UTC
3c66048 When a relation is moved to another tablespace, we can't assume that we can use the old relfilenode in the new tablespace. There might be another relation in the new tablespace with the same relfilenode, so we must generate a fresh relfilenode in the new tablespace. The 8.3 patch to let deleted relation files linger as zero-length files until the next checkpoint made this more obvious: moving a relation from one table space another, and then back again, caused a collision with the lingering file. Back-patch to 8.1. The issue is present in 8.0 as well, but it doesn't seem worth fixing there, because we didn't have protection from OID collisions after OID wraparound before 8.1. Report by Guillaume Lelarge. 07 October 2008, 11:15:48 UTC
260fc8d Fix improper display of fractional seconds in interval values when using --enable-integer-datetimes and a non-ISO datestyle. Ron Mayer 02 October 2008, 13:47:44 UTC
3862493 Link libpq with libgssapi if configure finds it, as required by at least NetBSD. Markus Schaaf 01 October 2008, 15:35:34 UTC
back to top