aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Properly call strerror() in thread test; add comments.Bruce Momjian2011-08-22
|
* Simplify errno generating in thread testing program.Bruce Momjian2011-08-21
|
* Fix trigger WHEN conditions when both BEFORE and AFTER triggers exist.Tom Lane2011-08-21
| | | | | | | | | Due to tuple-slot mismanagement, evaluation of WHEN conditions for AFTER ROW UPDATE triggers could crash if there had been a BEFORE ROW trigger fired for the same update. Fix by not trying to overload the use of estate->es_trig_tuple_slot. Per report from Yoran Heling. Back-patch to 9.0, when trigger WHEN conditions were introduced.
* Have thread_test create its test files in the current directory, ratherBruce Momjian2011-08-20
| | | | | | than /tmp. Also cleanup C defines and add comments. Per report by Alex Soto
* Fix performance problem when building a lossy tidbitmap.Tom Lane2011-08-20
| | | | | | | | | | | As pointed out by Sergey Koposov, repeated invocations of tbm_lossify can make building a large tidbitmap into an O(N^2) operation. To fix, make sure we remove more than the minimum amount of information per call, and add a fallback path to behave sanely if we're unable to fit the bitmap within the requested amount of memory. This has been wrong since the tidbitmap code was written, so back-patch to all supported branches.
* Fix copyright.pl to properly us 'tie' function.Bruce Momjian2011-08-19
| | | | Kris Jurka
* Fix problem with regex in copyright test.Bruce Momjian2011-08-19
| | | | Report and fix by Kris Jurka
* Remove use of 'tie' in perl for copyright.pl; instead use normal fileBruce Momjian2011-08-19
| | | | open/close.
* Add executable bit to file.Bruce Momjian2011-08-19
|
* Implement src/tools/copyright as a Perl program, so anyone can run it.Bruce Momjian2011-08-19
| | | | David Fetter
* Clean up 'chkselinuxenv' script.Robert Haas2011-08-19
| | | | | | | | Eliminate dependencies on "which", as we don't really need that to be installed for proper testing. Don't number the tests, as that increases the footprint of every patch that wants to add or remove tests. Make the test output more informative, so that it's a bit easier to see what went right (or wrong). Spelling and grammar improvements.
* Fix contrib/sepgsql and contrib/xml2 to always link required libraries.Robert Haas2011-08-19
| | | | | | | | | | contrib/xml2 can get by without libxslt; the relevant features just won't work. But if doesn't have libxml2, or if sepgsql doesn't have libselinux, the link succeeds but the module then fails to work at load time. To avoid that, link the require libraries unconditionally, so that it will be clear at link-time that there is a problem. Per discussion with Tom Lane and KaiGai Kohei.
* Allow sepgsql regression tests to be run from a user homedir.Robert Haas2011-08-19
| | | | KaiGai Kohei, with some changes by me.
* In pg_upgrade, don't copy visibility map files from clusters that did notBruce Momjian2011-08-19
| | | | | | have crash-safe visibility maps to clusters that expect crash-safety. Request from Robert Haas.
* Typo fix.Robert Haas2011-08-18
|
* Explain max_prepared_transactions requirement in isolation tests' README.Tom Lane2011-08-18
| | | | | | | | Now that we have a test that requires nondefault settings to pass, it seems like we'd better mention that detail in the directions about how to run the tests. Also do some very minor copy-editing.
* Add an SSI regression test that tests all interesting permutations in theHeikki Linnakangas2011-08-18
| | | | | | | | | | | | | order of begin, prepare, and commit of three concurrent transactions that have conflicts between them. The test runs for a quite long time, and the expected output file is huge, but this test caught some serious bugs during development, so seems worthwhile to keep. The test uses prepared transactions, so it fails if the server has max_prepared_transactions=0. Because of that, it's marked as "ignore" in the schedule file. Dan Ports
* Strip whitespace from SQL blocks in the isolation test suite. This is purelyHeikki Linnakangas2011-08-18
| | | | cosmetic, it removes a lot of IMHO ugly whitespace from the expected output.
* Make lazy_vacuum_rel call pg_rusage_init only if needed.Robert Haas2011-08-18
| | | | | | do_analyze_rel already does it this way. Euler Taveira de Oliveira
* Remove obsolete README file.Robert Haas2011-08-18
| | | | | | Perhaps we ought to add some other kind of documentation here instead, but for now let's get rid of this woefully obsolete description of the sinval machinery.
* Improve detection of Python 3.2 installationsPeter Eisentraut2011-08-18
| | | | | | | | | | | | Because of ABI tagging, the library version number might no longer be exactly the Python version number, so do extra lookups. This affects installations without a shared library, such as ActiveState's installer. Also update the way to detect the location of the 'config' directory, which can also be versioned. Ashesh Vashi
* Change PyInit_plpy to external linkagePeter Eisentraut2011-08-18
| | | | | | | Module initialization functions in Python 3 must have external linkage, because PyMODINIT_FUNC does dllexport on Windows-like platforms. Without this change, the build with Python 3 fails on Windows.
* Hide unused variable warnings under Python 3Peter Eisentraut2011-08-18
|
* Update 9.1 release notes to reflect commits through today.Tom Lane2011-08-17
| | | | Also do another pass of copy-editing.
* Fix two issues in plpython's handling of composite results.Tom Lane2011-08-17
| | | | | | | | Dropped columns within a composite type were not handled correctly. Also, we did not check for whether a composite result type had changed since we cached the information about it. Jan UrbaƄski, per a bug report from Jean-Baptiste Quenot
* Properly handle empty arrays returned from plperl functions.Andrew Dunstan2011-08-17
| | | | Bug reported by David Wheeler, fix by Alex Hunsaker.
* Translation updatesPeter Eisentraut2011-08-17
|
* Teach pg_controldata and pg_resetxlog about the new backupEndRequired fieldHeikki Linnakangas2011-08-17
| | | | in control file.
* Fix comment about which version had BACKUP METHOD line in backup_lable, again.Heikki Linnakangas2011-08-17
| | | | It was invalidated again by Fujii's patch to 9.1.
* Adjust wording now that estimated size can increaseMagnus Hagander2011-08-17
| | | | Per comment form Fujii Masao.
* Move \r out of translatable stringsPeter Eisentraut2011-08-17
| | | | | The translation tools are very unhappy about seeing \r in translatable strings, so move it to a separate fprintf call.
* MacOS -> Mac OSPeter Eisentraut2011-08-17
| | | | Josh Kupershmidt
* Revise sinval code to remove no-longer-used tuple TID from inval messages.Tom Lane2011-08-16
| | | | | | | | | | This requires adjusting the API for syscache callback functions: they now get a hash value, not a TID, to identify the target tuple. Most of them weren't paying any attention to that argument anyway, but plancache did require a small amount of fixing. Also, improve performance a trifle by avoiding sending duplicate inval messages when a heap_update isn't changing the catcache lookup columns.
* Forget about targeting catalog cache invalidations by tuple TID.Tom Lane2011-08-16
| | | | | | | | | | | | | | | | | | | | | | The TID isn't stable enough: we might queue an sinval event before a VACUUM FULL, and then process it afterwards, when the target tuple no longer has the same TID. So we must invalidate entries on the basis of hash value only. The old coding can be shown to result in various bizarre, hard-to-reproduce errors in the presence of concurrent VACUUM FULLs on system catalogs, and could easily result in permanent catalog corruption, up to and including complete loss of tables. This commit is just a minimal fix that removes the unsafe comparison. We should remove transmission of the tuple TID from sinval messages altogether, and then arrange to suppress the extra message in the common case of a heap_update that doesn't change the key hashvalue. But that's going to be much more invasive, and will only produce a probably-marginal performance gain, so it doesn't seem like material for a back-patch. Back-patch to 9.0. Before that, VACUUM FULL refused to do any tuple moving if it found any INSERT_IN_PROGRESS or DELETE_IN_PROGRESS tuples (and CLUSTER would give up altogether), so there was no risk of moving a tuple that might be the subject of an unsent sinval message.
* Fix incorrect order of operations during sinval reset processing.Tom Lane2011-08-16
| | | | | | | | | | | | | | | | | | | | | | | | | We have to be sure that we have revalidated each nailed-in-cache relcache entry before we try to use it to load data for some other relcache entry. The introduction of "mapped relations" in 9.0 broke this, because although we updated the state kept in relmapper.c early enough, we failed to propagate that information into relcache entries soon enough; in particular, we could try to fetch pg_class rows out of pg_class before we'd updated its relcache entry's rd_node.relNode value from the map. This bug accounts for Dave Gould's report of failures after "vacuum full pg_class", and I believe that there is risk for other system catalogs as well. The core part of the fix is to copy relmapper data into the relcache entries during "phase 1" in RelationCacheInvalidate(), before they'll be used in "phase 2". To try to future-proof the code against other similar bugs, I also rearranged the order in which nailed relations are visited during phase 2: now it's pg_class first, then pg_class_oid_index, then other nailed relations. This should ensure that RelationClearRelation can apply RelationReloadIndexInfo to all nailed indexes without risking use of not-yet-revalidated relcache entries. Back-patch to 9.0 where the relation mapper was introduced.
* Preserve toast value OIDs in toast-swap-by-content for CLUSTER/VACUUM FULL.Tom Lane2011-08-16
| | | | | | | | | | | | | | | | | This works around the problem that a catalog cache entry might contain a toast pointer that we try to dereference just as a VACUUM FULL completes on that catalog. We will see the sinval message on the cache entry when we acquire lock on the toast table, but by that point we've already told tuptoaster.c "here's the pointer to fetch", so it's difficult from a code structural standpoint to update the pointer before we use it. Much less painful to ensure that toast pointers are not invalidated in the first place. We have to add a bit of code to deal with the case that a value that previously wasn't toasted becomes so; but that should be a seldom-exercised corner case, so the inefficiency shouldn't be significant. Back-patch to 9.0. In prior versions, we didn't allow CLUSTER on system catalogs, and VACUUM FULL didn't result in reassignment of toast OIDs, so there was no problem.
* Fix race condition in relcache init file invalidation.Tom Lane2011-08-16
| | | | | | | | | | | | | | | | The previous code tried to synchronize by unlinking the init file twice, but that doesn't actually work: it leaves a window wherein a third process could read the already-stale init file but miss the SI messages that would tell it the data is stale. The result would be bizarre failures in catalog accesses, typically "could not read block 0 in file ..." later during startup. Instead, hold RelCacheInitLock across both the unlink and the sending of the SI messages. This is more straightforward, and might even be a bit faster since only one unlink call is needed. This has been wrong since it was put in (in 2002!), so back-patch to all supported releases.
* Adjust total size in pg_basebackup progress report when reality changesMagnus Hagander2011-08-16
| | | | | | | When streaming including WAL, the size estimate will always be incorrect, since we don't know how much WAL is included. To make sure the output doesn't look completely unreasonable, this patch increases the total size whenever we go past the estimate, to make sure we never go above 100%.
* Fix bogus comment that claimed that the new BACKUP METHOD line inHeikki Linnakangas2011-08-16
| | | | backup_label was new in 9.0. Spotted by Fujii Masao.
* Make pg_basebackup progress report translatablePeter Eisentraut2011-08-16
| | | | | Also fix a potential portability bug, because INT64_FORMAT is only guaranteed to be available with snprintf, not fprintf.
* Use less cryptic variable namesPeter Eisentraut2011-08-16
|
* In pg_upgrade, avoid dumping orphaned temporary tables. This makes theBruce Momjian2011-08-15
| | | | | | pg_upgrade schema matching pattern match pg_dump/pg_dumpall. Fix for 9.0, 9.1, and 9.2.
* Adjust regression tests for error message changePeter Eisentraut2011-08-15
|
* Add "Reason code" prefix to internal SSI error messagesPeter Eisentraut2011-08-15
| | | | | | | | | | This makes it clearer that the error message is perhaps not supposed to be understood by users, and it also makes it somewhat clearer that it was not accidentally omitted from translation. Idea from Heikki Linnakangas, except that we don't mark "Reason code" for translation at this point, because that would make the implementation too cumbersome.
* Fix unsafe order of operations in foreign-table DDL commands.Tom Lane2011-08-14
| | | | | | | | | | | | | | | | When updating or deleting a system catalog tuple, it's necessary to acquire RowExclusiveLock on the catalog before looking up the tuple; otherwise a concurrent VACUUM FULL on the catalog might move the tuple to a different TID before we can apply the update. Coding patterns that find the tuple via a table scan aren't at risk here, but when obtaining the tuple from a catalog cache, correct ordering is important; and several routines in foreigncmds.c got it wrong. Noted while running the regression tests in parallel with VACUUM FULL of assorted system catalogs. For consistency I moved all the heap_open calls to the starts of their functions, including a couple for which there was no actual bug. Back-patch to 8.4 where foreigncmds.c was added.
* Message style improvementsPeter Eisentraut2011-08-14
|
* Fix typoPeter Eisentraut2011-08-14
|
* Fix incorrect timeout handling during initial authentication transaction.Tom Lane2011-08-13
| | | | | | | | | | | | | | | | | | | | | | The statement start timestamp was not set before initiating the transaction that is used to look up client authentication information in pg_authid. In consequence, enable_sig_alarm computed a wrong value (far in the past) for statement_fin_time. That didn't have any immediate effect, because the timeout alarm was set without reference to statement_fin_time; but if we subsequently blocked on a lock for a short time, CheckStatementTimeout would consult the bogus value when we cancelled the lock timeout wait, and then conclude we'd timed out, leading to immediate failure of the connection attempt. Thus an innocent "vacuum full pg_authid" would cause failures of concurrent connection attempts. Noted while testing other, more serious consequences of vacuum full on system catalogs. We should set the statement timestamp before StartTransactionCommand(), so that the transaction start timestamp is also valid. I'm not sure if there are any non-cosmetic effects of it not being valid, but the xact timestamp is at least sent to the statistics machinery. Back-patch to 9.0. Before that, the client authentication timeout was done outside any transaction and did not depend on this state to be valid.
* Make USECS_PER_* timestamp macros visible even when we are not usingBruce Momjian2011-08-12
| | | | integer timestamps.
* Add major features list and introductory text for 9.1 release notes.Bruce Momjian2011-08-11
| | | | Backpatch to 9.1, obviously.