aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/cache
Commit message (Collapse)AuthorAge
...
* Remove unused include files. Do not touch /port or includes used by defines.Bruce Momjian2000-05-30
|
* Generated header files parse.h and fmgroids.h are now copied intoTom Lane2000-05-29
| | | | | the src/include tree, so that -I backend is no longer necessary anywhere. Also, clean up some bit rot in contrib tree.
* First round of changes for new fmgr interface. fmgr itself and theTom Lane2000-05-28
| | | | | | | key call sites are changed, but most called functions are still oldstyle. An exception is that the PL managers are updated (so, for example, NULL handling now behaves as expected in plperl and plpgsql functions). NOTE initdb is forced due to added column in pg_proc.
* Repair memory leaks that caused CacheCxt to grow without bound. WeTom Lane2000-05-21
| | | | | | | | | really ought to fix relcache entry construction so that it does not do so much with CurrentMemoryContext = CacheCxt. As is, relatively harmless leaks in either sequential or index scanning translate to permanent leaks if they occur when called from relcache build. For the moment, however, the path of least resistance is to repair all such leaks...
* Clean up grotty references to CacheCxt (externs inside functions,Tom Lane2000-05-20
| | | | duplicate global declarations, no points for style at all!)
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Fix low-probability bug in relcache startup: write_irels wrote theTom Lane2000-03-31
| | | | | | | | | | pg_internal.init file in-place, which meant that if another backend started at about the same time, it might read the incomplete file. init_irels tries to guard against that, but I have now seen a crash due to reading bad data from a partly-written file. (This may indicate a kernel bug on my platform? Not sure.) Anyway, clearly the safest course is to write the new pg_internal.init file under a unique temporary filename, and rename it into place only after it's all written.
* Fix a bunch of minor portability problems and maybe-bugs revealed byTom Lane2000-03-17
| | | | | | running gcc and HP's cc with warnings cranked way up. Signed vs unsigned comparisons, routines declared static and then defined not-static, that kind of thing. Tedious, but perhaps useful...
* Trial implementation of ALTER DROP COLUMN.Hiroshi Inoue2000-03-09
| | | | | | They are #ifdef'd. Add -D_DROP_COLUMN_HACK__ compile option to evaluate it.
* Reactivated LZTEXT data type and changed rule plan- and qual-stringsJan Wieck2000-02-27
| | | | | | into lztext. Jan
* Clean up some really grotty coding in catcache.c, improve hashingTom Lane2000-02-21
| | | | performance in catcache lookups.
* Implement reindex commandHiroshi Inoue2000-02-18
|
* If we don't have any stats for a boolean column, assumeTom Lane2000-02-16
| | | | the disbursion is 0.5, not something small.
* Squash longstanding memory leak: when catcache.c copied a tuple intoTom Lane2000-02-04
| | | | | | the cache context, it didn't bother to free the tuple that CatalogIndexFetchTuple had allocated in the transaction context. Do enough cache lookups in the same xact, and you start to notice...
* Fix problems seen in parallel regress tests when SI buffer overruns (causingTom Lane2000-01-31
| | | | | | | | | | | | | | | | | | | | | | | syscache and relcache flushes). Relcache entry rebuild now preserves original tupledesc, rewrite rules, and triggers if possible, so that pointers to these things remain valid --- if these things change while relcache entry has positive refcount, we elog(ERROR) to avoid later crash. Arrange for xact-local rels to be rebuilt when an SI inval message is seen for them, so that they are updated by CommandCounterIncrement the same as regular rels. (This is useful because of Hiroshi's recent changes to process our own SI messages at CommandCounterIncrement time.) This allows simplification of some routines that previously hacked around the lack of an automatic update. catcache now keeps its own copy of tupledesc for its relation, rather than depending on the relcache's copy; this avoids needing to reinitialize catcache during a cache flush, which saves some cycles and eliminates nasty circularity problems that occur if a cache flush happens while trying to initialize a catcache. Eliminate a number of permanent memory leaks that used to happen during catcache or relcache flush; not least of which was that catcache never freed any cached tuples! (Rule parsetree storage is still leaked, however; will fix that separately.) Nothing done yet about code that uses tuples retrieved by SearchSysCache for longer than is safe.
* Modify uses of RelationFlushRelation and RelationCacheInvalidate so thatTom Lane2000-01-29
| | | | | | we *always* rebuild, rather than deleting, an invalidated relcache entry that has positive refcount. Otherwise an SI cache overrun leads to dangling Relation pointers all over the place!
* Add:Bruce Momjian2000-01-26
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Update for index change. Semes it didn't work the first time.Bruce Momjian2000-01-24
|
* Remove Ops parameter from STATRELID cache lookup, for Tom Lane andBruce Momjian2000-01-24
| | | | optimizer.
* Replace SearchSysCacheGetAttribute with SysCacheGetAttr, which fetchesTom Lane2000-01-23
| | | | | | an attribute of a tuple previously fetched with SearchSysCacheTuple. This avoids a lot of redundant cache lookups, particularly in selfuncs.c. Also, remove SearchSysCacheStruct, which was unused and grotty.
* added ALTER TABLE DROP COLUMN, early versionPeter Eisentraut2000-01-22
|
* setheapoverride() is history. Uses replaced with CommandCounterIncrement()Tom Lane2000-01-17
| | | | | where necessary --- several of them didn't really need it, though. tqual-checking macros simplified accordingly.
* Fixed all elog related warnings, as well as a few others.Peter Eisentraut2000-01-15
|
* Rename oid8 -> oidvector and int28 -> int2vector. Cleanup of *out functions.Bruce Momjian2000-01-10
|
* Improve cache invalidation handling. EespeciallyHiroshi Inoue2000-01-10
| | | | | | this would fix TODO * elog() flushes cache, try invalidating just entries from current xact, perhaps using invalidation cache
* Clean up datatypes and comments for op_class() routine.Tom Lane1999-12-31
|
* Repair bugs discussed in pghackers thread of 15 May 1999: creation of aTom Lane1999-12-30
| | | | | | relcache entry no longer leaks a small amount of memory. index_endscan now releases all the memory acquired by index_beginscan, so callers of it should NOT pfree the scan descriptor anymore.
* Removed LZTEXT datatype as discussed.Jan Wieck1999-12-28
| | | | Jan
* Some changes to prepare for LONG attributes.Jan Wieck1999-12-16
| | | | Jan
* New LDOUT makefile variable for QNX os.Bruce Momjian1999-12-13
|
* Rename several destroy* functions/tags to drop*.Bruce Momjian1999-12-10
|
* Make LD -r as macros that can be changed for QNX.Bruce Momjian1999-12-09
|
* Cleanup for pg_statistic commit.Bruce Momjian1999-11-24
|
* Add pg_statistic index, add missing Hiroshi file.Bruce Momjian1999-11-24
|
* Rename heap_replace to heap_update.Bruce Momjian1999-11-24
|
* Add system indexes to match all caches.Bruce Momjian1999-11-22
| | | | | | | Make all system indexes unique. Make all cache loads use system indexes. Rename *rel to *relid in inheritance tables. Rename cache names to be clearer.
* Repair problem exposed by Jan's new parallel-regression-test scaffold:Tom Lane1999-11-21
| | | | | | | inval.c thought it could safely use the catcache to look up the OIDs of system relations. Not good, considering that inval.c could be called during catcache loading, if a shared-inval message arrives. Rip out the lookup logic and instead use the known OIDs from pg_class.h.
* New parallel regression test shell and related things.Jan Wieck1999-11-19
| | | | Jan
* Changed pg_rewrite attributes ev_qual and ev_action to the newJan Wieck1999-11-18
| | | | | | compressed lztext data type. Jan
* Fix problem with temp tables shown in regression test by Jan.Bruce Momjian1999-11-17
|
* Fix lookup of temp table names that I missed yesterday.Bruce Momjian1999-11-16
|
* Commit to make clearer distinction for temp names and real names.Bruce Momjian1999-11-16
| | | | Thanks to Tom Lane for ideas.
* New NameStr macro to convert Name to Str. No need for var.data anymore.Bruce Momjian1999-11-07
| | | | | | Fewer calls to nameout. Better use of RelationGetRelationName.
* Make it possible to execute crashed CREATE/DROP commands again.Hiroshi Inoue1999-11-04
| | | | | | | | | | Now indexes of pg_class and pg_type are unique indexes and guarantee the uniqueness of correponding attributes. heap_create() was changed to take another boolean parameter which allows to postpone the creation of disk file. The name of rd_nonameunlinked was changed to rd_unlinked. It is used generally(not only for noname relations) now. Requires initdb.
* Allow indexes on system catalogs for use in cache code.Bruce Momjian1999-11-01
| | | | Thanks to Hiroshi
* Reimplement parsing and storage of default expressions and constraintTom Lane1999-10-03
| | | | | | | | | | | | | | | expressions in CREATE TABLE. There is no longer an emasculated expression syntax for these things; it's full a_expr for constraints, and b_expr for defaults (unfortunately the fact that NOT NULL is a part of the column constraint syntax causes a shift/reduce conflict if you try a_expr. Oh well --- at least parenthesized boolean expressions work now). Also, stored expression for a column default is not pre-coerced to the column type; we rely on transformInsertStatement to do that when the default is actually used. This means "f1 datetime default 'now'" behaves the way people usually expect it to. BTW, all the support code is now there to implement ALTER TABLE ADD CONSTRAINT and ALTER TABLE ADD COLUMN with a default value. I didn't actually teach ALTER TABLE to call it, but it wouldn't be much work.
* Removed (useless) pg_proc_prosrc_indexJan Wieck1999-09-30
| | | | Jan
* Mega-commit to make heap_open/heap_openr/heap_close take anTom Lane1999-09-18
| | | | | | | | | | | | | | | | | additional argument specifying the kind of lock to acquire/release (or 'NoLock' to do no lock processing). Ensure that all relations are locked with some appropriate lock level before being examined --- this ensures that relevant shared-inval messages have been processed and should prevent problems caused by concurrent VACUUM. Fix several bugs having to do with mismatched increment/decrement of relation ref count and mismatched heap_open/close (which amounts to the same thing). A bogus ref count on a relation doesn't matter much *unless* a SI Inval message happens to arrive at the wrong time, which is probably why we got away with this sloppiness for so long. Repair missing grab of AccessExclusiveLock in DROP TABLE, ALTER/RENAME TABLE, etc, as noted by Hiroshi. Recommend 'make clean all' after pulling this update; I modified the Relation struct layout slightly. Will post further discussion to pghackers list shortly.
* Repair error noticed by Roberto Cornacchia: selectivity codeTom Lane1999-09-09
| | | | | | | | was rejecting negative attnums as bogus, which of course they are not. Add code to get_attdisbursion to produce a useful value for OID attribute, since VACUUM does not store stats for system attributes. Also, repair bug that's been in eqjoinsel for a long time: it was taking the max of the two columns' disbursions, whereas it should use the min.
* Fix relcache.c so that local relations (those created duringTom Lane1999-09-06
| | | | | | | current transaction) are not flushed by shared-cache-inval reset message. SI reset actually works now, for probably the first time in a long time. I was able to run initdb and regression tests with a 16-element SI message array, with a lot of NOTICE: cache state reset messages but no crashes.