https://github.com/postgres/postgres

sort by:
Revision Author Date Message Commit Date
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
57a2091 Recent patches to pg_ctl broke "pg_ctl restart" for the case where no command-line options had been given to the postmaster; and just plain broke it altogether in 8.1 and 8.0. Per report from KaiGai Kohei. 30 September 2008, 13:14:07 UTC
ef6f342 Compare escaped chars case insensitively for ILIKE - per gripe from TGL. 27 September 2008, 16:57:43 UTC
7ef0097 Fix more problems with rewriter failing to set Query.hasSubLinks when inserting a SubLink expression into a rule query. We missed cases where the original query contained a sub-SELECT in a function in FROM, a multi-row VALUES list, or a RETURNING list. Per bug #4434 from Dean Rasheed and subsequent investigation. Back-patch to 8.1; older releases don't have the issue because they didn't try to be smart about setting hasSubLinks only when needed. 24 September 2008, 16:52:53 UTC
7898ff7 Make sure pg_control is opened in binary mode, to deal with situtations when the file contains an EOF maker (0x1A) on Windows. ITAGAKI Takahiro 24 September 2008, 08:59:46 UTC
4f792e7 Mark SessionReplicationRole as PGDLLIMPORT so it can be used from Slony functions. Per report from Hiroshi Saito. 19 September 2008, 14:43:47 UTC
63aa5e3 tag for 8.3.4 19 September 2008, 03:04:13 UTC
cc36508 Update back-branch release notes. 19 September 2008, 02:45:21 UTC
94e164d Update time zone data files to tzdata release 2008f (DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco, Pakistan, Palestine, Paraguay). 17 September 2008, 14:18:46 UTC
f13a6f5 Widen the nLocks counts in local lock tables from int to int64. This forestalls potential overflow when the same table (or other object, but usually tables) is accessed by very many successive queries within a single transaction. Per report from Michael Milligan. Back-patch to 8.0, which is as far back as the patch conveniently applies. There have been no reports of overflow in pre-8.3 releases, but clearly the risk existed all along. (Michael's report suggests that 8.3 may consume lock counts faster than prior releases, but with no test case to look at it's hard to be sure about that. Widening the counts seems a good future-proofing measure in any event.) 16 September 2008, 01:56:35 UTC
015f168 Fix multiple memory leaks in xml_out(). Per report from Matt Magoffin. 16 September 2008, 00:49:49 UTC
e4aea74 Fix caching of foreign-key-checking queries so that when a replan is needed, we regenerate the SQL query text not merely the plan derived from it. This is needed to handle contingencies such as renaming of a table or column used in an FK. Pre-8.3, such cases worked despite the lack of replanning (because the cached plan needn't actually change), so this is a regression. Per bug #4417 from Benjamin Bihler. 15 September 2008, 23:37:49 UTC
e5b1eed Skip opfamily check in eclass_matches_any_index() when the index isn't a btree. We can't easily tell whether clauses generated from the equivalence class could be used with such an index, so just assume that they might be. This bit of over-optimization prevented use of non-btree indexes for nestloop inner indexscans, in any case where the join uses an equality operator that is also a btree operator --- which in particular is typically true for hash indexes. Noted while trying to test the current hash index patch. 12 September 2008, 14:56:19 UTC
2d4ef57 Initialize the minimum frozen Xid in vac_update_datfrozenxid using GetOldestXmin() instead of RecentGlobalXmin; this is safer because we do not depend on the latter being correctly set elsewhere, and while it is more expensive, this code path is not performance-critical. This is a real risk for autovacuum, because it can execute whole cycles without doing a single vacuum, which would mean that RecentGlobalXmin would stay at its initialization value, FirstNormalTransactionId, causing a bogus value to be inserted in pg_database. This bug could explain some recent reports of failure to truncate pg_clog. At the same time, change the initialization of RecentGlobalXmin to InvalidTransactionId, and ensure that it's set to something else whenever it's going to be used. Using it as FirstNormalTransactionId in HOT page pruning could incur in data loss. InitPostgres takes care of setting it to a valid value, but the extra checks are there to prevent "special" backends from behaving in unusual ways. Per Tom Lane's detailed problem dissection in 29544.1221061979@sss.pgh.pa.us 11 September 2008, 14:01:35 UTC
8208fbb Avoid using sprintf() for a simple octal conversion in PQescapeByteaInternal. Improves performance, per suggestion from Rudolf Leitgeb (bug #4414). The backend did this right already, but not libpq. 10 September 2008, 17:01:17 UTC
6c5cf22 Fix plpgsql's exec_move_row() to supply valid type OIDs to exec_assign_value() whenever possible, as per bug report from Oleg Serov. While at it, reorder the operations in the RECORD case to avoid possible palloc failure while the variable update is only partly complete. Back-patch as far as 8.1. Although the code of the particular function is similar in 8.0, 8.0's support for composite fields in rows is sufficiently broken elsewhere that it doesn't seem worth fixing this. 01 September 2008, 22:30:40 UTC
db8e4c7 HeapTupleHeaderAdjustCmax made the incorrect assumption that the raw command id is the cmin, when it can in fact be a combo cid. That made rows incorrectly invisible to a transaction where a tuple was deleted by multiple aborted subtransactions. Report and patch Karl Schnaitter. Back-patch to 8.3, where combo cids was introduced. 01 September 2008, 18:53:03 UTC
3c3fb21 Fix bug in original implementation of xmlserialize(): if user specifies a target type that isn't acceptable, the code failed to raise the proper error. The result instead was to return a NULL expression tree, which in a quick test led to a 'cache lookup failed for type 0' error later. Patch 8.3 only --- I fixed this in HEAD as part of recent locations patch. 29 August 2008, 17:27:50 UTC
a9ff5f0 Teach eval_const_expressions() to simplify an ArrayCoerceExpr to a constant when its input is constant and the element coercion function is immutable (or nonexistent, ie, binary-coercible case). This is an oversight in the 8.3 implementation of ArrayCoerceExpr, and its result is that certain cases involving IN or NOT IN with constants don't get optimized as they should be. Per experimentation with an example from Ow Mun Heng. 26 August 2008, 02:16:39 UTC
bc84632 Fix pg_dump docs to acknowledge that you can use -Z with plain text output. Pointed out by Daniel Migowski. 26 August 2008, 00:03:24 UTC
0ab43c9 Fix possible duplicate tuples while GiST scan. Now page is processed at once and ItemPointers are collected in memory. Remove tuple's killing by killtuple() if tuple was moved to another page - it could produce unaceptable overhead. Backpatch up to 8.1 because the bug was introduced by GiST's concurrency support. 23 August 2008, 10:40:03 UTC
back to top