- 03 Mar, 2002 1 commit
-
-
Tom Lane authored
speed up repetitive failed searches; per pghackers discussion in late January. inval.c logic substantially simplified, since we can now treat inserts and deletes alike as far as inval events are concerned. Some repair work needed in heap_create_with_catalog, which turns out to have been doing CommandCounterIncrement at a point where the new relation has non-self-consistent catalog entries. With the new inval code, that resulted in assert failures during a relcache entry rebuild.
-
- 19 Feb, 2002 1 commit
-
-
Tom Lane authored
Improve 'pg_internal.init' relcache entry preload mechanism so that it is safe to use for all system catalogs, and arrange to preload a realistic set of system-catalog entries instead of only the three nailed-in-cache indexes that were formerly loaded this way. Fix mechanism for deleting out-of-date pg_internal.init files: this must be synchronized with transaction commit, not just done at random times within transactions. Drive it off relcache invalidation mechanism so that no special-case tests are needed. Cache additional information in relcache entries for indexes (their pg_index tuples and index-operator OIDs) to eliminate repeated lookups. Also cache index opclass info at the per-opclass level to avoid repeated lookups during relcache load. Generalize 'systable scan' utilities originally developed by Hiroshi, move them into genam.c, use in a number of places where there was formerly ugly code for choosing either heap or index scan. In particular this allows simplification of the logic that prevents infinite recursion between syscache and relcache during startup: we can easily switch to heapscans in relcache.c when and where needed to avoid recursion, so IndexScanOK becomes simpler and does not need any expensive initialization. Eliminate useless opening of a heapscan data structure while doing an indexscan (this saves an mdnblocks call and thus at least one kernel call).
-
- 16 Jan, 2002 1 commit
-
-
Tom Lane authored
This saves one open file descriptor per backend, and avoids an annoying NOTICE on Cygwin (which has trouble deleting open files). Bug appears to date back to original coding of init_irels, circa 1992.
-
- 15 Jan, 2002 1 commit
-
-
Tom Lane authored
temporary file. This seems to be a known failure mode under Cygwin, so we might as well expend the extra line of code to be tidy.
-
- 05 Nov, 2001 1 commit
-
-
Bruce Momjian authored
initdb/regression tests pass.
-
- 28 Oct, 2001 1 commit
-
-
Bruce Momjian authored
spacing. Also adds space for one-line comments.
-
- 25 Oct, 2001 1 commit
-
-
Bruce Momjian authored
tests pass.
-
- 06 Oct, 2001 1 commit
-
-
Tom Lane authored
lookup info in the relcache for index access method support functions. This makes a huge difference for dynamically loaded support functions, and should save a few cycles even for built-in ones. Also tweak dfmgr.c so that load_external_function is called only once, not twice, when doing fmgr_info for a dynamically loaded function. All per performance gripe from Teodor Sigaev, 5-Oct-01.
-
- 05 Oct, 2001 1 commit
-
-
Tom Lane authored
readability. Bizarre '(long *) TRUE' return convention is gone, in favor of just raising an error internally in dynahash.c when we detect hashtable corruption. HashTableWalk is gone, in favor of using hash_seq_search directly, since it had no hope of working with non-LONGALIGNable datatypes. Simplify some other code that was made undesirably grotty by promixity to HashTableWalk.
-
- 01 Oct, 2001 1 commit
-
-
Tom Lane authored
portability issues). Caller-visible data structures are now allocated on MAXALIGN boundaries, allowing safe use of datatypes wider than 'long'. Rejigger hash_create API so that caller specifies size of key and total size of entry, not size of key and size of rest of entry. This simplifies life considerably since each number is just a sizeof(), and padding issues etc. are taken care of automatically.
-
- 25 Aug, 2001 1 commit
-
-
Tom Lane authored
buffer manager with 'pg_clog', a specialized access method modeled on pg_xlog. This simplifies startup (don't need to play games to open pg_log; among other things, OverrideTransactionSystem goes away), should improve performance a little, and opens the door to recycling commit log space by removing no-longer-needed segments of the commit log. Actual recycling is not there yet, but I felt I should commit this part separately since it'd still be useful if we chose not to do transaction ID wraparound.
-
- 10 Aug, 2001 1 commit
-
-
Tom Lane authored
default, but OIDS are removed from many system catalogs that don't need them. Some interesting side effects: TOAST pointers are 20 bytes not 32 now; pg_description has a three-column key instead of one. Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey has some usefulness; pg_dump dumps comments on indexes, rules, and triggers in a valid order. initdb forced.
-
- 29 Jun, 2001 1 commit
-
-
Tom Lane authored
stub) into the rest of the system. Adopt a cleaner approach to preventing deadlock in concurrent heap_updates: allow RelationGetBufferForTuple to select any page of the rel, and put the onus on it to lock both buffers in a consistent order. Remove no-longer-needed isExtend hack from API of ReleaseAndReadBuffer.
-
- 27 Jun, 2001 1 commit
-
-
Tom Lane authored
do anything yet, but it has the necessary connections to initialization and so forth. Make some gestures towards allowing number of blocks in a relation to be BlockNumber, ie, unsigned int, rather than signed int. (I doubt I got all the places that are sloppy about it, yet.) On the way, replace the hardwired NLOCKS_PER_XACT fudge factor with a GUC variable.
-
- 22 Jun, 2001 1 commit
-
-
Jan Wieck authored
it's hard to keep such massive changes in sync with the tree so I need to get it in and work from there now). Jan
-
- 18 Jun, 2001 1 commit
-
-
Tom Lane authored
CatalogCacheFlushRelation (formerly called SystemCacheRelationFlushed) how to distinguish tuples it should flush from those it needn't; this means a relcache flush event now only removes the catcache entries it ought to, rather than zapping the caches completely as it used to. Testing with the regression tests indicates that this considerably improves the lifespan of catcache entries. Also, rearrange catcache data structures so that the limit on number of cached tuples applies globally across all the catcaches, rather than being per-catcache. It was a little silly to have the same size limit on both, say, pg_attribute caches and pg_am caches (there being only four possible rows in the latter...). Doing LRU removal across all the caches instead of locally in each one should reduce cache reload traffic in the more heavily used caches and improve the efficiency of cache memory use.
-
- 12 Jun, 2001 1 commit
-
-
Tom Lane authored
pg_database now has unique indexes on oid and on datname. pg_shadow now has unique indexes on usename and on usesysid. pg_am now has unique index on oid. pg_opclass now has unique index on oid. pg_amproc now has unique index on amid+amopclaid+amprocnum. Remove pg_rewrite's unnecessary index on oid, delete unused RULEOID syscache. Remove index on pg_listener and associated syscache for performance reasons (caching rows that are certain to change before you need 'em again is rather pointless). Change pg_attrdef's nonunique index on adrelid into a unique index on adrelid+adnum. Fix various incorrect settings of pg_class.relisshared, make that the primary reference point for whether a relation is shared or not. IsSharedSystemRelationName() is now only consulted to initialize relisshared during initial creation of tables and indexes. In theory we might now support shared user relations, though it's not clear how one would get entries for them into pg_class &etc of multiple databases. Fix recently reported bug that pg_attribute rows created for an index all have the same OID. (Proof that non-unique OID doesn't matter unless it's actually used to do lookups ;-)) There's no need to treat pg_trigger, pg_attrdef, pg_relcheck as bootstrap relations. Convert them into plain system catalogs without hardwired entries in pg_class and friends. Unify global.bki and template1.bki into a single init script postgres.bki, since the alleged distinction between them was misleading and pointless. Not to mention that it didn't work for setting up indexes on shared system relations. Rationalize locking of pg_shadow, pg_group, pg_attrdef (no need to use AccessExclusiveLock where ExclusiveLock or even RowExclusiveLock will do). Also, hold locks until transaction commit where necessary.
-
- 01 Jun, 2001 1 commit
-
-
Tom Lane authored
report on old-style functions invoked by RI triggers. We had a number of other places that were being sloppy about which memory context FmgrInfo subsidiary data will be allocated in. Turns out none of them actually cause a problem in 7.1, but this is for arcane reasons such as the fact that old-style triggers aren't supported anyway. To avoid getting burnt later, I've restructured the trigger support so that we don't keep trigger FmgrInfo structs in relcache memory. Some other related cleanups too: it's not really necessary to call fmgr_info at all while setting up the index support info in relcache entries, because those ScanKeyEntry structs are never used to invoke the functions. This should speed up relcache initialization a tiny bit.
-
- 30 May, 2001 1 commit
-
-
Bruce Momjian authored
-
- 14 May, 2001 3 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
forced.
-
- 02 Apr, 2001 1 commit
-
-
Tom Lane authored
physical file has disappeared. There is no really good reason why relcache should be opening the underlying file at all, AFAICS. In any case we needn't raise a hard error here.
-
- 23 Mar, 2001 1 commit
-
-
Bruce Momjian authored
-
- 22 Mar, 2001 1 commit
-
-
Bruce Momjian authored
-
- 22 Feb, 2001 1 commit
-
-
Bruce Momjian authored
up the comments later.
-
- 24 Jan, 2001 1 commit
-
-
Bruce Momjian authored
-
- 08 Jan, 2001 1 commit
-
-
Tom Lane authored
-
- 06 Jan, 2001 2 commits
-
-
Tom Lane authored
in per-entry sub-memory-context, where they were supposed to go, rather than in CacheMemoryContext where the code was putting them. Must've suffered a severe brain fade when I wrote this :-(
-
Hiroshi Inoue authored
so that transactional control could guarantee the consistency.
-
- 04 Jan, 2001 1 commit
-
-
Hiroshi Inoue authored
-
- 02 Jan, 2001 1 commit
-
-
Tom Lane authored
starting a new hashtable search no longer clobbers any other search active anywhere in the system. Fix RelationCacheInvalidate() so that it will not crash or go into an infinite loop if invoked recursively, as for example by a second SI Reset message arriving while we are still processing a prior one.
-
- 22 Dec, 2000 1 commit
-
-
Tom Lane authored
table that inherits from a temp table. Make sure the right things happen if one creates a temp table, creates another temp that inherits from it, then renames the first one. (Previously, system would end up trying to delete the temp tables in the wrong order.)
-
- 09 Dec, 2000 1 commit
-
-
Tom Lane authored
-
- 08 Dec, 2000 1 commit
-
-
Hiroshi Inoue authored
-
- 30 Nov, 2000 2 commits
-
-
Tom Lane authored
both MULTIBYTE and TOAST prevent char(n) from being truly fixed-size. Simplify and speed up fastgetattr() and index_getattr() macros by eliminating special cases for attnum=1. It's just as fast to handle the first attribute by presetting its attcacheoff to zero; so do that instead when loading the tupledesc in relcache.c.
-
Vadim B. Mikheev authored
-
- 10 Nov, 2000 1 commit
-
-
Tom Lane authored
message about recursive use of a syscache. Also remove most of the specialized indexscan routines in indexing.c --- it turns out that catcache.c is perfectly able to perform the indexscan for itself, in fact has already looked up all the information needed to do so! This should be faster as well as needing far less boilerplate code.
-
- 08 Nov, 2000 1 commit
-
-
Tom Lane authored
(WAL logging for this is not done yet, however.) Clean up a number of really crufty things that are no longer needed now that DROP behaves nicely. Make temp table mapper do the right things when drop or rename affecting a temp table is rolled back. Also, remove "relation modified while in use" error check, in favor of locking tables at first reference and holding that lock throughout the statement.
-
- 28 Oct, 2000 1 commit
-
-
Vadim B. Mikheev authored
-