summaryrefslogtreecommitdiff
path: root/src/backend/commands
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup of code for creating index entries. Functional indexes withTom Lane2000-07-145-508/+242
| | | | | | | | | | | | | pass-by-ref data types --- eg, an index on lower(textfield) --- no longer leak memory during index creation or update. Clean up a lot of redundant code ... did you know that copy, vacuum, truncate, reindex, extend index, and bootstrap each basically duplicated the main executor's logic for extracting information about an index and preparing index entries? Functional indexes should be a little faster now too, due to removal of repeated function lookups. CREATE INDEX 'opt_type' clause is deimplemented by these changes, but I haven't removed it from the parser yet (need to merge with Thomas' latest change set first).
* Implement SET SESSION CHARACTERISTICS and SET DefaultXactIsoLevel.Thomas G. Lockhart2000-07-141-2/+73
|
* First stage of reclaiming memory in executor by resetting short-termTom Lane2000-07-121-31/+9
| | | | | | memory contexts. Currently, only leaks in expressions executed as quals or projections are handled. Clean up some old dead cruft in executor while at it --- unused fields in state nodes, that sort of thing.
* Remove long-dead support for invoking queries from dynamically loadedTom Lane2000-07-081-1/+2
| | | | | | backend functions via backend PQexec(). The SPI interface has long been our only documented way to do this, and the backend pqexec/portal code is unused and suffering bit-rot. I'm putting it out of its misery.
* Update textin() and textout() to new fmgr style. This is just phaseTom Lane2000-07-059-36/+49
| | | | | one of updating the whole text datatype, but there are so dang many calls of these two routines that it seems worth a separate commit.
* Changed TOAST relations to have relkind RELKIND_TOASTVALUE.Jan Wieck2000-07-052-14/+67
| | | | | | | | | | | | | Special handling of TOAST relations during VACUUM. TOAST relations are vacuumed while the lock on the master table is still active. The ANALYZE flag doesn't propagate to their vacuuming because the toaster access routines allways use index access ignoring stats, so why compute them at all. Protection of TOAST relations against normal INSERT/UPDATE/DELETE while offering SELECT for debugging purposes. Jan
* Small fix for ALTER TABLE xxx* ADD COLUMN ...Jan Wieck2000-07-051-3/+7
| | | | | | Inherited child tables must not be open during creation of TOAST table Jan
* Automatically create toast tables on ALTER TABLE ... ADD COLUMNJan Wieck2000-07-051-1/+21
| | | | | | and SELECT ... INTO ... too. Jan
* Bugfix in ALTER TABLE CREATE TOAST TABLEJan Wieck2000-07-051-35/+48
| | | | | | | Automatically create toast table at CREATE TABLE if new table has toastable attributes. Jan
* Make toast-table creation and deletion work somewhat reliably.Tom Lane2000-07-046-50/+71
| | | | | | | Don't go through pg_exec_query_dest(), but directly to the execution routines. Also, extend parameter lists so that there's no need to change the global setting of allowSystemTableMods, a hack that was certain to cause trouble in the event of any error.
* TOASTJan Wieck2000-07-032-5/+183
| | | | | | | | WARNING: This is actually broken - we have self-deadlocks due to concurrent changes in buffer management. Vadim and me are working on it. Jan
* Clean up memory-context stuff, other minor infelicities.Tom Lane2000-07-031-58/+74
|
* RemoveView was doing things the hard way...Tom Lane2000-06-301-17/+3
|
* Use a private memory context to store rule information in each relcacheTom Lane2000-06-301-15/+33
| | | | | | | | | | | | | | entry that has rules. This allows us to release the rule parsetrees on relcache flush without needing a working freeObject() routine. Formerly, the rule trees were leaked permanently at relcache flush. Also, clean up handling of rule creation and deletion --- there was not sufficient locking of the relation being modified, and there was no reliable notification of other backends that a relcache reload was needed. Also, clean up relcache.c code so that scans of system tables needed to load a relcache entry are done in the caller's memory context, not in CacheMemoryContext. This prevents any un-pfreed memory from those scans from becoming a permanent memory leak.
* Suppress memory leak in COPY WITH OIDS TO wherever.Tom Lane2000-06-281-4/+5
|
* First phase of memory management rewrite (see backend/utils/mmgr/READMETom Lane2000-06-285-151/+103
| | | | | | | | | | | | | for details). It doesn't really do that much yet, since there are no short-term memory contexts in the executor, but the infrastructure is in place and long-term contexts are handled reasonably. A few long- standing bugs have been fixed, such as 'VACUUM; anything' in a single query string crashing. Also, out-of-memory is now considered a recoverable ERROR, not FATAL. Eliminate a large amount of crufty, now-dead code in and around memory management. Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and backend startup.
* Relaxed pickiness about user and group commands in transaction blocks.Peter Eisentraut2000-06-251-37/+5
|
* Second pass over run-time configuration system. Adjust priorities on somePeter Eisentraut2000-06-221-53/+4
| | | | | | | | | | | | | | | | | | | option settings. Sort out SIGHUP vs BACKEND -- there is no total ordering here, so make explicit checks. Add comments explaining all of this. Removed permissions check on SHOW command. Add examine_subclass to the game, rename to SQL_inheritance to fit the official data model better. Adjust documentation. Standalone backend needs to reset all options before it starts. To facilitate that, have IsUnderPostmaster be set by the postmaster itself, don't wait for the magic -p switch. Also make sure that all environment variables and argv's survive init_ps_display(). Use strdup where necessary. Have initdb make configuration files (postgresql.conf, pg_hba.conf) mode 0600 -- having configuration files is no fun if you can't edit them.
* Make renaming a temp table behave sensibly. We don't need to touchTom Lane2000-06-201-1/+9
| | | | | the underlying table at all, just change the mapping entry ... but that logic was missing.
* Reimplement nodeMaterial to use a temporary BufFile (or even memory, if theTom Lane2000-06-181-4/+1
| | | | | | | | | | 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.
* Get rid of IndexIsUniqueNoCache() kluge by the simple expedient ofTom Lane2000-06-172-9/+8
| | | | | | | passing the index-is-unique flag to index build routines (duh! ... why wasn't it done this way to begin with?). Aside from eliminating an eyesore, this should save a few milliseconds in btree index creation because a full scan of pg_index is not needed any more.
* Fix performance problems with pg_index lookups (see, for example,Tom Lane2000-06-173-126/+52
| | | | | | | | | | 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.
* Final #include cleanup.Bruce Momjian2000-06-151-6/+1
|
* Clean up #include's.Bruce Momjian2000-06-153-3/+6
|
* Big warnings cleanup for Solaris/GCC. Down to about 40 now, butPeter Eisentraut2000-06-143-12/+12
| | | | | | | | | | | we'll get there one day. Use `cat' to create aclocal.m4, not `aclocal'. Some people don't have automake installed. Only run the autoconf rule in the top-level GNUmakefile if the invoker specified `make configure', don't run it automatically because of CVS timestamp skew.
* Rename rule CURRENT to OLD in source tree. Add mapping for backwardBruce Momjian2000-06-121-5/+5
| | | | compatiblity with old rules.
* Back out pg_shadow changes to allow create table and locking permissions.Bruce Momjian2000-06-123-72/+7
|
* Update sequence-related functions to new fmgr style. Remove downcasing,Tom Lane2000-06-111-23/+83
| | | | | | | | quote-stripping, and acl-checking tasks for these functions from the parser, and do them at function execution time instead. This fixes the failure of pg_dump to produce correct output for nextval(Foo) used in a rule, and also eliminates the restriction that the argument of these functions must be a parse-time constant.
* I have large database and with this DB work more users and I very needBruce Momjian2000-06-093-7/+72
| | | | | | | | | | | | | | | | | | | | | | | | more restriction for fretful users. The current PG allow define only NO-CREATE-DB and NO-CREATE-USER restriction, but for some users I need NO-CREATE-TABLE and NO-LOCK-TABLE. This patch add to current code NOCREATETABLE and NOLOCKTABLE feature: CREATE USER username [ WITH [ SYSID uid ] [ PASSWORD 'password' ] ] [ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ] -> [ CREATETABLE | NOCREATETABLE ] [ LOCKTABLE | NOLOCKTABLE ] ...etc. If CREATETABLE or LOCKTABLE is not specific in CREATE USER command, as default is set CREATETABLE or LOCKTABLE (true). A user with NOCREATETABLE restriction can't call CREATE TABLE or SELECT INTO commands, only create temp table is allow for him. Karel
* Inheritance overhaul by Chris Bitmead <chris@bitmead.com>Bruce Momjian2000-06-092-3/+95
|
* Another round of updates for new fmgr, mostly in the datetime code.Tom Lane2000-06-091-5/+7
|
* Mark functions as static and ifdef NOT_USED as appropriate.Bruce Momjian2000-06-083-7/+8
|
* Re-order pg_listener index so it can later be used in an index scan.Bruce Momjian2000-06-071-24/+9
|
* Update for 7.0.2.Bruce Momjian2000-06-051-2/+2
|
* Latest round of fmgr updates. All functions with bool,char, or int2Tom Lane2000-06-052-4/+7
| | | | | | | 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.
* Disallow CLOSE of reserved system portal names.Tom Lane2000-06-041-1/+6
|
* New ps display code, works on more platforms.Peter Eisentraut2000-06-041-3/+3
| | | | | | Install a default configuration file. Clean up some funny business in the config file code.
* Remove NT-specific file open defines by defining our own open macros forBruce Momjian2000-06-021-12/+3
| | | | "rb" and "wb".
* If create/drop database are going to call closeAllVfds(), they oughtTom Lane2000-06-021-17/+19
| | | | | to do it at the last moment before calling system() ... not at some randomly-chosen earlier point in the routine ...
* Create an fd.c entry point that is just like plain open(2) except thatTom Lane2000-06-021-5/+5
| | | | | | | | | | it will close VFDs if necessary to surmount ENFILE or EMFILE failures. Make use of this in md.c, xlog.c, and user.c routines that were formerly vulnerable to these failures. In particular, this should handle failures of mdblindwrt() that have been observed under heavy load conditions. (By golly, every other process on the system may crash after Postgres eats up all the kernel FDs, but Postgres will keep going!)
* The heralded `Grand Unified Configuration scheme' (GUC)Peter Eisentraut2000-05-312-748/+108
| | | | | | | | | | | | | That means you can now set your options in either or all of $PGDATA/configuration, some postmaster option (--enable-fsync=off), or set a SET command. The list of options is in backend/utils/misc/guc.c, documentation will be written post haste. pg_options is gone, so is that pq_geqo config file. Also removed were backend -K, -Q, and -T options (no longer applicable, although -d0 does the same as -Q). Added to configure an --enable-syslog option. changed all callers from TPRINTF to elog(DEBUG)
* Added header files required for ALTER TABLE DROP COLUMNHiroshi Inoue2000-05-301-1/+6
| | | | trial implementation.
* Third round of fmgr updates: eliminate calls using fmgr() andTom Lane2000-05-302-92/+109
| | | | | fmgr_faddr() in favor of new-style calls. Lots of cleanup of sloppy casts to use XXXGetDatum and DatumGetXXX ...
* Remove unused include files. Do not touch /port or includes used by defines.Bruce Momjian2000-05-309-48/+8
|
* Add analyze.c file for split.Bruce Momjian2000-05-291-0/+635
|
* Split vacuum and analyze into separate filesBruce Momjian2000-05-292-602/+4
|
* Update messages.Bruce Momjian2000-05-291-2/+2
|
* Make analyze do vacuum/analyze in one step.Bruce Momjian2000-05-291-5/+5
|
* More vacuum cleanupBruce Momjian2000-05-291-227/+228
|
* more cleanupBruce Momjian2000-05-291-18/+18
|