- 06 Aug, 2002 1 commit
-
-
Tom Lane authored
The local buffer manager is no longer used for newly-created relations (unless they are TEMP); a new non-TEMP relation goes through the shared bufmgr and thus will participate normally in checkpoints. But TEMP relations use the local buffer manager throughout their lifespan. Also, operations in TEMP relations are not logged in WAL, thus improving performance. Since it's no longer necessary to fsync relations as they move out of the local buffers into shared buffers, quite a lot of smgr.c/md.c/fd.c code is no longer needed and has been removed: there's no concept of a dirty relation anymore in md.c/fd.c, and we never fsync anything but WAL. Still TODO: improve local buffer management algorithms so that it would be reasonable to increase NLocBuffer.
-
- 02 Aug, 2002 1 commit
-
-
Tom Lane authored
in the relcache. It's rather silly that we have reference count leak checks in bufmgr and in catcache, but not in relcache which will normally have many fewer entries. Chris K-L would have caught at least one bug in his recent DROP patch if he'd had this.
-
- 20 Jun, 2002 1 commit
-
-
Bruce Momjian authored
-
- 26 Mar, 2002 1 commit
-
-
Tom Lane authored
in schemas other than the system namespace; however, there's no search path yet, and not all operations work yet on tables outside the system namespace.
-
- 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).
-
- 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.
-
- 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.
-
- 24 Jan, 2001 1 commit
-
-
Bruce Momjian authored
-
- 21 Nov, 2000 1 commit
-
-
Peter Eisentraut authored
-
- 23 Oct, 2000 1 commit
-
-
Vadim B. Mikheev authored
from bufmgr - it would be nice to have separate hash in smgr for node <--> fd mappings, but for the moment it's easy to add new hash to relcache. Fixed small bug in xlog.c:ReadRecord.
-
- 06 Aug, 2000 1 commit
-
-
Tom Lane authored
that giving pg_proc a toast table required solving the same problems we'd have to solve for pg_class --- pg_proc is one of the relations that gets bootstrapped in relcache.c. Solution is to go back at the end of initialization and read in the *real* pg_class row to replace the phony entry created by formrdesc(). This should work as long as there's no need to touch any toasted values during initialization, which seems a reasonable assumption. Although I did not add a toast-table for every single system table with a varlena attribute, I believe that it would work to just do ALTER TABLE pg_class CREATE TOAST TABLE. So anyone who's really intent on having several thousand ACL entries for a rel could do it. NOTE: I didn't force initdb, but you must do one to see the effects of this patch.
-
- 17 Jun, 2000 1 commit
-
-
Tom Lane authored
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.
-
- 31 Jan, 2000 1 commit
-
-
Tom Lane authored
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.
-
- 26 Jan, 2000 1 commit
-
-
Bruce Momjian authored
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
-
- 22 Jan, 2000 1 commit
-
-
Peter Eisentraut authored
-
- 21 Nov, 1999 1 commit
-
-
Tom Lane authored
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.
-
- 03 Oct, 1999 1 commit
-
-
Tom Lane authored
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.
-
- 04 Sep, 1999 1 commit
-
-
Tom Lane authored
has positive refcount, it is rebuilt from pg_class data. This ensures that relcache entries will track changes made by other backends. Formerly, a shared inval report would just be ignored if it happened to arrive while the relcache entry was in use. Also, fix relcache to reset ref counts to zero during transaction abort. Finally, change LockRelation() so that it checks for shared inval reports after obtaining the lock. In this way, once any kind of lock has been obtained on a rel, we can trust the relcache entry to be up-to-date.
-
- 15 Jul, 1999 1 commit
-
-
Bruce Momjian authored
-
- 01 May, 1999 1 commit
-
-
Tom Lane authored
to save a little bit of backend startup time. This way, the first backend started after a VACUUM will rebuild the init file with up-to-date statistics for the critical system indexes.
-
- 13 Feb, 1999 1 commit
-
-
Bruce Momjian authored
-
- 01 Sep, 1998 1 commit
-
-
Bruce Momjian authored
-
- 24 Jan, 1998 1 commit
-
-
Bruce Momjian authored
-
- 08 Sep, 1997 1 commit
-
-
Bruce Momjian authored
Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.
-
- 07 Sep, 1997 1 commit
-
-
Bruce Momjian authored
-
- 19 Aug, 1997 1 commit
-
-
Bruce Momjian authored
-
- 04 Jun, 1997 1 commit
-
-
Vadim B. Mikheev authored
-
- 10 Nov, 1996 1 commit
-
-
Bruce Momjian authored
-
- 04 Nov, 1996 1 commit
-
-
Marc G. Fournier authored
-
- 31 Oct, 1996 1 commit
-
-
Marc G. Fournier authored
#include "postgres.h" #include "c.h"
-
- 28 Aug, 1996 1 commit
-
-
Marc G. Fournier authored
- centralizing to simplify the -I's required to compile
-
- 09 Jul, 1996 1 commit
-
-
Marc G. Fournier authored
-