aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
Commit message (Collapse)AuthorAge
...
* Extend GUC concepts of parse_hook and assign_hook to all four supportedTom Lane2001-06-12
| | | | | | | | | | | | datatypes, not only strings. parse_hook is useless for bool, I suppose, but it seems possibly useful for int and double to apply variable-specific constraints that are more complex than simple range limits. assign_hook is definitely useful for all datatypes --- we need it right now for bool to support date cache reset when changing Australian timezone rule setting. Also, clean up some residual problems with the reset all/show all patch, including memory leaks and mistaken reset of PostPortNumber. It seems best that RESET ALL not touch variables that don't have SUSET or USERSET context.
* reset all: command line and .conf options change defaultsBruce Momjian2001-06-07
| | | | | | | | | | on RESET ALL those are restored. show all: GUC + non-GUC. SHOW ALL, RESET ALL Marko Kreen
* Add debug_query_string global variable for pgmonitor and debugging use.Bruce Momjian2001-04-14
|
* Add period to message.Bruce Momjian2001-03-26
|
* Change message to _the_ administrator. There is only one administrativeBruce Momjian2001-03-26
| | | | | | account. This connection has been terminated by the administrator.
* Mark exception and assert global variables as DLLIMPORT, so that plpgsqlTom Lane2001-03-23
| | | | can be compiled with asserts enabled on Windoze.
* Remove dashes in comments that don't need them, rewrap with pgindent.Bruce Momjian2001-03-22
|
* pgindent run. Make it all clean.Bruce Momjian2001-03-22
|
* 'waiting' status display had extra space, removed.Bruce Momjian2001-03-14
| | | | Change the administrator to 'an' administrator.
* New shutdown wording:Bruce Momjian2001-03-14
| | | | This connection has been terminated by the administrator
* XLOG (and related) changes:Tom Lane2001-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Store two past checkpoint locations, not just one, in pg_control. On startup, we fall back to the older checkpoint if the newer one is unreadable. Also, a physical copy of the newest checkpoint record is kept in pg_control for possible use in disaster recovery (ie, complete loss of pg_xlog). Also add a version number for pg_control itself. Remove archdir from pg_control; it ought to be a GUC parameter, not a special case (not that it's implemented yet anyway). * Suppress successive checkpoint records when nothing has been entered in the WAL log since the last one. This is not so much to avoid I/O as to make it actually useful to keep track of the last two checkpoints. If the things are right next to each other then there's not a lot of redundancy gained... * Change CRC scheme to a true 64-bit CRC, not a pair of 32-bit CRCs on alternate bytes. Polynomial borrowed from ECMA DLT1 standard. * Fix XLOG record length handling so that it will work at BLCKSZ = 32k. * Change XID allocation to work more like OID allocation. (This is of dubious necessity, but I think it's a good idea anyway.) * Fix a number of minor bugs, such as off-by-one logic for XLOG file wraparound at the 4 gig mark. * Add documentation and clean up some coding infelicities; move file format declarations out to include files where planned contrib utilities can get at them. * Checkpoint will now occur every CHECKPOINT_SEGMENTS log segments or every CHECKPOINT_TIMEOUT seconds, whichever comes first. It is also possible to force a checkpoint by sending SIGUSR1 to the postmaster (undocumented feature...) * Defend against kill -9 postmaster by storing shmem block's key and ID in postmaster.pid lockfile, and checking at startup to ensure that no processes are still connected to old shmem block (if it still exists). * Switch backends to accept SIGQUIT rather than SIGUSR1 for emergency stop, for symmetry with postmaster and xlog utilities. Clean up signal handling in bootstrap.c so that xlog utilities launched by postmaster will react to signals better. * Standalone bootstrap now grabs lockfile in target directory, as added insurance against running it in parallel with live postmaster.
* hold interupts during LockWaitCancel().Hiroshi Inoue2001-03-09
|
* When under postmaster, bogus arguments should cause proc_exit(0) notTom Lane2001-02-24
| | | | | proc_exit(1). Unless you think a system-wide restart is an appropriate response to bogus PGOPTIONS, that is.
* Remove bogus set_ps_display call --- changing displayed status here isTom Lane2001-02-18
| | | | | | either wrong or unnecessary in most cases, and on systems where setting status takes a kernel call, the overhead of setting status three times per command rather than two is annoying.
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-24
|
* Add "idle in transaction" status messageBruce Momjian2001-01-24
|
* Fix formatting of db crash.Bruce Momjian2001-01-24
|
* Make critical sections (elog->crash) and interrupt holdoff sectionsTom Lane2001-01-19
| | | | into distinct concepts, per recent discussion on pghackers.
* Oops, I had managed to break query-cancel-while-waiting-for-lock.Tom Lane2001-01-16
|
* Restructure backend SIGINT/SIGTERM handling so that 'die' interruptsTom Lane2001-01-14
| | | | | | | are treated more like 'cancel' interrupts: the signal handler sets a flag that is examined at well-defined spots, rather than trying to cope with an interrupt that might happen anywhere. See pghackers discussion of 1/12/01.
* Add more critical-section calls: all code sections that hold spinlocksTom Lane2001-01-12
| | | | | | | | | | | are now critical sections, so as to ensure die() won't interrupt us while we are munging shared-memory data structures. Avoid insecure intermediate states in some code that proc_exit will call, like palloc/pfree. Rename START/END_CRIT_CODE to START/END_CRIT_SECTION, since that seems to be what people tend to call them anyway, and make them be called with () like a function call, in hopes of not confusing pg_indent. I doubt that this is sufficient to make SIGTERM safe anywhere; there's just too much code that could get invoked during proc_exit().
* Fix recent breakage of query-cancel logic, see my pghackers messageTom Lane2001-01-07
| | | | of 6 Jan 2001 21:55.
* Prevent freshly-started backend from ignoring SIGUSR1, per race conditionTom Lane2000-12-20
| | | | | | | observed by Inoue. Also, don't call ProcRemove() from postmaster if we have detected a backend crash --- too risky if shared memory is corrupted. It's not needed anyway, considering we are going to reinitialize shared memory and semaphores as soon as the last child is dead.
* >> Here is a patch for the beos port (All regression tests are OK).Bruce Momjian2000-12-18
| | | | | | | | | | | | | | | | | | | | | | >> xlog.c : special case for beos to avoid 'link' which does not work yet >> beos/sem.c : implementation of new sem_ctl call (GETPID) and a new >sem_op >> flag (IPCNOWAIT) >> dynloader/beos.c : add a verification of symbol validity (seem that the >> loader sometime return OK with an invalid symbol) >> postmaster.c : add beos forking support for the new checkpoint process >> postgres.c : remove beos special case for getrusage >> beos.h : Correction of a bas definition of AF_UNIX, misc defnitions >> >> >> thanks >> >> >> cyril Cyril VELTER
* Ensure that 'errno' is saved and restored by all signal handlers thatTom Lane2000-12-18
| | | | | | might change it. Experimentation shows that the signal handler call mechanism does not save/restore errno for you, at least not on Linux or HPUX, so this is definitely a real risk.
* Clean up backend-exit-time cleanup behavior. Use on_shmem_exit callbacksTom Lane2000-12-18
| | | | | | to ensure that we have released buffer refcounts and so forth, rather than putting ad-hoc operations before (some of the calls to) proc_exit. Add commentary to discourage future hackers from repeating that mistake.
* Disable elog(ERROR|FATAL) in signal handlers inVadim B. Mikheev2000-12-03
| | | | critical sections of code.
* all options are allowed if not under postmaster:Vadim B. Mikheev2000-11-30
| | | | | SetConfigOption(name, value, (IsUnderPostmaster) ? PGC_BACKEND : PGC_POSTMASTER);
* Get rid of not-very-portable fcntl(F_SETLK) mechanism for locking the UnixTom Lane2000-11-29
| | | | | | | | | socket file, in favor of having an ordinary lockfile beside the socket file. Clean up a few robustness problems in the lockfile code. If postmaster is going to reject a connection request based on database state, it will now tell you so before authentication exchange not after. (Of course, a failure after is still possible if conditions change meanwhile, but this makes life easier for a yet-to-be-written pg_ping utility.)
* Store current LC_COLLATE and LC_CTYPE settings in pg_control during initdb;Tom Lane2000-11-25
| | | | | | | | | | re-adopt these settings at every postmaster or standalone-backend startup. This should fix problems with indexes becoming corrupt due to failure to provide consistent locale environment for postmaster at all times. Also, refuse to start up a non-locale-enabled compilation in a database originally initdb'd with a non-C locale. Suppress LIKE index optimization if locale is not "C" or "POSIX" (are there any other locales where it's safe?). Issue NOTICE during initdb if selected locale disables LIKE optimization.
* Advertise --help (rather than '-?') as help option (problems with csh).Peter Eisentraut2000-11-25
| | | | Accept --help even if no general long options support exists.
* Put external declarations into header files.Peter Eisentraut2000-11-21
|
* 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.