summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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
* 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'.
* 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-046-387/+421
| | | | | | | | | | | | | 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.
* 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-0214-353/+266
| | | | | | 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().
* 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-0244-48/+5628
| | | | 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-306-59/+85
| | | | | 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-3026-230/+297
| | | | | | 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.
* Add GRANT CONNECTION ON DATABASE, to be used in addition to pg_hba.conf.Bruce Momjian2006-04-306-14/+41
| | | | Gevik Babakhani
* Revert patch pending more discussion:Bruce Momjian2006-04-305-149/+5
| | | | 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-291-1/+4
| | | | | 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.
* 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-292-1/+201
| | | | | | semaphores. Qingqing Zhou
* Solaris tas() uses 'int' now.Bruce Momjian2006-04-291-2/+2
| | | | Theo Schlossnagle
* Fix s_lock_test to use tas.o file, if needed.Bruce Momjian2006-04-281-2/+6
|
* Remove the restriction originally coded into optimize_minmax_aggregates() thatTom Lane2006-04-282-25/+5
| | | | | | | | | | | | | | | | | | | | | | | | | MIN/MAX not be converted to use an index if the query WHERE clause contains any volatile functions or subplans. I had originally feared that the conversion might alter the behavior of such a query with respect to a volatile function. Well, so it might, but only in the sense that the function would get evaluated at a subset of the table rows rather than all of them --- and we have never made any such guarantee anyway. (For instance, we don't refuse to use an index for an ordinary non-aggregate query when one of the non-indexable filter conditions contains a volatile function.) The prohibition against subplans was because of worry that that case wasn't adequately tested, which it wasn't, but it turns out to be possible to make 8.1 fail anyway: regression=# select o.ten, (select max(unique2) from tenk1 i where ten = o.ten or ten = (select f1 from int4_tbl limit 1)) from tenk1 o; ERROR: direct correlated subquery unsupported as initplan This is due to bogus code in SS_make_initplan_from_plan (it's an initplan, ergo it can't have any parParams). Having fixed that, we might as well allow subplans as well as initplans.
* Modify Solaris compiler build rules to use the cpp preprocessor, the theBruce Momjian2006-04-281-3/+9
| | | | x86 file.
* Darin -> Darwin.Bruce Momjian2006-04-281-1/+1
|
* Remove extra 'else' in solaris compiler code.Bruce Momjian2006-04-281-1/+1
|
* Remove "volatile" from tas function, per TOm.Bruce Momjian2006-04-281-2/+2
|
* Update list of platforms that have a list of exported symbols.Bruce Momjian2006-04-281-1/+3
|
* Arrange to strip libpq.so of symbols that aren't officially supposed toTom Lane2006-04-283-12/+37
| | | | | | | | be exported on Linux and Darwin. We already did this on Windows but that's not enough, as evidenced by the fact that libecpg had an unexpected dependency on one such symbol. We should try to do it on more platforms. Fix ecpg's oversight, and bump libpq's major .so version number to reflect the unwanted but nonetheless real ABI break.
* Add info on pgport linking requirements.Bruce Momjian2006-04-281-0/+26
|
* Rewrite Solaris compiler tas() assembly routines, merge i386 and x86_64Bruce Momjian2006-04-276-157/+71
| | | | | | assembler files, renamed as solaris_x86.s. Theo Schlossnagle
* Generalize mcv_selectivity() to support both VAR OP CONST and CONST OP VARTom Lane2006-04-272-16/+17
| | | | | | cases. This was not needed in the existing uses within selfuncs.c, but if we're gonna export it for general use, the extra generality seems helpful. Motivated by looking at ltree example.
* Change log message about vacuuming database name from LOG to DEBUG1.Bruce Momjian2006-04-271-2/+2
| | | | Prevents duplicate meaningless log messsages.
* On second thought, keep SSL CRL as a log, and wait for feedback from 8.2.Bruce Momjian2006-04-271-3/+3
|
* Downgrade SSL CRL file missing message from LOG to DEBUG1.Bruce Momjian2006-04-271-3/+3
|
* Revert patch, causing plpython regression failues:Bruce Momjian2006-04-271-231/+10
| | | | | | > >> >> > 1) named parameters additionally to args[] > >> >> > 2) return composite-types from plpython as dictionary > >> >> > 3) return result-set from plpython as list, iterator or generator
* Tab alignment cleanup.Bruce Momjian2006-04-271-5/+5
|