summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Clean up code associated with updating pg_class statistics columnsTom Lane2006-05-1017-404/+519
| | | | | | | | | | | (relpages/reltuples). To do this, create formal support in heapam.c for "overwrite" tuple updates (including xlog replay capability) and use that instead of the ad-hoc overwrites we'd been using in VACUUM and CREATE INDEX. Take the responsibility for updating stats during CREATE INDEX out of the individual index AMs, and do it where it belongs, in catalog/index.c. Aside from being more modular, this avoids having to update the same tuple twice in some paths through CREATE INDEX. It's probably not measurably faster, but for sure it's a lot cleaner than before.
* Some optimizations by Volkan YAZICI <yazicivo@ttnet.net.tr>Teodor Sigaev2006-05-102-19/+17
|
* Reduce size of critical section and remove call of user-defined functions inTeodor Sigaev2006-05-105-263/+258
| | | | | | insertion and deletion, modify gistSplit() to do not use buffers. TODO: gistvacuumcleanup and XLOG
* Revert documentation mention of array dimension checking, in next paragraph.Bruce Momjian2006-05-091-3/+2
|
* Mention array dimmensions are not enforced either.Bruce Momjian2006-05-091-2/+3
|
* Build server libpgport with all non-FRONTEND object files. This is toBruce Momjian2006-05-081-14/+4
| | | | | fix a Win32 bug where pipe.c included a file that used FRONTEND, but it wasn't on the server-build list.
* Rewrite btree vacuuming to fold the former bulkdelete and cleanup operationsTom Lane2006-05-0810-243/+682
| | | | | | | | | | | | | into a single mostly-physical-order scan of the index. This requires some ticklish interlocking considerations, but should create no material performance impact on normal index operations (at least given the already-committed changes to make scans work a page at a time). VACUUM itself should get significantly faster in any index that's degenerated to a very nonlinear page order. Also, we save one pass over the index entirely, except in the case where there were no deletions to do and so only one pass happened anyway. Original patch by Heikki Linnakangas, rework by Tom Lane.
* Rewrite btree index scans to work a page at a time in all cases (bothTom Lane2006-05-079-629/+624
| | | | | | | | | | | | | | | | btgettuple and btgetmulti). This eliminates the problem of "re-finding" the exact stopping point, since the stopping point is effectively always a page boundary, and index items are never moved across pre-existing page boundaries. A small penalty is that the keys_are_unique optimization is effectively disabled (and, therefore, is removed in this patch), causing us to apply _bt_checkkeys() to at least one more tuple than necessary when looking up a unique key. However, the advantages for non-unique cases seem great enough to accept this tradeoff. Aside from simplifying and (sometimes) speeding up the indexscan code, this will allow us to reimplement btbulkdelete as a largely sequential scan instead of index-order traversal, thereby significantly reducing the cost of VACUUM. Those changes will come in a separate patch. Original patch by Heikki Linnakangas, rework by Tom Lane.
* Use $(LIBS:-lpgport=) rather than $(patsubst -lpgport,, $(LIBS)), for ↵Bruce Momjian2006-05-071-2/+2
| | | | consistency.
* Add description:Bruce Momjian2006-05-062-2/+9
| | | | | | | | | * %Disallow changing DEFAULT expression of a SERIAL column? > > This should be done only if the existing SERIAL problems cannot be > fixed. >
* Recommend more clearly custom pg_dump format over tar, buy showingBruce Momjian2006-05-061-17/+17
| | | | custom format examples first.
* Document SSL CRL usage by libpq.Bruce Momjian2006-05-061-1/+4
|
* Further minor simplification of relcache startup: don't need a staticTom Lane2006-05-061-17/+10
| | | | needNewCacheFile flag anymore, it can just be local in RelationCacheInitializePhase2.
* Add SSL CRL support to libpq. Recently added to the backend.Bruce Momjian2006-05-062-3/+29
|
* Issue a log message if a CRL file exists and the SSL library does notBruce Momjian2006-05-061-5/+11
| | | | support CRL certificates.
* Seems some NetBSD 3.0 x86 systems still need float8-small-is-zero, soBruce Momjian2006-05-051-2/+2
| | | | patch reverted.
* On Solaris ASM, / '/' is the comment for x86, while '!' is the commentBruce Momjian2006-05-052-4/+10
| | | | | | for Sparc Robert Lor
* Use regression results float8-small-is-zero only for NetBSD < 3.0.Bruce Momjian2006-05-051-2/+2
| | | | | | Backpatch to 8.1.X. Simon Burge
* Change Solaris comments from / to !.Bruce Momjian2006-05-052-7/+7
| | | | Robert Lor
* Update standards URL.Bruce Momjian2006-05-051-2/+2
| | | | Robert Treat
* Add/ cleanup:Bruce Momjian2006-05-052-4/+12
| | | | | | | | | | < * %Disallow changing default expression of a SERIAL column? > * %Disallow changing DEFAULT expression of a SERIAL column? 472a473,476 > * Add DEFAULT .. AS OWNER so permission checks are done as the table > owner > > This would be useful for SERIAL nextval() calls and CHECK constraints.
* Don't try to compile SSL CRL support if local SSL installation hasn'tTom Lane2006-05-041-1/+3
| | | | got it. Per buildfarm failure on 'canary'.
* Code review for contrib/pg_freespacemap. Add a storedpages column toTom Lane2006-05-043-211/+181
| | | | | | | pg_freespacemap_relations --- while one could theoretically get that number by counting rows in pg_freespacemap_pages, it's surely the hard way to do it. Avoid expensive and inconvenient conversion to and from text format. Minor code and docs cleanup.
* Simplify relcache startup sequence. With the new design of InitPostgresTom Lane2006-05-043-55/+49
| | | | | | | it's not necessary to have three separate calls anymore. This patch also fixes things so we don't try to read pg_internal.init until after we've obtained lock on the target database; which was fairly harmless, but it's certainly cleaner this way.
* Rethink the locking mechanisms used for CREATE/DROP/RENAME DATABASE.Tom Lane2006-05-049-405/+451
| | | | | | | | | | | | | The former approach used ExclusiveLock on pg_database, which being a cluster-wide lock meant only one of these operations could proceed at a time; worse, it also blocked all incoming connections in ReverifyMyDatabase. Now that we have LockSharedObject(), we can use locks of different types applied to databases considered as objects. This allows much more flexible management of the interlocking: two CREATE DATABASEs need not block each other, and need not block connections except to the template database being used. Similarly DROP DATABASE doesn't block unrelated operations. The locking used in flatfiles.c is also much narrower in scope than before. Per recent proposal.
* Create a syscache for pg_database-indexed-by-oid, and make use of itTom Lane2006-05-038-205/+116
| | | | | | | | | | in various places that were previously doing ad hoc pg_database searches. This may speed up database-related privilege checks a little bit, but the main motivation is to eliminate the performance reason for having ReverifyMyDatabase do such a lot of stuff (viz, avoiding repeat scans of pg_database during backend startup). The locking reason for having that routine is about to go away, and it'd be good to have the option to break it up.
* Make GIN opclass worked with intarray extensionsTeodor Sigaev2006-05-038-16/+258
|
* Fix typo noticed by Alvaro HerreraTeodor Sigaev2006-05-031-2/+2
|
* Fix calculation of plan node extParams to account for the possibility that oneTom Lane2006-05-031-10/+29
| | | | | | | | | | | | initPlan sets a parameter for another. This could not (I think) happen before 8.1, but it's possible now because the initPlans generated by MIN/MAX optimization might themselves use initPlans. We attach those initPlans as siblings of the MIN/MAX ones, not children, to avoid duplicate computation when multiple MIN/MAX aggregates are present; so this leads to the case of an initPlan needing the result of a sibling initPlan, which is not possible with ordinary query nesting. Hadn't been noticed because in most contexts having too much stuff listed in extParam is fairly harmless. Fixes "plan should not reference subplan's variable" bug reported by Catalin Pitis.
* Clean up API for ambulkdelete/amvacuumcleanup as per today's discussion.Tom Lane2006-05-0216-373/+308
| | | | | | This formulation requires every AM to provide amvacuumcleanup, unlike before, but it's surely a whole lot cleaner. Also, add an 'amstorage' column to pg_am so that we can get rid of hardwired knowledge in DefineOpClass().
* Fix broken markup.Tom Lane2006-05-022-4/+5
|
* Suppress some gcc warnings.Tom Lane2006-05-022-3/+7
|
* Fix grammar of new error message.Tom Lane2006-05-021-4/+3
|
* Add GIN opclases for another typesTeodor Sigaev2006-05-024-5/+341
|
* GIN: Generalized Inverted iNdex.Teodor Sigaev2006-05-0249-50/+5871
| | | | text[], int4[], Tsearch2 support for GIN.
* Avoid assuming that statistics for a parent relation reflect the properties ofTom Lane2006-05-022-6/+21
| | | | | | | | | | | | | the union of its child relations as well. This might have been a good idea when it was originally coded, but it's a fatally bad idea when inheritance is being used for partitioning. It's better to have no stats at all than completely misleading stats. Per report from Mark Liberman. The bug arguably exists all the way back, but I've only patched HEAD and 8.1 because we weren't particularly trying to support partitioning before 8.1. Eventually we ought to look at deriving union statistics instead of just punting, but for now the drop kick looks good.
* Provide a namespace.c function for lookup of an operator with exactTom Lane2006-05-014-138/+190
| | | | | | | | input datatypes given, and use this before trying OpernameGetCandidates. This is faster than the old method when there's an exact match, and it does not seem materially slower when there's not. And it definitely makes some of the callers cleaner, because they didn't really want to know about a list of candidates anyway. Per discussion with Atsushi Ogawa.
* Code review for GRANT CONNECT patch. Spell the privilege as CONNECT notTom Lane2006-04-3012-81/+118
| | | | | CONNECTION, fix a number of places that were missed (eg pg_dump support), avoid executing an extra search of pg_database during startup.
* Improve the representation of FOR UPDATE/FOR SHARE so that we canTom Lane2006-04-3029-246/+321
| | | | | | support both FOR UPDATE and FOR SHARE in one command, as well as both NOWAIT and normal WAIT behavior. The more general code is actually simpler and cleaner.
* Done:Bruce Momjian2006-04-302-4/+4
| | | | > o -Allow per-database permissions to be set via GRANT
* Add GRANT CONNECTION ON DATABASE, to be used in addition to pg_hba.conf.Bruce Momjian2006-04-309-19/+61
| | | | Gevik Babakhani
* Add question mark:Bruce Momjian2006-04-302-4/+4
| | | | > * %Disallow changing default expression of a SERIAL column?
* Revert patch pending more discussion:Bruce Momjian2006-04-307-153/+9
| | | | Disallow changing DEFAULT expression of a SERIAL column.
* Remove sema.c, superseded by win32_sema.c.Tom Lane2006-04-292-273/+3
|
* Rearrange some configure.in comments for better readability.Tom Lane2006-04-293-19/+33
| | | | | Commit configure and pg_config.h.in, missed in last configure.in update.
* We only need to add thread.c on non-WIN32 platforms, since get_home_pathTom Lane2006-04-291-2/+7
| | | | | doesn't use pqGetpwuid on WIN32. Rather than try to figure out why it won't build on WIN32, just remove it.
* Done:Bruce Momjian2006-04-292-4/+4
| | | | > * -Disallow changing default expression of a SERIAL column
* Disallow changing DEFAULT expression of a SERIAL column.Bruce Momjian2006-04-295-5/+149
| | | | Dhanaraj M
* Add Win32 semaphore implementation, rather than mimicking SysVBruce Momjian2006-04-293-10/+215
| | | | | | semaphores. Qingqing Zhou
* Solaris tas() uses 'int' now.Bruce Momjian2006-04-291-2/+2
| | | | Theo Schlossnagle