summaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
AgeCommit message (Collapse)Author
2000-08-30Back-patch fix to ensure we abort any open transaction at backend exit.Tom Lane
2000-05-21Add debug code to aid in memory-leak tracking: if SHOW_MEMORY_STATS isTom Lane
defined then statistics about memory usage of all the global memory contexts are printed after each commit.
2000-04-30Reset CurrentMemoryContext to TopMemoryContext at the beginning of errorTom Lane
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.
2000-04-28Setting statistic options from SET PG_OPTIONS caused a backend crashTom Lane
because StatFp never got set in that case. Set it immediately before use to eliminate such problems.
2000-04-237.0 buffer manager can support different backends running with differentTom Lane
fsync settings, so the -F option no longer needs to be treated as secure.
2000-04-12Ye-old pgindent run. Same 4-space tabs.Bruce Momjian
2000-04-04Actually, that still wasn't quite right. If we skip a query because ofTom Lane
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.
2000-04-04Fix bug noted by Bruce: FETCH in an already-aborted transaction blockTom Lane
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.
2000-03-23>> 5. empty define that results in an empty but terminated line ( ; )Bruce Momjian
easy (maybe dumb) fix for 5 in attachment define.patch greetings, Andreas
2000-03-01Remove using puts() to print messages. Instead use TPRINTF.Tatsuo Ishii
2000-02-22Change cancel while waiting-for-lock stuff.Hiroshi Inoue
2000-02-21fix the TODOHiroshi Inoue
* Allow PQrequestCancel() to terminate when in waiting-for-lock state Changes are limited to BACKEND,however.
2000-02-20Reduce proc_exit(1) to proc_exit(0) for errors detected in backendTom Lane
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...
2000-02-19Get rid of postgres.c's separate parsing logic for PGDATESTYLE env.Tom Lane
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.
2000-02-18Implement reindex commandHiroshi Inoue
2000-01-26Add:Bruce Momjian
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
2000-01-22Revise handling of index-type-specific indexscan cost estimation, perTom Lane
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).
2000-01-09Do not start if postmaster is running.Tatsuo Ishii
1999-12-22to live in a transaction before access to dbHiroshi Inoue
during backend startup.
1999-11-16Modify elog() logic so that it won't try to longjmp(Warn_restart) beforeTom Lane
Warn_restart has been set by the backend main loop. This means that elog(ERROR) or elog(FATAL) in the postmaster or during backend startup now have well-defined behavior: proc_exit() rather than coredump. In the case of elog() inside the postmaster, I think that proc_exit() is probably not enough --- don't we want our child backends to be forced to quit too? But I don't understand Vadim's recent changes in this area, so I'll leave it to him to look over and tweak if needed.
1999-10-25Standardize on MAXPGPATH as the size of a file pathname buffer,Tom Lane
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.
1999-10-23Look Ma, no MAX_PARSE_BUFFER! (At least not in the backend.Tom Lane
pg_dump and interfaces/odbc still need some work.)
1999-10-08Update display of debug levels.Bruce Momjian
1999-10-08clean up debug flags.Bruce Momjian
1999-10-08Cleanup -is flag to -l for SSL. Another PERL variable name fix. CleanBruce Momjian
up debugging options for postmaster and postgres programs. postmaster -d is no longer optional. Documentation updates.
1999-10-06XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.Vadim B. Mikheev
First step in cleaning up backend initialization code. Fix for FATAL: now FATAL is ERROR + exit.
1999-09-29This is part #1 for of the DEFERRED CONSTRAINT TRIGGER support.Jan Wieck
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
1999-09-24Several changes here, not very related but touching some of the same files.Tom Lane
* 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.
1999-08-31Commit the bulk of Mike Ansley's long-query changes in theTom Lane
backend. Still much left to do.
1999-07-22Plug several holes in backend's ability to cope withTom Lane
unexpected loss of connection to frontend.
1999-07-19Re-add getopt.h check, remove NT-specific tests for it.Bruce Momjian
1999-07-17 Move some system includes into c.h, and remove duplicates.Bruce Momjian
1999-07-16Final cleanupBruce Momjian
1999-07-16Final cleanup.Bruce Momjian
1999-07-16Update #include cleanupsBruce Momjian
1999-07-15Remove unused #includes in *.c files.Bruce Momjian
1999-07-15Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian
1999-07-02Fix for removal of temp tables if last transaction was aborted.Bruce Momjian
1999-05-291. Run all pg_dump queries in single serializable transaction.Vadim B. Mikheev
2. Get rid of locking when updating statistics in vacuum. 3. Use QuerySnapshot in COPY TO and call SetQuerySnashot in main tcop loop before FETCH and COPY TO.
1999-05-26Make functions static or NOT_USED as appropriate.Bruce Momjian
1999-05-25pgindent run over code.Bruce Momjian
1999-05-22Modify backend switch parsing to prevent 'insecure' switchesTom Lane
from being accepted when they are passed from client connection request. Get rid of a couple that no longer do anything (like -P).
1999-05-22Make postgres prompt backend>, and remove PARSEDEBUG.Bruce Momjian
1999-05-13Rip out QueryTreeList structure, root and branch. QuerytreeTom Lane
lists are now plain old garden-variety Lists, allocated with palloc, rather than specialized expansible-array data allocated with malloc. This substantially simplifies their handling and eliminates several sources of memory leakage. Several basic types of erroneous queries (syntax error, attempt to insert a duplicate key into a unique index) now demonstrably leak zero bytes per query.
1999-05-11Changed debug options:Jan Wieck
-d4 now prints compressed trees from nodeToString() -d5 prints pretty trees via nodeDisplay() new pg_options: pretty_plan, pretty_parse, pretty_rewritten Jan
1999-05-09Rearrange top-level rewrite operations so that EXPLAIN worksTom Lane
on queries involving UNION, EXCEPT, INTERSECT.
1999-05-03here are some patches for 6.5.0 which I already submitted but have neverBruce Momjian
been applied. The patches are in the .tar.gz attachment at the end: varchar-array.patch this patch adds support for arrays of bpchar() and varchar(), which where always missing from postgres. These datatypes can be used to replace the _char4, _char8, etc., which were dropped some time ago. block-size.patch this patch fixes many errors in the parser and other program which happen with very large query statements (> 8K) when using a page size larger than 8192. This patch is needed if you want to submit queries larger than 8K. Postgres supports tuples up to 32K but you can't insert them because you can't submit queries larger than 8K. My patch fixes this problem. The patch also replaces all the occurrences of `8192' and `1<<13' in the sources with the proper constants defined in include files. You should now never find 8192 hardwired in C code, just to make code clearer. -- Massimo Dal Zotto
1999-05-01-T was omitted from getopt() call.Tom Lane
1999-04-25Revise backend libpq interfaces so that messages to the frontendTom Lane
can be generated in a buffer and then sent to the frontend in a single libpq call. This solves problems with NOTICE and ERROR messages generated in the middle of a data message or COPY OUT operation.
1999-04-20Change elog(ERROR) to get back to main loop via a plain sigsetjmp,Tom Lane
instead of doing a kill(self, SIGQUIT) and expecting the signal handler to do it. Also, clean up inconsistent definitions of the sigjmp buffer in the several files that already referenced it.