aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
Commit message (Collapse)AuthorAge
...
* Pass canAcceptConnections to exec'ed backend, for Jan.Bruce Momjian2003-05-09
|
* Update 3.0 protocol support to match recent agreements about how toTom Lane2003-05-08
| | | | | | | handle multiple 'formats' for data I/O. Restructure CommandDest and DestReceiver stuff one more time (it's finally starting to look a bit clean though). Code now matches latest 3.0 protocol document as far as message formats go --- but there is no support for binary I/O yet.
* Pass shared memory address on command line to exec'ed backend.Bruce Momjian2003-05-08
| | | | Allow backends to attached to specified shared memory address.
* Pass shared memory id and socket descriptor number on command line forBruce Momjian2003-05-06
| | | | fork/exec.
* Add display of eventual result RowDescription (if any) to the outputTom Lane2003-05-06
| | | | | | of Describe on a prepared statement. This was in the original 3.0 protocol proposal, but I took it out for reasons that seemed good at the time. Put it back per yesterday's pghackers discussion.
* Restructure command destination handling so that we pass aroundTom Lane2003-05-06
| | | | | | | | | | | | | | DestReceiver pointers instead of just CommandDest values. The DestReceiver is made at the point where the destination is selected, rather than deep inside the executor. This cleans up the original kluge implementation of tstoreReceiver.c, and makes it easy to support retrieving results from utility statements inside portals. Thus, you can now do fun things like Bind and Execute a FETCH or EXPLAIN command, and it'll all work as expected (e.g., you can Describe the portal, or use Execute's count parameter to suspend the output partway through). Implementation involves stuffing the utility command's output into a Tuplestore, which would be kind of annoying for huge output sets, but should be quite acceptable for typical uses of utility commands.
* Rename internal variables DBName|dbName to dbname, for consistency.Bruce Momjian2003-05-06
|
* Comment out some of the conditional tests until we have exec().Bruce Momjian2003-05-06
| | | | Reorder non-default variable loading until PGDATA is defined.
* Implement feature of new FE/BE protocol whereby RowDescription identifiesTom Lane2003-05-06
| | | | | | | | | the column by table OID and column number, if it's a simple column reference. Along the way, get rid of reskey/reskeyop fields in Resdoms. Turns out that representation was not convenient for either the planner or the executor; we can make the planner deliver exactly what the executor wants with no more effort. initdb forced due to change in stored rule representation.
* Extended query protocol: parse, bind, execute, describe FE/BE messages.Tom Lane2003-05-05
| | | | Only lightly tested as yet, since libpq doesn't know anything about 'em.
* Cleanup patch for exec() handling.Bruce Momjian2003-05-03
|
* Handle clog structure in shared memory in exec() case, for Win32.Bruce Momjian2003-05-03
|
* Back out last commit --- wrong patch.Bruce Momjian2003-05-02
|
* Dump/read non-default GUC values for use by exec'ed backends, for Win32.Bruce Momjian2003-05-02
|
* Portal and memory management infrastructure for extended query protocol.Tom Lane2003-05-02
| | | | | | | | | Both plannable queries and utility commands are now always executed within Portals, which have been revamped so that they can handle the load (they used to be good only for single SELECT queries). Restructure code to push command-completion-tag selection logic out of postgres.c, so that it won't have to be duplicated between simple and extended queries. initdb forced due to addition of a field to Query nodes.
* Infrastructure for deducing Param types from context, in the same wayTom Lane2003-04-29
| | | | | | | | | | | that the types of untyped string-literal constants are deduced (ie, when coerce_type is applied to 'em, that's what the type must be). Remove the ancient hack of storing the input Param-types array as a global variable, and put the info into ParseState instead. This touches a lot of files because of adjustment of routine parameter lists, but it's really not a large patch. Note: PREPARE statement still insists on exact specification of parameter types, but that could easily be relaxed now, if we wanted to do so.
* Put back encoding-conversion step in processing of incoming queries;Tom Lane2003-04-27
| | | | | | | | | | I had inadvertently omitted it while rearranging things to support length-counted incoming messages. Also, change the parser's API back to accepting a 'char *' query string instead of 'StringInfo', as the latter wasn't buying us anything except overhead. (I think when I put it in I had some notion of making the parser API 8-bit-clean, but seeing that flex depends on null-terminated input, that's not really ever gonna happen.)
* Infrastructure for upgraded error reporting mechanism. elog.c isTom Lane2003-04-24
| | | | | | | rewritten and the protocol is changed, but most elog calls are still elog calls. Also, we need to contemplate mechanisms for controlling all this functionality --- eg, how much stuff should appear in the postmaster log? And what API should libpq expose for it?
* 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.
* Second round of FE/BE protocol changes. Frontend->backend messages nowTom Lane2003-04-19
| | | | have length counts, and COPY IN data is packetized into messages.
* First phase of FE/BE protocol modifications: new StartupPacket layoutTom Lane2003-04-17
| | | | | | with variable-width fields. No more truncation of long user names. Also, libpq can now send its environment-variable-driven SET commands as part of the startup packet, saving round trips to server.
* Prevent multiple queries in a single string into a single transactionBruce Momjian2003-03-24
| | | | when autocommit is off, and document grouping when autocommit is on.
* Fix comment-only query to return Null result set, rather than nothing.Bruce Momjian2003-03-22
| | | | Cleans up blank query handling to be more consistent.
* Todo items:Bruce Momjian2003-03-20
| | | | | | | | | | | | | | | | | | | Add ALTER SEQUENCE to modify min/max/increment/cache/cycle values Also updated create sequence docs to mention NO MINVALUE, & NO MAXVALUE. New Files: doc/src/sgml/ref/alter_sequence.sgml src/test/regress/expected/sequence.out src/test/regress/sql/sequence.sql ALTER SEQUENCE is NOT transactional. It behaves similarly to setval(). It matches the proposed SQL200N spec, as well as Oracle in most ways -- Oracle lacks RESTART WITH for some strange reason. -- Rod Taylor <rbt@rbt.ca>
* Restructure parsetree representation of DECLARE CURSOR: now it's aTom Lane2003-03-10
| | | | | | | | | | | | utility statement (DeclareCursorStmt) with a SELECT query dangling from it, rather than a SELECT query with a few unusual fields in it. Add code to determine whether a planned query can safely be run backwards. If DECLARE CURSOR specifies SCROLL, ensure that the plan can be run backwards by adding a Materialize plan node if it can't. Without SCROLL, you get an error if you try to fetch backwards from a cursor that can't handle it. (There is still some discussion about what the exact behavior should be, but this is necessary infrastructure in any case.) Along the way, make EXPLAIN DECLARE CURSOR work.
* Add code to dump contents of free space map into $PGDATA/global/pg_fsm.cacheTom Lane2003-03-06
| | | | | | at database shutdown, and then load it again at database startup. This preserves our hard-won knowledge of free space across restarts (given an orderly shutdown, that is).
* Get rid of last few vestiges of parsetree dependency on grammar tokenTom Lane2003-02-10
| | | | | | codes, per discussion from last March. parse.h should now be included *only* by gram.y, scan.l, keywords.c, parser.c. This prevents surprising misbehavior after seemingly-trivial grammar adjustments.
* fastpath code neglected to check whether user has privileges to call theTom Lane2003-01-01
| | | | | target function. Also, move SetQuerySnapshot() call to avoid assert failure when a fastpath call is attempted in an aborted transaction.
* Re-addd Rod's ALTER DOMAIN patch.Bruce Momjian2002-12-06
|
* Back out ALTER DOMAIN patch until missing file appears.Bruce Momjian2002-12-06
|
* ALTER DOMAIN .. SET / DROP NOT NULLBruce Momjian2002-12-06
| | | | | | | | | | ALTER DOMAIN .. SET / DROP DEFAULT ALTER DOMAIN .. ADD / DROP CONSTRAINT New files: - doc/src/sgml/ref/alter_domain.sgml Rod Taylor
* Most of the code follows the American spelling of the word, which isBruce Momjian2002-11-19
| | | | | | | | "canceled", so I changed the one remaining usage of the British spelling ("cancelled") over to the former, and updated the translation files appropriately. Neil Conway
* Rename:Bruce Momjian2002-11-15
| | | | | | | | | | | | | | ! #show_parser_stats = false ! #show_planner_stats = false ! #show_executor_stats = false ! #show_statement_stats = false TO: ! #log_parser_stats = false ! #log_planner_stats = false ! #log_executor_stats = false ! #log_statement_stats = false
* Rename server_min_messages to log_min_messages. Part of consolidationBruce Momjian2002-11-14
| | | | of log_ settings.
* Code review for statement_timeout patch. Fix some race conditionsTom Lane2002-10-31
| | | | | | between signal handler and enable/disable code, avoid accumulation of timing error due to trying to maintain remaining-time instead of absolute-end-time, disable timeout before commit not after.
* Fix some places that were unportably assuming struct timeval's tv_secTom Lane2002-10-24
| | | | field is signed. Clean up casting.
* Invert logic in pg_exec_query_string() so that we set a snapshot forTom Lane2002-10-19
| | | | | | | all utility statement types *except* a short list, per discussion a few days ago. Add missing SetQuerySnapshot calls in VACUUM and REINDEX, and guard against calling REINDEX DATABASE from a function (has same problem as VACUUM).
* Improve formatting of --help output.Peter Eisentraut2002-10-18
|
* Make SPI's execution of querystrings follow the rules agreed to forTom Lane2002-10-14
| | | | | | | command status at the interactive level. SPI_processed, etc are set in the same way as the returned command status would have been set if the same querystring were issued interactively. Per gripe from Michael Paesold 25-Sep-02.
* Adjust handling of command status strings in the presence of rules,Tom Lane2002-10-14
| | | | | as per recent pghackers discussions. initdb forced due to change in fields of stored Query nodes.
* Make SET really not start a transaction.Tom Lane2002-10-13
|
* Have SET not start transaction when autocommit off, with doc updates.Bruce Momjian2002-10-09
|
* Move responsibility for setting QuerySnapshot for utility statementsTom Lane2002-10-08
| | | | | | into postgres.c; make sure it happens for all cases that seem to need it. Perhaps it would be better to explicitly exclude just a few utility statement types from setting a snapshot?
* Clarify comment.Bruce Momjian2002-10-06
|
* Have -d5 -d0 not affect the extra variables set with -d5.Bruce Momjian2002-09-27
|
* Make postgres -d0 set server_min_messages to notice. Reset doesn't workBruce Momjian2002-09-27
| | | | at this area in the code.
* Pass postmaster -d down to the postgres backend to trigger special -dBruce Momjian2002-09-26
| | | | handling in the backend.
* Remove ShutdownBufferPoolAccess exit callback, and do the work inTom Lane2002-09-25
| | | | | | | | | ProcKill instead, where we still have a PGPROC with which to wait on LWLocks. This fixes 'can't wait without a PROC structure' failures occasionally seen during backend shutdown (I'm surprised they weren't more frequent, actually). Add an Assert() to LWLockAcquire to help catch any similar mistakes in future. Fix failure to update MyProcPid for standalone backends and pgstat processes.
* > I'm not sure why NDirectFileRead/NDirectFileWrite are unused at theBruce Momjian2002-09-20
| | | | | | | | | | | | | | | > moment, but they used to be used; I think the correct response is to > put back the missing counter increments, not rip out the counters. Ok, fair enough. It's worth noting that they've been broken for a while -- for example, the HashJoin counter increments were broken when you comitted r1.20 of executor/nodeHashJoin.c in May of '99. I've attached a revised patch that doesn't remove the counters (but doesn't increment them either: I'm not sure of all the places where the counter should be incremented). Neil Conway
* 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.