summaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
AgeCommit message (Collapse)Author
2002-08-17Reverse out XLogDir/-X write-ahead log handling, per discussion.Bruce Momjian
Original patch from Thomas.
2002-08-15Tom Lane wrote:Bruce Momjian
> There's no longer a separate call to heap_storage_create in that routine > --- the right place to make the test is now in the storage_create > boolean parameter being passed to heap_create. A simple change, but > it passeth patch's understanding ... Thanks. Attached is a patch against cvs tip as of 8:30 PM PST or so. Turned out that even after fixing the failed hunks, there was a new spot in bufmgr.c which needed to be fixed (related to temp relations; RelationUpdateNumberOfBlocks). But thankfully the regression test code caught it :-) Joe Conway
2002-08-10This patch removes a lot of unused code related to assertions andBruce Momjian
error handling, and simplifies the code that remains. Apparently, the code that left Berkeley had a whole "error handling subsystem", which exceptions and whatnot. Since we don't use that anymore, there's no reason to keep it around. The regression tests pass with the patch applied. Unless anyone sees a problem, please apply. Neil Conway
2002-08-06This patch changes the behavior of PostgreSQL so that if any queries areBruce Momjian
executed in an implicitely aborted transaction (e.g. after an occur occurs), we return an error (and not just a warning). For example: nconway=# begin; BEGIN nconway=# insert; -- syntax error ERROR: parser: parse error at or near ";" nconway=# select * from a; ERROR: current transaction is aborted, queries ignored until end of transaction block The old behavior was: nconway=# begin; BEGIN nconway=# insert; ERROR: parser: parse error at or near ";" nconway=# select * from a; WARNING: current transaction is aborted, queries ignored until end of transaction block *ABORT STATE* Which can be confusing: if the client isn't paying careful attention, they will conclude that the query has executed (because no error is returned). Neil Conway
2002-08-04Temporary solution for XLogDir breakage.Tom Lane
2002-08-04Implement WAL log location control using "-X" or PGXLOG.Thomas G. Lockhart
2002-08-04The attached patch implements START TRANSACTION, per SQL99. TheBruce Momjian
functionality of the command is basically identical to that of BEGIN; it just accepts a few extra options (only one of which PostgreSQL currently implements), and is standards-compliant. The patch includes a simple regression test and documentation. [ Regression tests removed, per Peter.] Neil Conway
2002-07-30The attached patch removes the last remnants of support forBruce Momjian
'tioga recipes', whatever those are -- Peter E. killed most of it a couple days ago, but this patch removes the rest. Most of it was #ifdef'ed out anyway. Neil Conway
2002-07-30Move alarm timers to proper location.Bruce Momjian
2002-07-30Make statement_timeout apply to entire query string, not per statement.Bruce Momjian
2002-07-29Implement CREATE/DROP OPERATOR CLASS. Work still remains: need moreTom Lane
documentation (xindex.sgml should be rewritten), need to teach pg_dump about it, need to update contrib modules that currently build pg_opclass entries by hand. Original patch by Bill Studenmund, grammar adjustments and general update for 7.3 by Tom Lane.
2002-07-18pg_cast table, and standards-compliant CREATE/DROP CAST commands, plusPeter Eisentraut
extension to create binary compatible casts. Includes dependency tracking as well. pg_proc.proimplicit is now defunct, but will be removed in a separate commit. pg_dump provides a migration path from the previous scheme to declare casts. Dumping binary compatible casts is currently impossible, though.
2002-07-18Implement DROP SCHEMA. It lacks support for dropping conversions andTom Lane
operator classes, both of which are schema-local and so should really be droppable.
2002-07-13Add SET statement_timeout capability. Timeout is in ms. A value ofBruce Momjian
zero turns off the timer.
2002-07-11Add new CREATE CONVERSION/DROP CONVERSION command.Tatsuo Ishii
This is the first cut toward CREATE CONVERSION/DROP CONVERSION implementaion. The commands can now add/remove tuples to the new pg_conversion system catalog, but that's all. Still need work to make them actually working. Documentations, regression tests also need work.
2002-06-20Update copyright to 2002.Bruce Momjian
2002-05-18Revise command completion tags as per hackers message on 20 March.Peter Eisentraut
2002-05-17Extend syntax of CREATE FUNCTION to resemble SQL99.Peter Eisentraut
2002-05-17Merge the last few variable.c configuration variables into the genericTom Lane
GUC support. It's now possible to set datestyle, timezone, and client_encoding from postgresql.conf and per-database or per-user settings. Also, implement rollback of SET commands that occur in a transaction that later fails. Create a SET LOCAL var = value syntax that sets the variable only for the duration of the current transaction. All per previous discussions in pghackers.
2002-05-10Suppress duplicate logging of utility commands under debug_print_query.Tom Lane
2002-05-05Create an internal semaphore API that is not tied to SysV semaphores.Tom Lane
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.
2002-04-20Scanner performance improvementsPeter Eisentraut
Use flex flags -CF. Pass the to-be-scanned string around as StringInfo type, to avoid querying the length repeatedly. Clean up some code and remove lex-compatibility cruft. Escape backslash sequences inline. Use flex-provided yy_scan_buffer() function to set up input, rather than using myinput().
2002-04-18Rule names are now unique per-relation, rather than unique globally.Tom Lane
DROP RULE and COMMENT ON RULE syntax adds an 'ON tablename' clause, similar to TRIGGER syntaxes. To allow loading of existing pg_dump files containing COMMENT ON RULE, the COMMENT code will still accept the old syntax --- but only if the target rulename is unique across the whole database.
2002-03-24EXPLAIN output now comes out as a query result, not a NOTICE message.Tom Lane
Also, fix debug logging of parse/plan trees so that the messages actually go through elog(), not directly to stdout.
2002-03-22A little further progress on schemas: push down RangeVars intoTom Lane
addRangeTableEntry calls. Remove relname field from RTEs, since it will no longer be a useful unique identifier of relations; we want to encourage people to rely on the relation OID instead. Further work on dumping qual expressions in EXPLAIN, too.
2002-03-21First phase of SCHEMA changes, concentrating on fixing the grammar andTom Lane
the parsetree representation. As yet we don't *do* anything with schema names, just drop 'em on the floor; but you can enter schema-compatible command syntax, and there's even a primitive CREATE SCHEMA command. No doc updates yet, except to note that you can now extract a field from a function-returning-row's result with (foo(...)).fieldname.
2002-03-19Make CREATE DOMAIN emit CREATE DOMAIN on completion, per Peter E.Bruce Momjian
2002-03-19Fix DOMAIN breakage.Bruce Momjian
2002-03-19Add DOMAIN support. Includes manual pages and regression tests, fromBruce Momjian
Rod Taylor.
2002-03-06Change made to elog:Bruce Momjian
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.
2002-03-04Further work on elog cleanup: fix some bogosities in elog's logic aboutTom Lane
when to send what to which, prevent recursion by introducing new COMMERROR elog level for client-communication problems, get rid of direct writes to stderr in backend/libpq files, prevent non-error elogs from going to client during the authentication cycle.
2002-03-02Commit to match discussed elog() changes. Only update is that LOG isBruce Momjian
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
2002-03-01User and database-specific session defaults for run-time configurationPeter Eisentraut
variables. New commands ALTER DATABASE ... SET and ALTER USER ... SET.
2002-02-27Tweak pg_exec_query_string so that we close down transaction commandTom Lane
before reporting command-complete message for the final command of a query string. This way, any errors detected during finish_xact_command (such as RI violations) will appear to be part of the final command, rather than coming out after the command is reported complete. This avoids confusing PQendcopy and other not-overly-bright clients. Per Lee Harr's bug report of 25-Feb-02.
2002-02-27Clean up BeginCommand and related routines. BeginCommand and EndCommandTom Lane
are now both invoked once per received SQL command (raw parsetree) from pg_exec_query_string. BeginCommand is actually just an empty routine at the moment --- all its former operations have been pushed into tuple receiver setup routines in printtup.c. This makes for a clean distinction between BeginCommand/EndCommand (once per command) and the tuple receiver setup/teardown routines (once per ExecutorRun call), whereas the old code was quite ad hoc. Along the way, clean up the calling conventions for ExecutorRun a little bit.
2002-02-26Restructure command-completion-report code so that there is just oneTom Lane
report for each received SQL command, regardless of rewriting activity. Also ensure that this report comes from the 'original' command, not the last command generated by rewrite; this fixes 7.2 breakage for INSERT commands that have actions added by rules. Fernando Nasser and Tom Lane.
2002-02-23Save source of GUC settings, allowing different sources to be processed inPeter Eisentraut
any order without affecting results.
2002-02-19Remove some unnecessary pqsignal() calls to shave a few cycles offTom Lane
backend startup.
2002-01-10The result of getopt() should be compared to -1, not EOF, perTom Lane
pgsql-hackers discussion of this date.
2002-01-01Do not accept interrupts in RESUME_INTERRUPTS() and END_CRIT_SECTION()Tom Lane
macros, but only at explicit CHECK_FOR_INTERRUPTS() calls. Not clear whether overenthusiastic acceptance of interrupts accounts for any real bugs, but it definitely seems risky and unnecessary.
2001-12-04Replace pq_getbytes(&ch, 1) calls with pq_getbyte(), which is easierTom Lane
to use and significantly faster. This tweak saves 25% (!) of the runtime of COPY IN in a test with 8000-character lines. I wouldn't normally commit a performance improvement this late in the cycle, but 25% got my attention...
2001-11-10Clean up usage-statistics display code (ShowUsage and friends). StatFpTom Lane
is gone, usage messages now go through elog(DEBUG).
2001-11-05New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian
initdb/regression tests pass.
2001-10-28Another pgindent run. Fixes enum indenting, and improves #endifBruce Momjian
spacing. Also adds space for one-line comments.
2001-10-25pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian
tests pass.
2001-10-21Fix getopt-vs-init_ps_display problem by copying original argv[] info,Tom Lane
per suggestion from Peter. Simplify several APIs by transmitting the original argv location directly from main.c to ps_status.c, instead of passing it down through several levels of subroutines.
2001-10-19Set optreset on platforms that have it before launching postmasterTom Lane
subprocesses; perhaps this will fix portability problem just noted by Lockhart. Also, move test for bad permissions of DataDir to a more logical place.
2001-10-19Ensure that all startup paths (postmaster, standalone postgres, orTom Lane
bootstrap) check for a valid PG_VERSION file before looking at anything else in the data directory. This fixes confusing error report when trying to start current sources in a pre-7.1 data directory. Per trouble report from Rich Shepard 10/18/01.
2001-10-19Move init_ps_display from postgres.c to postmaster.c, putting itTom Lane
just after receipt of the startup packet. Now, postmaster children that are waiting for client authentication response will show as 'postgres: user database host authentication'. Also, do an init_ps_display for startup/shutdown/checkpoint subprocesses, so that they are readily identifiable as well. Fix an obscure race condition that could lead to Assert failure in the postmaster --- attempting to start a checkpoint process before any connections have been received led to calling PostmasterRandom before setting random_seed.
2001-09-27Remove useless LockDisable() function and associated overhead, per myTom Lane
proposal of 26-Aug.