aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
Commit message (Collapse)AuthorAge
* Update and polish postmaster and postgres help output and man pages.Peter Eisentraut2000-11-14
|
* Add '-c name=val' flag for setting run-time parameters.Peter Eisentraut2000-11-08
|
* Add -V option to backend, to show version, since --version doesn't seemPeter Eisentraut2000-11-06
| | | | | to work everywhere. Also, on FreeBSD you need to set the optreset variable to 1 before parsing the command line a second time with getopt().
* Make the backend grok relative paths for the data directory by convertingPeter Eisentraut2000-11-04
| | | | it to an absolute path.
* beos fixes from Cyril VELTERBruce Momjian2000-10-28
|
* Add --version and --help options to "postgres".Peter Eisentraut2000-10-28
|
* Fix breakage I introduced yesterday in MULTIBYTE compilations.Tom Lane2000-10-26
| | | | Sorry 'bout that, chief...
* Check for SIGHUP and process config file updates just after waitingTom Lane2000-10-24
| | | | for input, not just before.
* The beos port in the source tree doesn't even compile. and evenBruce Momjian2000-10-07
| | | | | | | | | | | | | | | | | | | | | after that dynamic loading isn't working and shared memory handling is broken. Attached with this message, there is a Zip file which contain : * beos.diff = patch file generated with difforig * beos = folder with beos support files which need to be moved in / src/backend/port * expected = foler with three file for message and precision difference in regression test * regression.diff = rule problem (need to kill the backend manualy) * dynloader = dynloader files (they are also in the pacth files, but there is so much modification that I have join full files) Everything works except a problem in 'rules' Is there some problems with rules in the current tree ? It used to works with last week tree. Cyril VELTER
* Second thoughts about where to put DeferredTriggerEndQuery() call.Tom Lane2000-10-07
|
* Arrange that no database accesses are attempted during parser() --- thisTom Lane2000-10-07
| | | | | | | | | | | | | | | took some rejiggering of typename and ACL parsing, as well as moving parse_analyze call out of parser(). Restructure postgres.c processing so that parse analysis and rewrite are skipped when in abort-transaction state. Only COMMIT and ABORT statements will be processed beyond the raw parser() phase. This addresses problem of parser failing with database access errors while in aborted state (see pghackers discussions around 7/28/00). Also fix some bugs with COMMIT/ABORT statements appearing in the middle of a single query input string. Function, operator, and aggregate arguments/results can now use full TypeName production, in particular foo[] for array types. DROP OPERATOR and COMMENT ON OPERATOR were broken for unary operators. Allow CREATE AGGREGATE to accept unquoted numeric constants for initcond.
* New diff that now covers the entire tree. Applying this gets postgresqlBruce Momjian2000-10-03
| | | | | | | | | | | | | | | | | working on the VERY latest version of BeOS. I'm sure there will be alot of comments, but then if there weren't I'd be disappointed! Thanks for your continuing efforts to get this into your tree. Haven't bothered with the new files as they haven't changed. BTW Peter, the compiler is "broken" about the bool define and so on. I'm filing a bug report to try and get it addressed. Hopefully then we can tidy up the code a bit. I await the replies with interest :) David Reid
* Banish caddr_t (mostly), use Datum where appropriate.Peter Eisentraut2000-10-02
|
* Code cleanup of user name and user id handling in the backend. The currentPeter Eisentraut2000-09-06
| | | | | | | | | | | user is now defined in terms of the user id, the user name is only computed upon request (for display purposes). This is kind of the opposite of the previous state, which would maintain the user name and compute the user id for permission checks. Besides perhaps saving a few cycles (integer vs string), this now creates a single point of attack for changing the user id during a connection, for purposes of "setuid" functions, etc.
* AbortOutOfAnyTransaction() just before backend exit, to ensure thatTom Lane2000-08-30
| | | | | resources are cleaned up if the user disconnected mid-transaction. Great thanks to Hiroshi for pointing out what should have been obvious...
* Revert removal of signed, volatile, and signal handler arg type tests.Peter Eisentraut2000-08-29
|
* Remove configure tests for `signed', `volatile', and signal handler args;Peter Eisentraut2000-08-27
| | | | the harm potential outweighs the possible benefits.
* copyObject() and equal() now know about all parse-time node types,Tom Lane2000-08-11
| | | | | | | | including utility statements. Still can't copy or compare executor state, but at present that doesn't seem to be necessary. This makes it possible to execute most (all?) utility statements in plpgsql. Had to change parsetree representation of CreateTrigStmt so that it contained only legal Nodes, and not bare string constants.
* Revise aggregate functions per earlier discussions in pghackers.Tom Lane2000-07-17
| | | | | | | | | | | There's now only one transition value and transition function. NULL handling in aggregates is a lot cleaner. Also, use Numeric accumulators instead of integer accumulators for sum/avg on integer datatypes --- this avoids overflow at the cost of being a little slower. Implement VARIANCE() and STDDEV() aggregates in the standard backend. Also, enable new LIKE selectivity estimators by default. Unrelated change, but as long as I had to force initdb anyway...
* Add assert checking to GUC ("debug_assertions")Peter Eisentraut2000-07-12
| | | | | Rename settings net_server to tcpip_socket, max_backends to max_connections Add --help and --version to postmaster, reformat help output
* Here is the patch with memory leak checker. This checker allow detectBruce Momjian2000-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in-chunk leaks, overwrite-next-chunk leaks and overwrite block-freeptr leaks. A in-chunk leak --- if something overwrite space after wanted (via palloc() size, but it is still inside chunk. For example x = palloc(12); /* create 16b chunk */ memset(x, '#', 13); this leak is in the current source total invisible, because chunk is 16b and leak is in the "align space". For this feature I add data_size to StandardChunk, and all memory which go from AllocSetAlloc() is marked as 0x7F. The MemoryContextCheck() is compiled '#ifdef USE_ASSERT_CHECKING'. I add this checking to 'tcop/postgres.c' and is active after each backend query, but it is probably not sufficient, because some MemoryContext exist only during memory processing --- will good if someone who known where it is needful (Tom:-) add it for others contexts; A problem in the current source is that we have still some malloc() allocation that is not needful and this allocation is total invisible for all context routines. For example Dllist in backend (pretty dirty it is in catcache where values in Dllist are palloc-ed, but list is malloc-ed). --- and BTW. this Dllist design stand in the way for query cache :-) Tom, if you agree I start replace some mallocs. BTW. --- Tom, have you idea for across transaction presistent allocation for SQL functions? (like regex - now it is via malloc) I almost forget. I add one if() to AllocSetAlloc(), for 'size' that are greater than ALLOC_BIGCHUNK_LIMIT is not needful check AllocSetFreeIndex(), because 'fidx' is always 'ALLOCSET_NUM_FREELISTS - 1'. It a little brisk up allocation for very large chunks. Right? Karel
* Remove long-dead support for invoking queries from dynamically loadedTom Lane2000-07-08
| | | | | | 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.
* Make toast-table creation and deletion work somewhat reliably.Tom Lane2000-07-04
| | | | | | | 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.
* Move global internal files to PGDATA/global.Peter Eisentraut2000-07-03
|
* Move PGPORT envar handling to ResetAllOptions(). Improve long optionsPeter Eisentraut2000-07-03
| | | | | parsing to not clobber the optarg string -- so that we can bring SetOptsFile() up to speed.
* Add test code to copy all parse/plan trees. Repair essential omissionsTom Lane2000-06-29
| | | | | | in copyfuncs and equalfuncs exposed by regression tests. We still have some work to do: these modules really ought to handle most or all of the utility statement node types. But it's better than it was.
* First phase of memory management rewrite (see backend/utils/mmgr/READMETom Lane2000-06-28
| | | | | | | | | | | | | 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.
* Second pass over run-time configuration system. Adjust priorities on somePeter Eisentraut2000-06-22
| | | | | | | | | | | | | | | | | | | 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.
* Final #include cleanup.Bruce Momjian2000-06-15
|
* Mark functions as static and ifdef NOT_USED as appropriate.Bruce Momjian2000-06-08
|
* New ps display code, works on more platforms.Peter Eisentraut2000-06-04
| | | | | | Install a default configuration file. Clean up some funny business in the config file code.
* The heralded `Grand Unified Configuration scheme' (GUC)Peter Eisentraut2000-05-31
| | | | | | | | | | | | | 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)
* Generated header files parse.h and fmgroids.h are now copied intoTom Lane2000-05-29
| | | | | the src/include tree, so that -I backend is no longer necessary anywhere. Also, clean up some bit rot in contrib tree.
* Add debug code to aid in memory-leak tracking: if SHOW_MEMORY_STATS isTom Lane2000-05-21
| | | | | defined then statistics about memory usage of all the global memory contexts are printed after each commit.
* Reset CurrentMemoryContext to TopMemoryContext at the beginning of errorTom Lane2000-04-30
| | | | | | | | | | | | cleanup, ie, as soon as we have caught the longjmp. This ensures that current context will be a valid context throughout error cleanup. Before it was possible that current context was pointing at a context that would get deleted during cleanup, leaving any subsequent pallocs in deep trouble. I was able to provoke an Assert failure when compiled with asserts + -DCLOBBER_FREED_MEMORY, if I did something that would cause an error to be reported by the backend large-object code, because indeed that code operates in a context that gets deleted partway through xact abort --- and CurrentMemoryContext was still pointing at it! Boo hiss.
* Setting statistic options from SET PG_OPTIONS caused a backend crashTom Lane2000-04-28
| | | | | because StatFp never got set in that case. Set it immediately before use to eliminate such problems.
* 7.0 buffer manager can support different backends running with differentTom Lane2000-04-23
| | | | fsync settings, so the -F option no longer needs to be treated as secure.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Actually, that still wasn't quite right. If we skip a query because ofTom Lane2000-04-04
| | | | | | xact abort state in pg_exec_query_dest, we should continue scanning the querytree list, on the off chance that one of the later queries in the string is COMMIT or ROLLBACK.
* Fix bug noted by Bruce: FETCH in an already-aborted transaction blockTom Lane2000-04-04
| | | | | | | | | | | would crash, due to premature invocation of SetQuerySnapshot(). Clean up problems with handling of multiple queries by splitting pg_parse_and_plan into two routines. The old code would not, for example, do the right thing with END; SELECT... submitted in one query string when it had been in transaction abort state, because it'd decide to skip planning the SELECT before it had executed the END. New arrangement is simpler and doesn't force caller to plan if only parse+rewrite is needed.
* >> 5. empty define that results in an empty but terminated line ( ; )Bruce Momjian2000-03-23
| | | | | | easy (maybe dumb) fix for 5 in attachment define.patch greetings, Andreas
* Remove using puts() to print messages. Instead use TPRINTF.Tatsuo Ishii2000-03-01
|
* Change cancel while waiting-for-lock stuff.Hiroshi Inoue2000-02-22
|
* fix the TODOHiroshi Inoue2000-02-21
| | | | | * Allow PQrequestCancel() to terminate when in waiting-for-lock state Changes are limited to BACKEND,however.
* Reduce proc_exit(1) to proc_exit(0) for errors detected in backendTom Lane2000-02-20
| | | | | | command line processing. As it stood, a bogus PGOPTIONS value from a client would force a database system restart. Not bad as a denial- of-service attack...
* Get rid of postgres.c's separate parsing logic for PGDATESTYLE env.Tom Lane2000-02-19
| | | | | | | | | variable, instead calling same code in variable.c that is used to parse SET DATESTYLE. Fix bug: although backend's startup datestyle had been changed to ISO, 'RESET DATESTYLE' and 'SET DATESTYLE TO DEFAULT' didn't know about it. For consistency I have made the latter two reset to the PGDATESTYLE-defined initial value, which may not be the same as the compiled-in default of ISO.
* Implement reindex commandHiroshi Inoue2000-02-18
|
* Add:Bruce Momjian2000-01-26
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Revise handling of index-type-specific indexscan cost estimation, perTom Lane2000-01-22
| | | | | | pghackers discussion of 5-Jan-2000. The amopselect and amopnpages estimators are gone, and in their place is a per-AM amcostestimate procedure (linked to from pg_am, not pg_amop).
* Do not start if postmaster is running.Tatsuo Ishii2000-01-09
|