aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access
Commit message (Collapse)AuthorAge
...
* Standardize on MAXPGPATH as the size of a file pathname buffer,Tom Lane1999-10-25
| | | | | | | eliminating some wildly inconsistent coding in various parts of the system. I set MAXPGPATH = 1024 in config.h.in. If anyone is really convinced that there ought to be a configure-time test to set the value, go right ahead ... but I think it's a waste of time.
* Add a notion of a 'catalog version number' that can indicateTom Lane1999-10-24
| | | | | | | | | when an initdb-forcing change has been applied within a development cycle. PG_VERSION serves this purpose for official releases, but we can't bump the PG_VERSION number every time we make a change to the catalogs during development. Instead, increase the catalog version number to warn other developers that you've made an incompatible change. See my mail to pghackers for more info.
* Look Ma, no MAX_PARSE_BUFFER! (At least not in the backend.Tom Lane1999-10-23
| | | | pg_dump and interfaces/odbc still need some work.)
* Final stage of psort reconstruction work: replace psort.c withTom Lane1999-10-17
| | | | | | | a generalized module 'tuplesort.c' that can sort either HeapTuples or IndexTuples, and is not tied to execution of a Sort node. Clean up memory leakages in sorting, and replace nbtsort.c's private implementation of mergesorting with calls to tuplesort.c.
* Check RELSEG_SIZE when postmaster starting up.Tatsuo Ishii1999-10-16
| | | | | this is neccesary to make sure that the backend and the database uses same RELSEG_SIZE.
* Add blcksz to struct ControlFileData to check BLCKSZ is sameTatsuo Ishii1999-10-12
| | | | as BLCKSZ which the backend was compiled in.
* The 1st step to implement new type of scan,TidScan.Hiroshi Inoue1999-10-11
| | | | | Now WHERE restriction on ctid is allowed though it is sequentially scanned.
* XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.Vadim B. Mikheev1999-10-06
| | | | | First step in cleaning up backend initialization code. Fix for FATAL: now FATAL is ERROR + exit.
* 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.
* This is part #1 for of the DEFERRED CONSTRAINT TRIGGER support.Jan Wieck1999-09-29
| | | | | | | | | | | | Implements the CREATE CONSTRAINT TRIGGER and SET CONSTRAINTS commands. TODO: Generic builtin trigger procedures Automatic execution of appropriate CREATE CONSTRAINT... at CREATE TABLE Support of new trigger type in pg_dump Swapping of huge # of events to disk Jan
* Make tree compilable (+WAL).Vadim B. Mikheev1999-09-28
|
* Currently,only the first column of multi-column indicesBruce Momjian1999-09-27
| | | | | | | | | | | | | is used to find start scan position of Indexscan-s. To speed up finding scan start position,I have changed _bt_first() to use as many keys as possible. I'll attach the patch here. Regards. Hiroshi Inoue
* Transaction log manager core code.Vadim B. Mikheev1999-09-27
| | | | It doesn't work currently but also don't break anything -:)
* Several changes here, not very related but touching some of the same files.Tom Lane1999-09-24
| | | | | | | | | | | | | | | | | | | | | * Buffer refcount cleanup (per my "progress report" to pghackers, 9/22). * Add links to backend PROC structs to sinval's array of per-backend info, and use these links for routines that need to check the state of all backends (rather than the slow, complicated search of the ShmemIndex hashtable that was used before). Add databaseOID to PROC structs. * Use this to implement an interlock that prevents DESTROY DATABASE of a database containing running backends. (It's a little tricky to prevent a concurrently-starting backend from getting in there, since the new backend is not able to lock anything at the time it tries to look up its database in pg_database. My solution is to recheck that the DB is OK at the end of InitPostgres. It may not be a 100% solution, but it's a lot better than no interlock at all...) * In ALTER TABLE RENAME, flush buffers for the relation before doing the rename of the physical files, to ensure we don't get failures later from mdblindwrt(). * Update TRUNCATE patch so that it actually compiles against current sources :-(. You should do "make clean all" after pulling these changes.
* 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.
* Changes made by Hiroshi Inoue and approved by Vadim.Tatsuo Ishii1999-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See attached mail for more details. ------------------------------------------------------------------- From: "Vadim Mikheev" <vadim@krs.ru> To: "Hiroshi Inoue" <Inoue@tpf.co.jp> References: <000201befa94$42fe04c0$2801007e@cadzone.tpf.co.jp> Subject: Re: elog(ERROR) in vacuum Date: Fri, 10 Sep 1999 10:27:10 +0900 Organization: OJSC Rostelecom (Krasnoyarsk) Message-ID: <37D85E6E.5AFA126D@krs.ru> Hiroshi Inoue wrote: > > Hello Vadim, > > I have a question about vacuum. > > VACUUM has a phase like commit which calls TransactionIdCommit(). > But if elog(ERROR) occured after that,the status of transaction is > changed from XID_COMMIT to XID_ABORT. > > Seems to me this causes inconsistency. > Shoudn't AbortTransaction() be changed not to call TransacionIdAbort() > in case of vacuum. You're right! As usual -:) Vadim
* Repair incorrect cleanup of heap memory allocation duringTom Lane1999-09-09
| | | | | | transaction abort --- before it only worked if there was exactly one level of allocation context stacked in the blank portal. Now it does the right thing for any depth, including zero...
* IsTransactionBlock() should return true in TBLOCK_ABORT state.Tom Lane1999-09-05
|
* Invalidate temp entries for aborted transactions.Bruce Momjian1999-09-04
|
* Modify RelationFlushRelation so that if the relcache entryTom Lane1999-09-04
| | | | | | | | | | | 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.
* Re-use free space on index pages with duplicates.Vadim B. Mikheev1999-08-09
|
* Fix nbtree's failure to clear BTScans list during xact abort.Tom Lane1999-08-08
| | | | | | Also, move responsibility for calling vc_abort into main xact.c list of things-to-call-at-abort. What in the world was it doing down inside of TransactionIdAbort()?
* Install new alignment code to use MAXALIGN rather than DOUBLEALIGN whereBruce Momjian1999-07-19
| | | | approproate.
* Clean up gcc warning about unused static decl.Tom Lane1999-07-19
|
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Fix silly typo in commentary...Tom Lane1999-07-17
|
* Revise _bt_binsrch() so that its binary search loop takesTom Lane1999-07-16
| | | | | | care of equal-key cases, eliminating bt_firsteq(). The linear search formerly done by bt_firsteq() took a lot of time in the case where many equal keys appear on the same page.
* Final cleanup.Bruce Momjian1999-07-16
|
* Change #include's to use <> and "" as appropriate.Bruce Momjian1999-07-15
|
* Remove unused #includes in *.c files.Bruce Momjian1999-07-15
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-15
|
* Cleanup of /include #include's, for 6.6 only.Bruce Momjian1999-07-14
|
* cleanupBruce Momjian1999-07-09
|
* Update tuple size check.Bruce Momjian1999-07-03
|
* Fix for insertion of tuple too large.Bruce Momjian1999-07-03
|
* Fix to prevent too large tuple from being created.Bruce Momjian1999-07-03
|
* typo fix.Bruce Momjian1999-07-02
|
* Avoid disk writes for read-only transactions.Vadim B. Mikheev1999-06-29
|
* Change form() to varargform() to prevent portability problems.Bruce Momjian1999-06-19
|
* Reversed out Massimo patch.Bruce Momjian1999-06-12
|
* I don't like last minute patches before the final freeze, but I believe thatBruce Momjian1999-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this one could be useful for people experiencing out-of-memory crashes while executing queries which retrieve or use a very large number of tuples. The problem happens when storage is allocated for functions results used in a large query, for example: select upper(name) from big_table; select big_table.array[1] from big_table; select count(upper(name)) from big_table; This patch is a dirty hack that fixes the out-of-memory problem for the most common cases, like the above ones. It is not the final solution for the problem but it can work for some people, so I'm posting it. The patch should be safe because all changes are under #ifdef. Furthermore the feature can be enabled or disabled at runtime by the `free_tuple_memory' options in the pg_options file. The option is disabled by default and must be explicitly enabled at runtime to have any effect. To enable the patch add the follwing line to Makefile.custom: CUSTOM_COPT += -DFREE_TUPLE_MEMORY To enable the option at runtime add the following line to pg_option: free_tuple_memory=1 Massimo
* 1. Fix for elog(ERROR, "EvalPlanQual: t_xmin is uncommitted ?!")Vadim B. Mikheev1999-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and possibly for other cases too: DO NOT cache status of transaction in unknown state (i.e. non-committed and non-aborted ones) Example: T1 reads row updated/inserted by running T2 and cache T2 status. T2 commits. Now T1 reads a row updated by T2 and with HEAP_XMAX_COMMITTED in t_infomask (so cached T2 status is not changed). Now T1 EvalPlanQual gets updated row version without HEAP_XMIN_COMMITTED -> TransactionIdDidCommit(t_xmin) and TransactionIdDidAbort(t_xmin) return FALSE and T2 decides that t_xmin is not committed and gets ERROR above. It's too late to find more smart way to handle such cases and so I just changed xact status caching and got rid TransactionIdFlushCache() from code. Changed: transam.c, xact.c, lmgr.c and transam.h - last three just because of TransactionIdFlushCache() is removed. 2. heapam.c: T1 marked a row for update. T2 waits for T1 commit/abort. T1 commits. T3 updates the row before T2 locks row page. Now T2 sees that new row t_xmax is different from xact id (T1) T2 was waiting for. Old code did Assert here. New one goes to HeapTupleSatisfiesUpdate. Obvious changes too. 3. Added Assert to vacuum.c 4. bufmgr.c: break Assert(buf->r_locks == 0 && !buf->ri_lock) into two Asserts.
* Concurrency... Highest one...Vadim B. Mikheev1999-06-07
| | | | | | DO NOT EVEN TRY TO DO PageGetMaxOffsetNumber BEFORE LockBuffer! -:)
* Have to release meta page before reading root one!Vadim B. Mikheev1999-06-07
| | | | < 6.5 versions were just not affected by this bug due to locking.
* 1. xact.c: update comments about changing MyProc->xid and MyProc->xmin.Vadim B. Mikheev1999-06-06
| | | | | | | | | | | 2. varsup.c:ReadNewTransactionId(): don't read nextXid from disk - this func doesn't allocate next xid, so ShmemVariableCache->nextXid may be used (but GetNewTransactionId() must be called first). 3. vacuum.c: change elog(ERROR, "Child item....") to elog(NOTICE) - this is not ERROR, proper handling is just not implemented, yet. 4. s_lock.c: increase S_MAX_BUSY by 2 times. 5. shmem.c:GetSnapshotData(): have to call ReadNewTransactionId() _after_ SpinAcquire(ShmemIndexLock).
* 1. Additional fix against ERROR: Child itemid marked as unusedVadim B. Mikheev1999-06-03
| | | | | in CommitTransaction(). 2. Changes in GetSnapshotData().
* 1. MyProc->xid assignment is moved to GetNewTransactionId so newerVadim B. Mikheev1999-06-03
| | | | | | | | | | | | | | transactions will not assume that MyProc transaction was committed before snapshot calculations. With old MyProc->xid assignment (in xact.c:StartTransaction()) there was ability to see the same row twice (I used gdb for this)!... 2. Assignments of InvalidTransactionId to MyProc->xid and MyProc->xmin are moved from xact.c:CommitTransaction() to xact.c:RecordTransactionCommit() - this invalidation must be done before releasing transaction locks or bad (too high) XmaxRecent value might be used by vacuum ("ERROR: Child itemid marked as unused" reported by "Hiroshi Inoue" <Inoue@tpf.co.jp>; once again, gdb allowed me reproduce this error).
* Clean up memory leaks in LO operations by freeing LO's privateTom Lane1999-05-31
| | | | memory context at transaction commit or abort.
* Make functions static or NOT_USED as appropriate.Bruce Momjian1999-05-26
|
* Another pgindent run. Sorry folks.Bruce Momjian1999-05-25
|