aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
Commit message (Collapse)AuthorAge
...
* Make all command-line options of postmaster and postgres the same. SeePeter Eisentraut2006-01-05
| | | | | http://archives.postgresql.org/pgsql-hackers/2006-01/msg00151.php for the complete plan.
* Remove BEOS port.Bruce Momjian2006-01-05
|
* Rearrange backend startup sequence so that ShmemIndexLock can becomeTom Lane2006-01-04
| | | | | | an LWLock instead of a spinlock. This hardly matters on Unix machines but should improve startup performance on Windows (or any port using EXEC_BACKEND). Per previous discussion.
* Prefix client-side prepare with '[protocol]' rather than '[client]'.Bruce Momjian2005-12-31
|
* Rename send_rfq to send_ready_for_query.Bruce Momjian2005-12-30
|
* Mmark client-side prepare/bind/execute statements with "[client]" soBruce Momjian2005-12-30
| | | | they can be easily distinguished from SQL commands.
* Defend against crash while processing Describe Statement or Describe PortalTom Lane2005-12-14
| | | | | | messages, when client attempts to execute these outside a transaction (start one) or in a failed transaction (reject message, except for COMMIT/ROLLBACK statements which we can handle). Per report from Francisco Figueiredo Jr.
* Re-run pgindent, fixing a problem where comment lines after a blankBruce Momjian2005-11-22
| | | | | | | | | comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
* When in transaction-aborted state, reject Bind message for portals containingTom Lane2005-11-10
| | | | | | | | | | anything but transaction-exiting commands (ROLLBACK etc). We already rejected Parse and Execute in such cases, so there seems little point in allowing Bind. This prevents at least an Assert failure, and probably worse things, since there's a lot of infrastructure that doesn't work when not in a live transaction. We can also simplify the Bind logic a bit by rejecting messages with a nonzero number of parameters, instead of the former kluge to silently substitute NULL for each parameter. Per bug #2033 from Joel Stevenson.
* Rename the members of CommandDest enum so they don't collide with other uses ofAlvaro Herrera2005-11-03
| | | | | those names. (Debug and None were pretty bad names anyway.) I hope I catched all uses of the names in comments too.
* Postpone pg_timezone_initialize() until after creation of postmaster.pid,Tom Lane2005-10-20
| | | | | | | since it can take a fair amount of time and this can confuse boot scripts that expect postmaster.pid to appear quickly. Move initialization of SSL library and preloaded libraries to after that point, too, just for luck. Per reports from Tony Caduto and others.
* Standard pgindent run for 8.1.Bruce Momjian2005-10-15
|
* Make stack_base_ptr non-static, for PL/Java.Bruce Momjian2005-10-13
|
* Code cleanup for log_disconnections(). Patch from Qingqing Zhou,Neil Conway2005-10-05
| | | | fixes by Neil Conway.
* Log protocol-excute fetch operatation as fetch, rather than execute,Bruce Momjian2005-09-26
| | | | adjusted from a patch by Simon.
* Suppress signed-vs-unsigned-char warnings.Tom Lane2005-09-24
|
* Suppress port number for unix domain sockets in log connect/disconnectBruce Momjian2005-09-22
| | | | messages.
* Print proper cause of statement cancel, user interaction or timeout.Bruce Momjian2005-09-19
|
* Update query cancel message:Bruce Momjian2005-09-16
| | | | errmsg("canceling query due to user request or statement timeout")));
* Add log display label for unnamed server-side portals.Bruce Momjian2005-09-02
|
* Autovacuum loose end mop-up. Provide autovacuum-specific vacuum costTom Lane2005-08-11
| | | | | | | delay and limit, both as global GUCs and as table-specific entries in pg_autovacuum. stats_reset_on_server_start is now OFF by default, but a reset is forced if we did WAL replay. XID-wrap vacuums do not ANALYZE, but do FREEZE if it's a template database. Alvaro Herrera
* Cause ShutdownPostgres to do a normal transaction abort during backendTom Lane2005-08-08
| | | | | | | | exit, instead of trying to take shortcuts. Introduce some additional shutdown callback routines to eliminate kluges like having ProcKill be responsible for shutting down the buffer manager. Ensure that the order of operations during shutdown is predictable and what you would expect given the module layering.
* Add time/date macros for code clarity:Bruce Momjian2005-07-21
| | | | | | | #define DAYS_PER_YEAR 365.25 #define MONTHS_PER_YEAR 12 #define DAYS_PER_MONTH 30 #define HOURS_PER_DAY 24
* Integrate autovacuum functionality into the backend. There's still aTom Lane2005-07-14
| | | | | few loose ends to be dealt with, but it seems to work. Alvaro Herrera, based on the contrib code by Matthew O'Connor.
* Change typreceive function API so that receive functions get the sameTom Lane2005-07-10
| | | | | | | optional arguments as text input functions, ie, typioparam OID and atttypmod. Make all the datatypes that use typmod enforce it the same way in typreceive as they do in typinput. This fixes a problem with failure to enforce length restrictions during COPY FROM BINARY.
* Arrange for the postmaster (and standalone backends, initdb, etc) toTom Lane2005-07-04
| | | | | | | | chdir into PGDATA and subsequently use relative paths instead of absolute paths to access all files under PGDATA. This seems to give a small performance improvement, and it should make the system more robust against naive DBAs doing things like moving a database directory that has a live postmaster in it. Per recent discussion.
* Clean up the rather historically encumbered interface to now() andTom Lane2005-06-29
| | | | | | | | current time: provide a GetCurrentTimestamp() function that returns current time in the form of a TimestampTz, instead of separate time_t and microseconds fields. This is what all the callers really want anyway, and it eliminates low-level dependencies on AbsoluteTime, which is a deprecated datatype that will have to disappear eventually.
* Fix the mechanism for reporting the original table OID and column numberTom Lane2005-06-22
| | | | | of columns of a query result so that it can "see through" cursors and prepared statements. Per gripe a couple months back from John DeSoi.
* Two-phase commit. Original patch by Heikki Linnakangas, with additionalTom Lane2005-06-17
| | | | hacking by Alvaro Herrera and Tom Lane.
* Add pg_postmaster_start_time() function.Bruce Momjian2005-06-14
| | | | | Euler Taveira de Oliveira Matthias Schmidt
* Revise handling of dropped columns in JOIN alias lists to avoid aTom Lane2005-06-03
| | | | | | | | | | | | | | | | | | | | | performance problem pointed out by phil@vodafone: to wit, we were spending O(N^2) time to check dropped-ness in an N-deep join tree, even in the case where the tree was freshly constructed and couldn't possibly mention any dropped columns. Instead of recursing in get_rte_attribute_is_dropped(), change the data structure definition: the joinaliasvars list of a JOIN RTE must have a NULL Const instead of a Var at any position that references a now-dropped column. This costs nothing during normal parse-rewrite-plan path, and instead we have a linear-time update to make when loading a stored rule that might contain now-dropped columns. While at it, move the responsibility for acquring locks on relations referenced by rules into this separate function (which I therefore chose to call AcquireRewriteLocks). This saves effort --- namely, duplicated lock grabs in parser and rewriter --- in the normal path at a cost of one extra non-locked heap_open() in the stored-rule path; seems a good tradeoff. A fringe benefit is that it is now *much* clearer that we acquire lock on relations referenced in rules before we make any rewriter decisions based on their properties. (I don't know of any bug of that ilk, but it wasn't exactly clear before.)
* Push enable/disable of notify and catchup interrupts all the way downTom Lane2005-06-02
| | | | | | | to just around the bare recv() call that gets a command from the client. The former placement in PostgresMain was unsafe because the intermediate processing layers (especially SSL) use facilities such as malloc that are not necessarily re-entrant. Per report from counterstorm.com.
* Fix log_statement to properly recognize SELECT INTO and CREATE TABLE ASBruce Momjian2005-06-01
| | | | | | | | and DDL statements. Backpatch fix to 8.0.X. Per report from Murthy Kambhampaty
* Log queries for client-side prepare/execute. Simon RiggsBruce Momjian2005-05-24
| | | | Log prepare query during execute. Bruce Momjian
* Rethink original decision to use AND/OR Expr nodes to represent bitmapTom Lane2005-04-21
| | | | | | | logic operations during planning. Seems cleaner to create two new Path node types, instead --- this avoids duplication of cost-estimation code. Also, create an enable_bitmapscan GUC parameter to control use of bitmap plans.
* Use _() macro consistently rather than gettext(). Add translationBruce Momjian2005-02-22
| | | | macros around strings that were missing them.
* Add code to prevent transaction ID wraparound by enforcing a safe limitTom Lane2005-02-20
| | | | | | | | | | | | | | in GetNewTransactionId(). Since the limit value has to be computed before we run any real transactions, this requires adding code to database startup to scan pg_database and determine the oldest datfrozenxid. This can conveniently be combined with the first stage of an attack on the problem that the 'flat file' copies of pg_shadow and pg_group are not properly updated during WAL recovery. The code I've added to startup resides in a new file src/backend/utils/init/flatfiles.c, and it is responsible for rewriting the flat files as well as initializing the XID wraparound limit value. This will eventually allow us to get rid of GetRawDatabaseInfo too, but we'll need an initdb so we can add a trigger to pg_database.
* Tag appropriate files for rc3PostgreSQL Daemon2004-12-31
| | | | | | | | Also performed an initial run through of upgrading our Copyright date to extend to 2005 ... first run here was very simple ... change everything where: grep 1996-2004 && the word 'Copyright' ... scanned through the generated list with 'less' first, and after, to make sure that I only picked up the right entries ...
* A client_encoding specification coming from the connection request hasTom Lane2004-11-24
| | | | | | | | | | to be processed by GUC before InitPostgres, because any required lookup of the encoding conversion function has to be done during InitializeClientEncoding. So, I broke this last week by moving GUC processing to after InitPostgres :-(. What we can do as a compromise is process non-SUSET variables during command line scanning (the same as before), and postpone the processing of only SUSET variables. None of the SUSET variables need to be set before InitPostgres.
* Move pgstat_report_tabstat() call so that stats are not reported to theTom Lane2004-11-20
| | | | | | collector until the transaction commits. Per recent discussion, this should avoid confusing autovacuum when an updating transaction runs for a long time.
* Remove GUC USERLIMIT variable category, making the affected variablesTom Lane2004-11-14
| | | | | | | plain SUSET instead. Also delay processing of options received in client connection request until after we know if the user is a superuser, so that SUSET values can be set that way by legitimate superusers. Per recent discussion.
* Have log_duration only output when log_statement has printed the query.Bruce Momjian2004-10-15
| | | | | | This handles the new multiple log_statement values. Ed L.
* Message style revisionsPeter Eisentraut2004-10-12
|
* Whack some sense into the configuration-file-location patch.Tom Lane2004-10-08
| | | | | | | Refactor code into something reasonably understandable, cause use of the feature to not fail in standalone backends or in EXEC_BACKEND case, fix sloppy guc.c table entries, make the documentation minimally usable.
* Repair bug that would allow libpq to think a command had succeeded whenTom Lane2004-09-26
| | | | | it really hadn't, due to double output of previous command's response. Fix prevents recursive entry to libpq routines. Found by Jan Wieck.
* Redesign query-snapshot timing so that volatile functions in READ COMMITTEDTom Lane2004-09-13
| | | | | | | | | | | | | mode see a fresh snapshot for each command in the function, rather than using the latest interactive command's snapshot. Also, suppress fresh snapshots as well as CommandCounterIncrement inside STABLE and IMMUTABLE functions, instead using the snapshot taken for the most closely nested regular query. (This behavior is only sane for read-only functions, so the patch also enforces that such functions contain only SELECT commands.) As per my proposal of 6-Sep-2004; I note that I floated essentially the same proposal on 19-Jun-2002, but that discussion tailed off without any action. Since 8.0 seems like the right place to be taking possibly nontrivial backwards compatibility hits, let's get it done now.
* Fire non-deferred AFTER triggers immediately upon query completion,Tom Lane2004-09-10
| | | | | | | | | | | | | rather than when returning to the idle loop. This makes no particular difference for interactively-issued queries, but it makes a big difference for queries issued within functions: trigger execution now occurs before the calling function is allowed to proceed. This responds to numerous complaints about nonintuitive behavior of foreign key checking, such as http://archives.postgresql.org/pgsql-bugs/2004-09/msg00020.php, and appears to be required by the SQL99 spec. Also take the opportunity to simplify the data structures used for the pending-trigger list, rename them for more clarity, and squeeze out a bit of space.
* Pgindent run for 8.0.Bruce Momjian2004-08-29
|
* Update copyright to 2004.Bruce Momjian2004-08-29
|
* Allow DECLARE CURSOR to take parameters from the portal in which it isTom Lane2004-08-02
| | | | | | | | | | executed. Previously, the DECLARE would succeed but subsequent FETCHes would fail since the parameter values supplied to DECLARE were not propagated to the portal created for the cursor. In support of this, add type Oids to ParamListInfo entries, which seems like a good idea anyway since code that extracts a value can double-check that it got the type of value it was expecting. Oliver Jowett, with minor editorialization by Tom Lane.