aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* tag 8.4.3REL8_4_3Marc G. Fournier2010-03-12
|
* Add missing reset of need_initialization in reloptions code.Tom Lane2010-03-11
| | | | | This resulted in useless extra work during every call of parseRelOptions, but no bad effects other than that. Noted by Alvaro.
* Sync timezone code with tzcode 2010c from the Olson group. This fixes someTom Lane2010-03-11
| | | | | | | | | | corner cases that come up in certain timezones (apparently, only those with lots and lots of distinct TZ transition rules, as far as I can gather from a quick scan of their archives). Per suggestion from Jeevan Chalke. Back-patch to 8.4. Possibly we need to push this into earlier releases as well, but I'm hesitant to update them to the 64-bit tzcode without more thought and testing.
* Use SvROK(sv) rather than directly checking SvTYPE(sv) == SVt_RV in plperl.Tom Lane2010-03-09
| | | | | | | | The latter is considered unwarranted chumminess with the implementation, and can lead to crashes with recent Perl versions. Report and fix by Tim Bunce. Back-patch to all versions containing the questionable coding pattern.
* Update time zone data files to tzdata release 2010d: DST law changes in Fiji,Alvaro Herrera2010-03-09
| | | | Samoa, Chile; corrections to recent changes in Paraguay and Bangladesh.
* Return proper exit code (3) from psql when ON_ERROR_STOP=on andBruce Momjian2010-03-09
| | | | | | | | --single-transaction are both used and the failure happens in commit, e.g. failed deferred trigger. Also properly free BEGIN/COMMIT result structures from --single-transaction. Per report from Dominic Bevacqua
* Backport fix from HEAD that makes ecpglib give the right SQLSTATE if the ↵Michael Meskes2010-03-08
| | | | connection disappears.
* Require hostname to be set when using GSSAPI authentication. Without it,Magnus Hagander2010-03-08
| | | | | | the GSSAPI libraries crash. Noted by Zdenek Kotala
* Disallow gssapi authentication on local connections, since itMagnus Hagander2010-03-08
| | | | | | requires a hostname to function. Noted by Zdenek Kotala
* Update time zone data files to tzdata release 2010c: DST law changes inTom Lane2010-03-08
| | | | Bangladesh, Mexico, Paraguay.
* Fix warning messages in restrict_and_check_grant() to include the column nameTom Lane2010-03-06
| | | | | | | | | | when warning about column-level privileges. This is more useful than before and makes the apparent duplication complained of by Piyush Newe not so duplicate. Also fix lack of quote marks in a related message text. Back-patch to 8.4, where column-level privileges were introduced. Stephen Frost
* When reading pg_hba.conf and similar files, do not treat @file as an inclusionTom Lane2010-03-06
| | | | | | | | | | | | | | | | | | | | | | | unless (1) the @ isn't quoted and (2) the filename isn't empty. This guards against unexpectedly treating usernames or other strings in "flat files" as inclusion requests, as seen in a recent trouble report from Ed L. The empty-filename case would be guaranteed to misbehave anyway, because our subsequent path-munging behavior results in trying to read the directory containing the current input file. I think this might finally explain the report at http://archives.postgresql.org/pgsql-bugs/2004-05/msg00132.php of a crash after printing "authentication file token too long, skipping", since I was able to duplicate that message (though not a crash) on a platform where stdio doesn't refuse to read directories. We never got far in investigating that problem, but now I'm suspicious that the trigger condition was an @ in the flat password file. Back-patch to all active branches since the problem can be demonstrated in all branches except HEAD. The test case, creating a user named "@", doesn't cause a problem in HEAD since we got rid of the flat password file. Nonetheless it seems like a good idea to not consider quoted @ as a file inclusion spec, so I changed HEAD too.
* Fix IsBinaryCoercible to not confuse a cast using in/out functionsHeikki Linnakangas2010-03-04
| | | | | | with binary compatibility. Backpatch to 8.4 where INOUT casts were introduced.
* Fix a couple of places that would loop forever if attempts to read a stdio fileTom Lane2010-03-03
| | | | | | | set ferror() but never set feof(). This is known to be the case for recent glibc when trying to read a directory as a file, and might be true for other platforms/cases too. Per report from Ed L. (There is more that we ought to do about his report, but this is one easily identifiable issue.)
* Fix pg_dump of ACLs of foreign servers. The command to grant/revokeHeikki Linnakangas2010-03-03
| | | | privileges of foreign servers is "GRANT ... ON *FOREIGN* SERVER ...".
* Export xml.c's libxml-error-handling support so that contrib/xml2 can use itTom Lane2010-03-03
| | | | | | | | | too, instead of duplicating the functionality (badly). I renamed xml_init to pg_xml_init, because the former seemed just a bit too generic to be safe as a global symbol. I considered likewise renaming xml_ereport to pg_xml_ereport, but felt that the reference to ereport probably made it sufficiently PG-centric already.
* Make iconv work like other optional libraries for MSVC.Andrew Dunstan2010-03-03
|
* Add missing library and include dir for XSLT in MSVC buildsAndrew Dunstan2010-03-02
|
* Do not run regression tests for contrib/xml2 on MSVC unless building with XMLAndrew Dunstan2010-03-02
|
* Backpatch MSVC build fix for XSLTAndrew Dunstan2010-03-02
|
* Fix translation of strings in psql \d output (translation in headers worked,Heikki Linnakangas2010-03-01
| | | | but not in cells).
* Fix numericlocale psql option when used with a null string and latex and troffHeikki Linnakangas2010-03-01
| | | | | | | | | | formats; a null string must not be formatted as a numeric. The more exotic formats latex and troff also incorrectly formatted all strings as numerics when numericlocale was on. Backpatch to 8.1 where numericlocale option was added. This fixes bug #5355 reported by Andy Lester.
* Allow predicate_refuted_by() to deduce that NOT A refutes A.Tom Lane2010-02-25
| | | | | | | | | | | | | | | | | | | | | We had originally made the stronger assumption that NOT A refutes any B if B implies A, but this fails in three-valued logic, because we need to prove B is false not just that it's not true. However the logic does go through if B is equal to A. Recognizing this limited case is enough to handle examples that arise when we have simplified "bool_var = true" or "bool_var = false" to just "bool_var" or "NOT bool_var". If we had not done that simplification then the btree-operator proof logic would have been able to prove that the expressions were contradictory, but only for identical expressions being compared to the constants; so handling identical A and B covers all the same cases. The motivation for doing this is to avoid unexpected asymmetrical behavior when a partitioned table uses a boolean partitioning column, as in today's gripe from Dominik Sander. Back-patch to 8.2, which is as far back as predicate_refuted_by attempts to do anything at all with NOTs.
* Add configuration parameter ssl_renegotiation_limit to controlMagnus Hagander2010-02-25
| | | | | | | | how often we do SSL session key renegotiation. Can be set to 0 to disable renegotiation completely, which is required if a broken SSL library is used (broken patches to CVE-2009-3555 a known cause) or when using a client library that can't do renegotiation.
* Fix STOP WAL LOCATION in backup history files no to return the nextItagaki Takahiro2010-02-19
| | | | | | | | | | | segment of XLOG_BACKUP_END record even if the the record is placed at a segment boundary. Furthermore the previous implementation could return nonexistent segment file name when the boundary is in segments that has "FE" suffix; We never use segments with "FF" suffix. Backpatch to 8.0, where hot backup was introduced. Reported by Fujii Masao.
* Volatile-ize all five places where we expect a PG_TRY block to restoreTom Lane2010-02-18
| | | | | | old memory context in plpython. Before only one of them was marked volatile, but per report from Zdenek Kotala, some compilers do the wrong thing here.
* Provide some rather hokey ways for EXPLAIN to print FieldStore and assignmentTom Lane2010-02-18
| | | | | | | | | | | | | | | | | | ArrayRef expressions that are not in the immediate context of an INSERT or UPDATE targetlist. Such cases never arise in stored rules, so ruleutils.c hadn't tried to handle them. However, they do occur in the targetlists of plans derived from such statements, and now that EXPLAIN VERBOSE tries to print targetlists, we need some way to deal with the case. I chose to represent an assignment ArrayRef as "array[subscripts] := source", which is fairly reasonable and doesn't omit any information. However, FieldStore is problematic because the planner will fold multiple assignments to fields of the same composite column into one FieldStore, resulting in a structure that is hard to understand at all, let alone display comprehensibly. So in that case I punted and just made it print the source expression(s). Backpatch to 8.4 --- the lack of functionality exists in older releases, but doesn't seem to be important for lack of anything that would call it.
* Fix ExecEvalArrayRef to pass down the old value of the array element or sliceTom Lane2010-02-18
| | | | | | | | | | | | | being assigned to, in case the expression to be assigned is a FieldStore that would need to modify that value. The need for this was foreseen some time ago, but not implemented then because we did not have arrays of composites. Now we do, but the point evidently got overlooked in that patch. Net result is that updating a field of an array element doesn't work right, as illustrated if you try the new regression test on an unpatched backend. Noted while experimenting with EXPLAIN VERBOSE, which has also got some issues in this area. Backpatch to 8.3, where arrays of composites were introduced.
* Force READY portals into FAILED state when a transaction or subtransactionTom Lane2010-02-18
| | | | | | | | | | | is aborted, if they were created within the failed xact. This prevents ExecutorEnd from being run on them, which is a good idea because they may contain references to tables or other objects that no longer exist. In particular this is hazardous when auto_explain is active, but it's really rather surprising that nobody has seen an issue with this before. I'm back-patching this to 8.4, since that's the first version that contains auto_explain or an ExecutorEnd hook, but I wonder whether we shouldn't back-patch further.
* Prevent #option dump from crashing on FORI statement with null step. ↵Tom Lane2010-02-17
| | | | Reported by Pavel.
* revert prior patch to fsync directories until portability problems exposed ↵Greg Stark2010-02-16
| | | | by build farm can be sorted out
* Make CREATE DATABASE safe against losing whole files by fsyncing theGreg Stark2010-02-14
| | | | | | | directory and not just the individual files. Back-patch to 8.1 -- before that we just called "cp -r" and never fsynced anything anyways.
* Don't choke when exec_move_row assigns a synthesized null to a columnTom Lane2010-02-12
| | | | | | | that happens to be composite itself. Per bug #5314 from Oleg Serov. Backpatch to 8.0 --- 7.4 has got too many other shortcomings in composite-type support to make this worth worrying about in that branch.
* Free reference in correct Perl context. Backpatch to release 8.2. Patch from ↵Andrew Dunstan2010-02-12
| | | | Tim Bunce.
* Fix bug in GIN WAL redo cleanup function: don't free fake relcache entryHeikki Linnakangas2010-02-09
| | | | | | while it's still being used. Backpatch to 8.4, where the fake relcache method was introduced.
* Remove obsolete comment about 'fsm' argument, which isn't an argumentHeikki Linnakangas2010-02-08
| | | | anymore.
* Forgot to back-patch CLUSTER test fix to 8.4.Tom Lane2010-02-03
|
* CLUSTER specified the wrong namespace when renaming toast tables of temporaryTom Lane2010-02-02
| | | | | | | relations (they don't live in pg_toast). This caused an Assert failure in assert-enabled builds. So far as I can see, in a non-assert build it would only have messed up the checks for conflicting names, so a failure would be quite improbable but perhaps not impossible.
* Remove copyright mention of Andrew Yu, per author's permission.Bruce Momjian2010-02-02
| | | | Backpatch to 8.4.X.
* Change regexp engine's ccondissect/crevdissect routines to perform DFATom Lane2010-02-01
| | | | | | | | | | | | | | | | | matching before recursing instead of after. The DFA match eliminates unworkable midpoint choices a lot faster than the recursive check, in most cases, so doing it first can speed things up; particularly in pathological cases such as recently exhibited by Michael Glaesemann. In addition, apply some cosmetic changes that were applied upstream (in the Tcl project) at the same time, in order to sync with upstream version 1.15 of regexec.c. Upstream apparently intends to backpatch this, so I will too. The pathological behavior could be unpleasant if encountered in the field, which seems to justify any risk of introducing new bugs. Tom Lane, reviewed by Donal K. Fellows of Tcl project
* Fix race condition in win32 signal handling.Magnus Hagander2010-01-31
| | | | | | | | | | | | There was a race condition where the receiving pipe could be closed by the child thread if the main thread was pre-empted before it got a chance to create a new one, and the dispatch thread ran to completion during that time. One symptom of this is that rows in pg_listener could be dropped under heavy load. Analysis and original patch by Radu Ilie, with some small modifications by Magnus Hagander.
* Avoid performing encoding conversion on command tag strings during EndCommand.Tom Lane2010-01-30
| | | | | | | | | | | | | Since all current and foreseeable future command tags will be pure ASCII, there is no need to do conversion on them. This saves a few cycles and also avoids polluting otherwise-pristine subtransaction memory contexts, which is the cause of the backend memory leak exhibited in bug #5302. (Someday we'll probably want to have a better method of determining whether subtransaction contexts need to be kept around, but today is not that day.) Backpatch to 8.0. The cycle-shaving aspect of this would work in 7.4 too, but without subtransactions the memory-leak aspect doesn't apply, so it doesn't seem worth touching 7.4.
* Fix memory leakage introduced into print_aligned_text by 8.4 changesTom Lane2010-01-30
| | | | | | | (failure to free col_lineptrs[] array elements) and exacerbated in the current devel cycle (failure to free "wrap"). This resulted in moderate bloat of psql over long script runs. Noted while testing bug #5302, although what the reporter was complaining of was backend-side leakage.
* Apply Tcl_Init() to the "hold" interpreter created by pltcl.Tom Lane2010-01-25
| | | | | | | | | | | | | | | | | | | | | | | You might think this is unnecessary since that interpreter is never used to run code --- but it turns out that's wrong. As of Tcl 8.5, the "clock" command (alone among builtin Tcl commands) is partially implemented by loaded-on-demand Tcl code, which means that it fails if there's not unknown-command support, and also that it's impossible to run it directly in a safe interpreter. The way they get around the latter is that Tcl_CreateSlave() automatically sets up an alias command that forwards any execution of "clock" in a safe slave interpreter to its parent interpreter. Thus, when attempting to execute "clock" in trusted pltcl, the command actually executes in the "hold" interpreter, where it will fail if unknown-command support hasn't been introduced by sourcing the standard init.tcl script, which is done by Tcl_Init(). (This is a pretty dubious design decision on the Tcl boys' part, if you ask me ... but they didn't.) Back-patch all the way. It's not clear that anyone would try to use ancient versions of pltcl with a recent Tcl, but it's not clear they wouldn't, either. Also add a regression test using "clock", in branches that have regression test support for pltcl. Per recent trouble report from Kyle Bateman.
* Fix assorted core dumps and Assert failures that could occur duringTom Lane2010-01-24
| | | | | | | | | | | | | | AbortTransaction or AbortSubTransaction, when trying to clean up after an error that prevented (sub)transaction start from completing: * access to TopTransactionResourceOwner that might not exist * assert failure in AtEOXact_GUC, if AtStart_GUC not called yet * assert failure or core dump in AfterTriggerEndSubXact, if AfterTriggerBeginSubXact not called yet Per testing by injecting elog(ERROR) at successive steps in StartTransaction and StartSubTransaction. It's not clear whether all of these cases could really occur in the field, but at least one of them is easily exposed by simple stress testing, as per my accidental discovery yesterday.
* Insert CHECK_FOR_INTERRUPTS calls into loops in dbsize.c, to ensure thatTom Lane2010-01-23
| | | | | | the various disk-size-reporting functions will respond to query cancel reasonably promptly even in very large databases. Per report from Kevin Grittner.
* Well, the systemtap guys moved the goalposts again: with the latest version,Tom Lane2010-01-20
| | | | | | we *must* generate probes.o or the dtrace probes don't work. Revert our workaround for their previous bug. Details at https://bugzilla.redhat.com/show_bug.cgi?id=557266
* When doing a parallel restore, we must guard against out-of-range dependencyTom Lane2010-01-19
| | | | | | | | | | | | | | | | dump IDs, because the array we're using is sized according to the highest dump ID actually defined in the archive file. In a partial dump there could be references to higher dump IDs that weren't dumped. Treat these the same as references to in-range IDs that weren't dumped. (The whole thing is a bit scary because the missing objects might have been part of dependency chains, which we won't know about. Not much we can do though --- throwing an error is probably overreaction.) Also, reject parallel restore with pre-1.8 archive version (made by pre-8.0 pg_dump). In these old versions the dependency entries are OIDs, not dump IDs, and we don't have enough information to interpret them. Per bug #5288 from Jon Erdman.
* Fix an oversight in convert_EXISTS_sublink_to_join: we can't convert anTom Lane2010-01-18
| | | | | | EXISTS that contains a WITH clause. This would usually lead to a "could not find CTE" error later in planning, because the WITH wouldn't get processed at all. Noted while playing with an example from Ken Marshall.
* Fix incorrect comparison of scan key in GIN. Per report fromTeodor Sigaev2010-01-18
| | | | Vyacheslav Kalinin <vka@mgcp.com>