aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Clean up Streaming Replication documentation a little bit. A lot moreHeikki Linnakangas2010-02-12
| | | | needs to be done, but it's a step forward..
* If primary_conninfo is not set, don't try to establish streamingHeikki Linnakangas2010-02-12
| | | | connection.
* Check for partial WAL files in standby mode. If restore_command restoresHeikki Linnakangas2010-02-12
| | | | | | | a partial WAL file, assume it's because the file is just being copied to the archive and treat it the same as "file not found" in standby mode. pg_standby has a similar check, so it seems reasonable to have the same level of protection in the built-in standby mode.
* Free reference in correct Perl context. Backpatch to release 8.2. Patch from ↵Andrew Dunstan2010-02-12
| | | | Tim Bunce.
* Suppress uninitialized-variable warning.Tom Lane2010-02-11
|
* Fix typo bug in Hot Standby from recent refactoring. Bug introducedSimon Riggs2010-02-11
| | | | | into code recently patched by Andres Freund, so quickly fixed by him when bug report from Tatsuo Ishii arrived.
* Generic implementation of red-black binary tree. It's planned to use inTeodor Sigaev2010-02-11
| | | | | | several places, but for now only GIN uses it during index creation. Using self-balanced tree greatly speeds up index creation in corner cases with preordered data.
* Now that streaming replication switches between streaming mode andHeikki Linnakangas2010-02-10
| | | | | | | restoring from archive, the last WAL segment is not necessarily open at the end of recovery. Fix assertion that assumed that. Fujii Masao, fixing the assertion failure reported by Martin Pihlak.
* Improve planner's choices about when to use hashing vs sorting for DISTINCT.Tom Lane2010-02-10
| | | | | | | The previous coding missed a bet by sometimes picking the "sorted" path from query_planner even though hashing would be preferable. To fix, we have to be willing to make the choice sooner. This contorts things a little bit, but I thought of a factorization that makes it not too awful.
* Fix up rickety handling of relation-truncation interlocks.Tom Lane2010-02-09
| | | | | | | | | | | | | | | | | | | | Move rd_targblock, rd_fsm_nblocks, and rd_vm_nblocks from relcache to the smgr relation entries, so that they will get reset to InvalidBlockNumber whenever an smgr-level flush happens. Because we now send smgr invalidation messages immediately (not at end of transaction) when a relation truncation occurs, this ensures that other backends will reset their values before they next access the relation. We no longer need the unreliable assumption that a VACUUM that's doing a truncation will hold its AccessExclusive lock until commit --- in fact, we can intentionally release that lock as soon as we've completed the truncation. This patch therefore reverts (most of) Alvaro's patch of 2009-11-10, as well as my marginal hacking on it yesterday. We can also get rid of assorted no-longer-needed relcache flushes, which are far more expensive than an smgr flush because they kill a lot more state. In passing this patch fixes smgr_redo's failure to perform visibility-map truncation, and cleans up some rather dubious assumptions in freespace.c and visibilitymap.c about when rd_fsm_nblocks and rd_vm_nblocks can be out of date.
* 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.
* Typo fix, per Thom BrownMagnus Hagander2010-02-09
|
* Define the value for in6addr_any on MingW, since it provides the structMagnus Hagander2010-02-09
| | | | | only in the header files and not in any libraries, yet declare it as an extern.
* Move "Warm Standby Servers for High Availability" and "Hot Standby"Heikki Linnakangas2010-02-09
| | | | | | sections under "High Availability, Load Balancing, and Replication" chapter. Streaming replication chapter needs a lot more work, but this commit just moves things around.
* First try to make this one ecpg regression test work on Windows too. I'm ↵Michael Meskes2010-02-09
| | | | just trying to figure out the minimal amount of defines needed.
* Allow free space map vacuuming to be interrupted.Tom Lane2010-02-09
|
* Rearrange lazy-vacuum code a little bit to reduce the window betweenTom Lane2010-02-09
| | | | | | | truncating the table and transaction commit. This isn't really making it safe, but at least there is no good reason to do free space map cleanup within the risk window. Don't lock out cancel interrupts until we have to, either.
* Create an official API function for C functions to use to check if they areTom Lane2010-02-08
| | | | | | | | | | being called as aggregates, and to get the aggregate transition state memory context if needed. Use it instead of poking directly into AggState and WindowAggState in places that shouldn't know so much. We should have done this in 8.4, probably, but better late than never. Revised version of a patch by Hitoshi Harada.
* Remove obsolete comment about 'fsm' argument, which isn't an argumentHeikki Linnakangas2010-02-08
| | | | anymore.
* Fix serious performance bug in new implementation of VACUUM FULL:Tom Lane2010-02-08
| | | | | cluster_rel necessarily builds an all-new toast table, so it's useless to then go and VACUUM FULL the toast table.
* Add C comments that HEAP_MOVED_* define usage is only for pre-9.0 binaryBruce Momjian2010-02-08
| | | | upgrades.
* Update high availability/replication documentation chart for new hotBruce Momjian2010-02-08
| | | | standby featureset.
* Remove piece of code to zero out minRecoveryPoint when starting crashHeikki Linnakangas2010-02-08
| | | | | | | | | recovery. It's zeroed out whenever a checkpoint is written, so the only scenario where the removed code did anything is when you kill archive recovery, remove recovery.conf, and start up the server, so that it goes into crash recovery instead. That's a "don't do that" scenario, but it seems better to not clear minRecoveryPoint but instead update it like we do in archive recovery, which is what will now happen.
* Remove CatalogCacheFlushRelation, and the reloidattr infrastructure that wasTom Lane2010-02-08
| | | | | | | | | | | | | | | | | | | needed by nothing else. The restructuring I just finished doing on cache management exposed to me how silly this routine was. Its function was to go into the catcache and blow away all entries related to a given relation when there was a relcache flush on that relation. However, there is no point in removing a catcache entry if the catalog row it represents is still valid --- and if it isn't valid, there must have been a catcache entry flush on it, because that's triggered directly by heap_update or heap_delete on the catalog row. So this routine accomplished nothing except to blow away valid cache entries that we'd very likely be wanting in the near future to help reconstruct the relcache entry. Dumb. On top of which, it required a subtle and easy-to-get-wrong attribute in syscache definitions, ie, the column containing the OID of the related relation if any. Removing that is a very useful maintenance simplification.
* Remove some more dead VACUUM-FULL-only code.Tom Lane2010-02-08
|
* Remove old-style VACUUM FULL (which was known for a little while asTom Lane2010-02-08
| | | | | | | | | | | | | | | | | VACUUM FULL INPLACE), along with a boatload of subsidiary code and complexity. Per discussion, the use case for this method of vacuuming is no longer large enough to justify maintaining it; not to mention that we don't wish to invest the work that would be needed to make it play nicely with Hot Standby. Aside from the code directly related to old-style VACUUM FULL, this commit removes support for certain WAL record types that could only be generated within VACUUM FULL, redirect-pointer removal in heap_page_prune, and nontransactional generation of cache invalidation sinval messages (the last being the sticking point for Hot Standby). We still have to retain all code that copes with finding HEAP_MOVED_OFF and HEAP_MOVED_IN flag bits on existing tuples. This can't be removed as long as we want to support in-place update from pre-9.0 databases.
* Work around deadlock problems with VACUUM FULL/CLUSTER on system catalogs,Tom Lane2010-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | as per my recent proposal. First, teach IndexBuildHeapScan to not wait for INSERT_IN_PROGRESS or DELETE_IN_PROGRESS tuples to commit unless the index build is checking uniqueness/exclusion constraints. If it isn't, there's no harm in just indexing the in-doubt tuple. Second, modify VACUUM FULL/CLUSTER to suppress reverifying uniqueness/exclusion constraint properties while rebuilding indexes of the target relation. This is reasonable because these commands aren't meant to deal with corrupted-data situations. Constraint properties will still be rechecked when an index is rebuilt by a REINDEX command. This gets us out of the problem that new-style VACUUM FULL would often wait for other transactions while holding exclusive lock on a system catalog, leading to probable deadlock because those other transactions need to look at the catalogs too. Although the real ultimate cause of the problem is a debatable choice to release locks early after modifying system catalogs, changing that choice would require pretty serious analysis and is not something to be undertaken lightly or on a tight schedule. The present patch fixes the problem in a fairly reasonable way and should also improve the speed of VACUUM FULL/CLUSTER a little bit.
* Looks like we need #include <sys/stat.h> here on someTom Lane2010-02-07
| | | | platforms. Per buildfarm.
* Create a "relation mapping" infrastructure to support changing the relfilenodesTom Lane2010-02-07
| | | | | | | | | | | | | | | | | | | | | | | of shared or nailed system catalogs. This has two key benefits: * The new CLUSTER-based VACUUM FULL can be applied safely to all catalogs. * We no longer have to use an unsafe reindex-in-place approach for reindexing shared catalogs. CLUSTER on nailed catalogs now works too, although I left it disabled on shared catalogs because the resulting pg_index.indisclustered update would only be visible in one database. Since reindexing shared system catalogs is now fully transactional and crash-safe, the former special cases in REINDEX behavior have been removed; shared catalogs are treated the same as non-shared. This commit does not do anything about the recently-discussed problem of deadlocks between VACUUM FULL/CLUSTER on a system catalog and other concurrent queries; will address that in a separate patch. As a stopgap, parallel_schedule has been tweaked to run vacuum.sql by itself, to avoid such failures during the regression tests.
* Avoid changing the sign of zero. Per buildfarm failures.Tom Lane2010-02-06
|
* Mention warm and now "hot" standby servers in the high availability docs.Bruce Momjian2010-02-05
|
* Document that archive_timeout will force new WAL files even if a singleBruce Momjian2010-02-05
| | | | | checkpoint has happened, and recommend adjusting checkpoint_timeout to reduce the impact of this.
* Add C comment about process_settings() setting order.Bruce Momjian2010-02-05
|
* Previous commit was: Properly document that OVER and WINDOW are Postgres ↵Bruce Momjian2010-02-05
| | | | reserved words.
* Previous commit was to have tab checking as part of gmake check.Bruce Momjian2010-02-05
|
* *** empty log message ***Bruce Momjian2010-02-05
|
* Improve PL/Perl documentation of database access functions.Bruce Momjian2010-02-05
| | | | Alexey Klyukin
* Add SGML 'check-tabs' Makefile rule to check for tabs.Bruce Momjian2010-02-05
|
* Remove /contrib/isn copyright mention for German Mendez Bravo, withBruce Momjian2010-02-05
| | | | author's permission.
* Rewrite rint() to enable removal of copyright mention; patch fromBruce Momjian2010-02-05
| | | | | | Nathan Wagner Function is simpler too.
* Modify recently added PQconnectdbParams() with new argument, expand_dbname.Joe Conway2010-02-05
| | | | | | | | | | | | | | | | If expand_dbname is non-zero and dbname contains an = sign, it is taken as a conninfo string in exactly the same way as if it had been passed to PQconnectdb. This is equivalent to the way PQsetdbLogin() works, allowing PQconnectdbParams() to be a complete alternative. Also improve the way the new function is called from psql and replace a previously missed call to PQsetdbLogin() in psql. Additionally use PQconnectdbParams() for pg_dump and friends, and the bin/scripts command line utilities such as vacuumdb, createdb, etc. Finally, update the documentation for the new parameter, as well as the nuances of precedence in cases where key words are repeated or duplicated in the conninfo string.
* Rewrite intagg/Makefile from scratch, to avoid copyright mention.Bruce Momjian2010-02-05
|
* Usage of isnan() in ECPG regression tests probably needs '#include ↵Michael Meskes2010-02-04
| | | | <float.h>' as well.
* Streamlined array handling code in libecpg a little bit, in the process ↵Michael Meskes2010-02-04
| | | | fixing yet another incorrect log output.
* Three out of four of us like this phrasing better.Tom Lane2010-02-04
|
* Restructure CLUSTER/newstyle VACUUM FULL/ALTER TABLE support so that swappingTom Lane2010-02-04
| | | | | | | | | | | | | | | | | | | of old and new toast tables can be done either at the logical level (by swapping the heaps' reltoastrelid links) or at the physical level (by swapping the relfilenodes of the toast tables and their indexes). This is necessary infrastructure for upcoming changes to support CLUSTER/VAC FULL on shared system catalogs, where we cannot change reltoastrelid. The physical swap saves a few catalog updates too. We unfortunately have to keep the logical-level swap logic because in some cases we will be adding or deleting a toast table, so there's no possibility of a physical swap. However, that only happens as a consequence of schema changes in the table, which we do not need to support for system catalogs, so such cases aren't an obstacle for that. In passing, refactor the cluster support functions a little bit to eliminate unnecessarily-duplicated code; and fix the problem that while CLUSTER had been taught to rename the final toast table at need, ALTER TABLE had not.
* Check to ensure the number of primary key fields supplied does notJoe Conway2010-02-03
| | | | | | | exceed the total number of non-dropped source table fields for dblink_build_sql_*(). Addresses bug report from Rushabh Lathia. Backpatch all the way to the 7.3 branch.
* Mention "unquoted" identifiers are case-insensitive.Bruce Momjian2010-02-03
|
* Proofreading improvements for the Administration documentation book.Bruce Momjian2010-02-03
|
* Fixed some typos in ECPG regression test suite that resulted in regression ↵Michael Meskes2010-02-03
| | | | | | test failures on some architectures. By Zoltán Böszörményi.