summaryrefslogtreecommitdiff
path: root/src/backend/utils/cache
AgeCommit message (Collapse)Author
2000-06-20Make renaming a temp table behave sensibly. We don't need to touchTom Lane
the underlying table at all, just change the mapping entry ... but that logic was missing.
2000-06-20Fix handling of type tuple associated with a temp relation. We haveTom Lane
to apply the tempname->realname mapping to type name lookup as well as relation name lookup, else the type tuple will not be found when wanted. This fixes bugs like this one: create temp table foo (f1 int); select foo.f2 from foo; ERROR: Unable to locate type name 'foo' in catalog
2000-06-19Modify index-opening code to guarantee that the indexes of a relationTom Lane
are opened in a consistent order by different backends (I ordered them by index OID because that's easy, but any other consistent order would do as well). This avoids potential deadlock for index types that we acquire exclusive locks on ... ie, rtree.
2000-06-19Clean up bogosities in pg_opclass, pg_amop, pg_amproc. There are amprocTom Lane
entries now for int8 and network hash indexes. int24_ops and int42_ops are gone. pg_opclass no longer contains multiple entries claiming to be the default opclass for the same datatype. opr_sanity regress test extended to catch errors like these in the future.
2000-06-18Reimplement nodeMaterial to use a temporary BufFile (or even memory, if theTom Lane
materialized tupleset is small enough) instead of a temporary relation. This was something I was thinking of doing anyway for performance, and Jan says he needs it for TOAST because he doesn't want to cope with toasting noname relations. With this change, the 'noname table' support in heap.c is dead code, and I have accordingly removed it. Also clean up 'noname' plan handling in planner --- nonames are either sort or materialize plans, and it seems less confusing to handle them separately under those names.
2000-06-17Fix performance problems with pg_index lookups (see, for example,Tom Lane
discussion of 5/19/00). pg_index is now searched for indexes of a relation using an indexscan. Moreover, this is done once and cached in the relcache entry for the relation, in the form of a list of OIDs for the indexes. This list is used by the parser and executor to drive lookups in the pg_index syscache when they want to know the properties of the indexes. Net result: index information will be fully cached for repetitive operations such as inserts.
2000-06-17Clean out another pocket of functions called via nonspecific functionTom Lane
pointers, namely the catcache tuple fetch routines. Also get rid of the unused and possibly confusing 'size' field in struct cachedesc. Since it doesn't allow for variable-length fields, anyone who actually trusted it would likely be making a mistake...
2000-06-08Mark functions as static and ifdef NOT_USED as appropriate.Bruce Momjian
2000-06-08Mark ImmediateSharedRelationCacheInvalidate as NOT_USED.Bruce Momjian
2000-06-07Re-order pg_listener index so it can later be used in an index scan.Bruce Momjian
2000-06-07Add index on pg_index.indrelid for Tom Lane.Bruce Momjian
2000-06-06init_fcache was being careless about using SearchSysCacheTuple resultTom Lane
over multiple lookups --- it should use SearchSysCacheTupleCopy instead. This accounts for rare failures like 'init_fcache: null probin for procedure 481' when running concurrently with a VACUUM.
2000-06-06Improve comments for SearchSysCacheTuple and SearchSysCacheTupleCopy.Tom Lane
2000-06-05Latest round of fmgr updates. All functions with bool,char, or int2Tom Lane
inputs have been converted to newstyle. This should go a long way towards fixing our portability problems with platforms where char and short parameters are passed differently from int-width parameters. Still more to do for the Alpha port however.
2000-06-02Remove NT-specific file open defines by defining our own open macros forBruce Momjian
"rb" and "wb".
2000-05-30Remove unused include files. Do not touch /port or includes used by defines.Bruce Momjian
2000-05-29Generated header files parse.h and fmgroids.h are now copied intoTom Lane
the src/include tree, so that -I backend is no longer necessary anywhere. Also, clean up some bit rot in contrib tree.
2000-05-28First round of changes for new fmgr interface. fmgr itself and theTom Lane
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.
2000-05-21Repair memory leaks that caused CacheCxt to grow without bound. WeTom Lane
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...
2000-05-20Clean up grotty references to CacheCxt (externs inside functions,Tom Lane
duplicate global declarations, no points for style at all!)
2000-04-12Ye-old pgindent run. Same 4-space tabs.Bruce Momjian
2000-03-31Fix low-probability bug in relcache startup: write_irels wrote theTom Lane
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.
2000-03-17Fix a bunch of minor portability problems and maybe-bugs revealed byTom Lane
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...
2000-03-09Trial implementation of ALTER DROP COLUMN.Hiroshi Inoue
They are #ifdef'd. Add -D_DROP_COLUMN_HACK__ compile option to evaluate it.
2000-02-27Reactivated LZTEXT data type and changed rule plan- and qual-stringsJan Wieck
into lztext. Jan
2000-02-21Clean up some really grotty coding in catcache.c, improve hashingTom Lane
performance in catcache lookups.
2000-02-18Implement reindex commandHiroshi Inoue
2000-02-16If we don't have any stats for a boolean column, assumeTom Lane
the disbursion is 0.5, not something small.
2000-02-04Squash longstanding memory leak: when catcache.c copied a tuple intoTom Lane
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...
2000-01-31Fix problems seen in parallel regress tests when SI buffer overruns (causingTom Lane
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.
2000-01-29Modify uses of RelationFlushRelation and RelationCacheInvalidate so thatTom Lane
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!
2000-01-26Add:Bruce Momjian
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
2000-01-24Update for index change. Semes it didn't work the first time.Bruce Momjian
2000-01-24Remove Ops parameter from STATRELID cache lookup, for Tom Lane andBruce Momjian
optimizer.
2000-01-23Replace SearchSysCacheGetAttribute with SysCacheGetAttr, which fetchesTom Lane
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.
2000-01-22added ALTER TABLE DROP COLUMN, early versionPeter Eisentraut
2000-01-17setheapoverride() is history. Uses replaced with CommandCounterIncrement()Tom Lane
where necessary --- several of them didn't really need it, though. tqual-checking macros simplified accordingly.
2000-01-15Fixed all elog related warnings, as well as a few others.Peter Eisentraut
2000-01-10Rename oid8 -> oidvector and int28 -> int2vector. Cleanup of *out functions.Bruce Momjian
2000-01-10Improve cache invalidation handling. EespeciallyHiroshi Inoue
this would fix TODO * elog() flushes cache, try invalidating just entries from current xact, perhaps using invalidation cache
1999-12-31Clean up datatypes and comments for op_class() routine.Tom Lane
1999-12-30Repair bugs discussed in pghackers thread of 15 May 1999: creation of aTom Lane
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.
1999-12-28Removed LZTEXT datatype as discussed.Jan Wieck
Jan
1999-12-16Some changes to prepare for LONG attributes.Jan Wieck
Jan
1999-12-13New LDOUT makefile variable for QNX os.Bruce Momjian
1999-12-10Rename several destroy* functions/tags to drop*.Bruce Momjian
1999-12-09Make LD -r as macros that can be changed for QNX.Bruce Momjian
1999-11-24Cleanup for pg_statistic commit.Bruce Momjian
1999-11-24Add pg_statistic index, add missing Hiroshi file.Bruce Momjian
1999-11-24Rename heap_replace to heap_update.Bruce Momjian