aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/async.c
Commit message (Collapse)AuthorAge
...
* Make debug_ GUC varables output DEBUG1 rather than LOG, and mention inBruce Momjian2003-05-27
| | | | | docs that CLIENT/LOG_MIN_MESSAGES now controls debug_* output location. Doc changes included.
* Backend support for autocommit removed, per recent discussions. TheTom Lane2003-05-14
| | | | | | only remnant of this failed experiment is that the server will take SET AUTOCOMMIT TO ON. Still TODO: provide some client-side autocommit logic in libpq.
* Another round of protocol changes. Backend-to-frontend messages now allTom Lane2003-04-22
| | | | | | | | | | have length words. COPY OUT reimplemented per new protocol: it doesn't need \. anymore, thank goodness. COPY BINARY to/from frontend works, at least as far as the backend is concerned --- libpq's PQgetline API is not up to snuff, and will have to be replaced with something that is null-safe. libpq uses message length words for performance improvement (no cycles wasted rescanning long messages), but not yet for error recovery.
* Async_NotifyHandler must save and restore ImmediateInterruptOK. FixesTom Lane2003-02-18
| | | | | | known problem with failure to respond to 'pg_ctl stop -m fast', and probable problems if SIGINT or SIGTERM arrives while processing a SIGUSR2 interrupt that arrived while waiting for a new client query.
* Fix for rare race-condition-like failure: if a backend receives SIGUSR2Tom Lane2002-09-16
| | | | | | | | | | (notify/SI-overrun interrupt) while it is in process of doing proc_exit, it is possible for Async_NotifyHandler() to try to start a transaction when one is already running. This leads to Asserts() or worse. I think it may only be possible to occur when frontend synchronization is lost (ie, the elog(FATAL) in SocketBackend() fires), but that is a standard occurrence after error during COPY. In any case, I have seen this failure occur during regression tests, so it is definitely possible.
* Remove sys/types.h in files that include postgres.h, and hence c.h,Bruce Momjian2002-09-02
| | | | because c.h has sys/types.h.
* AUTOCOMMIT mode is now an available backend GUC variable; setting itTom Lane2002-08-30
| | | | | | | | | to false provides more SQL-spec-compliant behavior than we had before. I am not sure that setting it false is actually a good idea yet; there is a lot of client-side code that will probably be broken by turning autocommit off. But it's a start. Loosely based on a patch by David Van Wie.
* Restructure system-catalog index updating logic. Instead of havingTom Lane2002-08-05
| | | | | | | | | hardwired lists of index names for each catalog, use the relcache's mechanism for caching lists of OIDs of indexes of any table. This reduces the common case of updating system catalog indexes to a single line, makes it much easier to add a new system index (in fact, you can now do so on-the-fly if you want to), and as a nice side benefit improves performance a little. Per recent pghackers discussion.
* Update copyright to 2002.Bruce Momjian2002-06-20
|
* Remove global variable scanCommandId in favor of storing a command IDTom Lane2002-05-21
| | | | | | | | | | | in snapshots, per my proposal of a few days ago. Also, tweak heapam.c routines (heap_insert, heap_update, heap_delete, heap_mark4update) to be passed the command ID to use, instead of doing GetCurrentCommandID. For catalog updates they'll still get passed current command ID, but for updates generated from the main executor they'll get passed the command ID saved in the snapshot the query is using. This should fix some corner cases associated with functions and triggers that advance current command ID while an outer query is still in progress.
* Restructure indexscan API (index_beginscan, index_getnext) perTom Lane2002-05-20
| | | | | | | yesterday's proposal to pghackers. Also remove unnecessary parameters to heap_beginscan, heap_rescan. I modified pg_proc.h to reflect the new numbers of parameters for the AM interface routines, but did not force an initdb because nothing actually looks at those fields.
* Create an internal semaphore API that is not tied to SysV semaphores.Tom Lane2002-05-05
| | | | | | As proof of concept, provide an alternate implementation based on POSIX semaphores. Also push the SysV shared-memory implementation into a separate file so that it can be replaced conveniently.
* Change made to elog:Bruce Momjian2002-03-06
| | | | | | | | | | | | | | | | | | | o Change all current CVS messages of NOTICE to WARNING. We were going to do this just before 7.3 beta but it has to be done now, as you will see below. o Change current INFO messages that should be controlled by client_min_messages to NOTICE. o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc. to always go to the client. o Remove INFO from the client_min_messages options and add NOTICE. Seems we do need three non-ERROR elog levels to handle the various behaviors we need for these messages. Regression passed.
* Commit to match discussed elog() changes. Only update is that LOG isBruce Momjian2002-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | now just below FATAL in server_min_messages. Added more text to highlight ordering difference between it and client_min_messages. --------------------------------------------------------------------------- REALLYFATAL => PANIC STOP => PANIC New INFO level the prints to client by default New LOG level the prints to server log by default Cause VACUUM information to print only to the client NOTICE => INFO where purely information messages are sent DEBUG => LOG for purely server status messages DEBUG removed, kept as backward compatible DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added DebugLvl removed in favor of new DEBUG[1-5] symbols New server_min_messages GUC parameter with values: DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC New client_min_messages GUC parameter with values: DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC Server startup now logged with LOG instead of DEBUG Remove debug_level GUC parameter elog() numbers now start at 10 Add test to print error message if older elog() values are passed to elog() Bootstrap mode now has a -d that requires an argument, like postmaster
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* Clean up some confusion about where and how to set whereToSendOutput.Tom Lane2001-09-08
| | | | | | | | We will no longer try to send elog messages to the client before we have initialized backend libpq (oops); however, reporting bogus commandline switches via elog does work now (not irrelevant, because of PGOPTIONS). Fix problem with inappropriate sending of checkpoint-process messages to stderr.
* Keep the list of to-be-NOTIFYed names in a plain List palloc'd inTom Lane2001-06-17
| | | | | | | TopTransactionContext, rather than using Dllist. This simplifies and speeds up the code, and eliminates a former risk of coredump when out of memory (since the old code didn't bother to check for malloc failure). It also moves us one step closer to retiring Dllist...
* Clean up various to-do items associated with system indexes:Tom Lane2001-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pg_database now has unique indexes on oid and on datname. pg_shadow now has unique indexes on usename and on usesysid. pg_am now has unique index on oid. pg_opclass now has unique index on oid. pg_amproc now has unique index on amid+amopclaid+amprocnum. Remove pg_rewrite's unnecessary index on oid, delete unused RULEOID syscache. Remove index on pg_listener and associated syscache for performance reasons (caching rows that are certain to change before you need 'em again is rather pointless). Change pg_attrdef's nonunique index on adrelid into a unique index on adrelid+adnum. Fix various incorrect settings of pg_class.relisshared, make that the primary reference point for whether a relation is shared or not. IsSharedSystemRelationName() is now only consulted to initialize relisshared during initial creation of tables and indexes. In theory we might now support shared user relations, though it's not clear how one would get entries for them into pg_class &etc of multiple databases. Fix recently reported bug that pg_attribute rows created for an index all have the same OID. (Proof that non-unique OID doesn't matter unless it's actually used to do lookups ;-)) There's no need to treat pg_trigger, pg_attrdef, pg_relcheck as bootstrap relations. Convert them into plain system catalogs without hardwired entries in pg_class and friends. Unify global.bki and template1.bki into a single init script postgres.bki, since the alleged distinction between them was misleading and pointless. Not to mention that it didn't work for setting up indexes on shared system relations. Rationalize locking of pg_shadow, pg_group, pg_attrdef (no need to use AccessExclusiveLock where ExclusiveLock or even RowExclusiveLock will do). Also, hold locks until transaction commit where necessary.
* pgindent run. Make it all clean.Bruce Momjian2001-03-22
|
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-24
|
* Fix all the places that called heap_update() and heap_delete() withoutTom Lane2001-01-23
| | | | | | | | | | | bothering to check the return value --- which meant that in case the update or delete failed because of a concurrent update, you'd not find out about it, except by observing later that the transaction produced the wrong outcome. There are now subroutines simple_heap_update and simple_heap_delete that should be used anyplace that you're not prepared to do the full nine yards of coping with concurrent updates. In practice, that seems to mean absolutely everywhere but the executor, because *noplace* else was checking.
* 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.
* Significant cleanups in SysV IPC handling (shared mem and semaphores).Tom Lane2000-11-28
| | | | | | | | | | | IPC key assignment will now work correctly even when multiple postmasters are using same logical port number (which is possible given -k switch). There is only one shared-mem segment per postmaster now, not 3. Rip out broken code for non-TAS case in bufmgr and xlog, substitute a complete S_LOCK emulation using semaphores in spin.c. TAS and non-TAS logic is now exactly the same. When deadlock is detected, "Deadlock detected" is now the elog(ERROR) message, rather than a NOTICE that comes out before an unhelpful ERROR.
* Put external declarations into header files.Peter Eisentraut2000-11-21
|
* Change SearchSysCache coding conventions so that a reference count isTom Lane2000-11-16
| | | | | | | maintained for each cache entry. A cache entry will not be freed until the matching ReleaseSysCache call has been executed. This eliminates worries about cache entries getting dropped while still in use. See my posting to pg-hackers of even date for more info.
* 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
|
* 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.
* 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.
* Mark functions as static and ifdef NOT_USED as appropriate.Bruce Momjian2000-06-08
|
* Re-order pg_listener index so it can later be used in an index scan.Bruce Momjian2000-06-07
|
* 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)
* First round of changes for new fmgr interface. fmgr itself and theTom Lane2000-05-28
| | | | | | | key call sites are changed, but most called functions are still oldstyle. An exception is that the PL managers are updated (so, for example, NULL handling now behaves as expected in plperl and plpgsql functions). NOTE initdb is forced due to added column in pg_proc.
* Finally fix LISTEN problem.Bruce Momjian2000-05-14
|
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* 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.
* Some changes to prepare for LONG attributes.Jan Wieck1999-12-16
| | | | Jan
* Rename heap_replace to heap_update.Bruce Momjian1999-11-24
|
* Add system indexes to match all caches.Bruce Momjian1999-11-22
| | | | | | | Make all system indexes unique. Make all cache loads use system indexes. Rename *rel to *relid in inheritance tables. Rename cache names to be clearer.
* 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.
* configure cleanupBruce Momjian1999-07-18
|
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Final cleanup.Bruce Momjian1999-07-16
|
* Update #include cleanupsBruce 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
|
* pgindent run over code.Bruce Momjian1999-05-25
|
* My first cut at libpq revision didn't handle MULTIBYTE correctly,Tom Lane1999-04-25
| | | | but I think it's OK now...