summaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
AgeCommit message (Collapse)Author
2002-10-31Code review for statement_timeout patch. Fix some race conditionsTom Lane
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.
2002-10-24Fix some places that were unportably assuming struct timeval's tv_secTom Lane
field is signed. Clean up casting.
2002-10-19Invert logic in pg_exec_query_string() so that we set a snapshot forTom Lane
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).
2002-10-18Improve formatting of --help output.Peter Eisentraut
2002-10-14Make SPI's execution of querystrings follow the rules agreed to forTom Lane
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.
2002-10-14Adjust handling of command status strings in the presence of rules,Tom Lane
as per recent pghackers discussions. initdb forced due to change in fields of stored Query nodes.
2002-10-13Make SET really not start a transaction.Tom Lane
2002-10-09Have SET not start transaction when autocommit off, with doc updates.Bruce Momjian
2002-10-08Move responsibility for setting QuerySnapshot for utility statementsTom Lane
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?
2002-10-06Clarify comment.Bruce Momjian
2002-09-27Have -d5 -d0 not affect the extra variables set with -d5.Bruce Momjian
2002-09-27Make postgres -d0 set server_min_messages to notice. Reset doesn't workBruce Momjian
at this area in the code.
2002-09-26Pass postmaster -d down to the postgres backend to trigger special -dBruce Momjian
handling in the backend.
2002-09-25Remove ShutdownBufferPoolAccess exit callback, and do the work inTom Lane
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.
2002-09-20> I'm not sure why NDirectFileRead/NDirectFileWrite are unused at theBruce Momjian
> 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
2002-09-16Fix for rare race-condition-like failure: if a backend receives SIGUSR2Tom Lane
(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.
2002-09-04pgindent run.Bruce Momjian
2002-09-02Remove documentation that says debug_query_string is only used byBruce Momjian
pgmonitor. Now log_min_error_statement uses it.
2002-09-02Remove sys/types.h in files that include postgres.h, and hence c.h,Bruce Momjian
because c.h has sys/types.h.
2002-09-01Add log_duration to GUC/postgresql.conf.Bruce Momjian
Rename debug_print_query to log_statement and rename show_query_stats to show_statement_stats.
2002-08-30AUTOCOMMIT mode is now an available backend GUC variable; setting itTom Lane
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.
2002-08-29Fix a bug introduced in 7.2.Hiroshi Inoue
2002-08-29Remove #ifdef MULTIBYTE per hackers list discussion.Tatsuo Ishii
2002-08-27PREPARE/EXECUTE statements. Patch by Neil Conway, some kibitzingTom Lane
from Tom Lane.
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.