aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Create a routine PageIndexMultiDelete() that replaces a loop aroundTom Lane2005-03-22
| | | | | | | | | PageIndexTupleDelete() with a single pass of compactification --- logic mostly lifted from PageRepairFragmentation. I noticed while profiling that a VACUUM that's cleaning up a whole lot of deleted tuples would spend as much as a third of its CPU time in PageIndexTupleDelete; not too surprising considering the loop method was roughly O(N^2) in the number of tuples involved.
* Fix quote_ident to use quote_identifier rather than its own, not quiteTom Lane2005-03-21
| | | | | | up-to-speed logic; in particular this will cause it to quote names that match keywords. Remove unnecessary multibyte cruft from quote_literal (all backend-internal encodings are 8-bit-safe).
* Convert index-related tuple handling routines from char 'n'/' ' to boolTom Lane2005-03-21
| | | | | | | | | | convention for isnull flags. Also, remove the useless InsertIndexResult return struct from index AM aminsert calls --- there is no reason for the caller to know where in the index the tuple was inserted, and we were wasting a palloc cycle per insert to deliver this uninteresting value (plus nontrivial complexity in some AMs). I forced initdb because of the change in the signature of the aminsert routines, even though nothing really looks at those pg_proc entries...
* Change the return value of HeapTupleSatisfiesUpdate() to be an enum,Neil Conway2005-03-20
| | | | | rather than an integer, and fix the associated fallout. From Alvaro Herrera.
* On Windows, use QueryPerformanceCounter instead of gettimeofday forTom Lane2005-03-20
| | | | EXPLAIN ANALYZE instrumentation. Magnus Hagander
* Remove unnecessary calls of FlushRelationBuffers: there is no needTom Lane2005-03-20
| | | | | | | | | | to write out data that we are about to tell the filesystem to drop. smgr_internal_unlink already had a DropRelFileNodeBuffers call to get rid of dead buffers without a write after it's no longer possible to roll back the deleting transaction. Adding a similar call in smgrtruncate simplifies callers and makes the overall division of labor clearer. This patch removes the former behavior that VACUUM would write all dirty buffers of a relation unconditionally.
* Add mention of why malloc() has to be used in snprintf.c.Bruce Momjian2005-03-20
|
* Department of second thoughts. Remove FRONTEND from snprintf.c becauseBruce Momjian2005-03-20
| | | | | snprintf is called before the memory system is started. We have to just malloc/free. There are no elogs in the code so we should be fine.
* Fix typo in Makefile.Bruce Momjian2005-03-20
|
* Another change for FRONTEND snprintf.c.Bruce Momjian2005-03-20
|
* Mark snprintf.c as a file that uses FRONTEND and needs to a version inBruce Momjian2005-03-20
| | | | | the server-side port library. Somehow I missed that change when I added memory allocation to snprintf.c.
* Add temp_buffers GUC variable to allow users to determine the sizeTom Lane2005-03-19
| | | | of the local buffer arena for temporary table access.
* Upgrade localbuf.c to use a hash table instead of linear search toTom Lane2005-03-19
| | | | | find already-allocated local buffers. This is the last obstacle in the way of setting NLocBuffer to something reasonably large.
* Put 'dump complete' message in the right place, so it comes out whereTom Lane2005-03-18
| | | | it's supposed to when --file option is used.
* Need to reset local buffer pin counts, not only shared buffer pins,Tom Lane2005-03-18
| | | | before we attempt any file deletions in ShutdownPostgres. Per Tatsuo.
* Added patch by Christof Petig <christof@petig-baender.de> to work around gcc ↵Michael Meskes2005-03-18
| | | | bug on powerpc and amd64.
* Avoid infinite loop in InvalidateBuffer if we ourselves are holdingTom Lane2005-03-18
| | | | a pin on the victim buffer.
* Need to release buffer pins before attempting to drop files duringTom Lane2005-03-18
| | | | backend exit. Per report from Bruce.
* Treat EPERM as a non-error case when checking to see if old postmasterTom Lane2005-03-18
| | | | | | | | | is still alive. This improves our odds of not getting fooled by an unrelated process when checking a stale lock file. Other checks already in place, plus one newly added in checkDataDir(), ensure that we cannot attempt to usurp the place of a postmaster belonging to a different userid, so there is no need to error out. Add comments indicating the importance of these other checks.
* This patch moves some code for preprocessing FOR UPDATE fromNeil Conway2005-03-17
| | | | | | grouping_planner() to preprocess_targetlist(), according to a comment in grouping_planner(). I think the refactoring makes sense, and moves some extraneous details out of grouping_planner().
* Update obsolete comment.Tom Lane2005-03-17
|
* Trivial comment tweak.Neil Conway2005-03-17
|
* Factor duplicate snprintf code into functions.Bruce Momjian2005-03-17
|
* This patch makes \d on tables and views sort fk constraints, triggersNeil Conway2005-03-16
| | | | | | | | and rules alphabetically in the output. This makes it the same as for indexes and stops the irritating random or reverse ordering it currently has. Chris KL
* Force initdb cause of encoding additions.Bruce Momjian2005-03-16
|
* Revise TupleTableSlot code to avoid unnecessary construction and disassemblyTom Lane2005-03-16
| | | | | | | | | | | | | | | | | | | | | of tuples when passing data up through multiple plan nodes. A slot can now hold either a normal "physical" HeapTuple, or a "virtual" tuple consisting of Datum/isnull arrays. Upper plan levels can usually just copy the Datum arrays, avoiding heap_formtuple() and possible subsequent nocachegetattr() calls to extract the data again. This work extends Atsushi Ogawa's earlier patch, which provided the key idea of adding Datum arrays to TupleTableSlots. (I believe however that something like this was foreseen way back in Berkeley days --- see the old comment on ExecProject.) A test case involving many levels of join of fairly wide tables (about 80 columns altogether) showed about 3x overall speedup, though simple queries will probably not be helped very much. I have also duplicated some code in heaptuple.c in order to provide versions of heap_formtuple and friends that use "bool" arrays to indicate null attributes, instead of the old convention of "char" arrays containing either 'n' or ' '. This provides a better match to the convention used by ExecEvalExpr. While I have not made a concerted effort to get rid of uses of the old routines, I think they should be deprecated and eventually removed.
* Add sprintf support, that were were missing.Bruce Momjian2005-03-16
| | | | Add support for snprintf '+', 'h', and %* length settings.
* pgindent snprintf.c for consistency.Bruce Momjian2005-03-16
|
* Fix snprintf for %*$.Bruce Momjian2005-03-16
|
* Add CVS \r\n regression tests.Bruce Momjian2005-03-16
| | | | Andrew Dunstan
* Fix snprintf to handle %$ properly by storing and reordering theBruce Momjian2005-03-16
| | | | | | arguments. Nicolai Tufar
* Add missing include for new lc_ctype_is_c() function.Bruce Momjian2005-03-16
| | | | Per Neil.
* Prevent locale-aware handling of upper, lower, and initcap when theBruce Momjian2005-03-16
| | | | | | | locale is C. Backpatch to 8.0.X because some operating systems were throwing errors for such operations, rather than ignoring the locale when it was C.
* Wrap the implementation of fork_process() inside #ifndef WIN32 -- thisNeil Conway2005-03-16
| | | | | should hopefully unbreak the Win32 build. Apologies for breaking it in the first place.
* Issue free space notices to both the user and the server log file.Bruce Momjian2005-03-14
|
* Make pg_dump emit a useful error message, instead of just dumping core,Tom Lane2005-03-14
| | | | | if it finds a pg_rewrite entry for which there is no pg_class entry. Per report from Andrew Slobodyanyk.
* Add support for Win1252 encoding.Bruce Momjian2005-03-14
| | | | Roland Volkmann
* Bump minor version numbers for 8.1 compared to 8.0.Bruce Momjian2005-03-14
|
* Avoid O(N^2) overhead in repeated nocachegetattr calls when columns ofTom Lane2005-03-14
| | | | | | | | a tuple are being accessed via ExecEvalVar and the attcacheoff shortcut isn't usable (due to nulls and/or varlena columns). To do this, cache Datums extracted from a tuple in the associated TupleTableSlot. Also some code cleanup in and around the TupleTable handling. Atsushi Ogawa with some kibitzing by Tom Lane.
* Allow ALTER FUNCTION to change a function's strictness, volatility, andNeil Conway2005-03-14
| | | | | | | | | whether or not it is a security definer. Changing a function's strictness is required by SQL2003, and the other capabilities make sense. Also, allow an optional RESTRICT noise word to be specified, for SQL conformance. Some trivial regression tests added and the documentation has been updated.
* Update comments for new encoding names.Bruce Momjian2005-03-14
|
* Add missing identification comment, remove entirely inappropriate includeTom Lane2005-03-13
| | | | of postgres.h.
* Add some missing #includes.Tom Lane2005-03-13
|
* Forgot that I had intended to replace division by masking in hash calculation.Tom Lane2005-03-13
|
* Make default_with_oids default to false -- user-created tables will nowNeil Conway2005-03-13
| | | | | | no longer include OIDs, unless WITH OIDS is specified or the default_with_oids configuration parameter is enabled. Update the docs accordingly.
* Update obsolete comment.Neil Conway2005-03-13
|
* Document aliases for our supported encodings.Bruce Momjian2005-03-13
| | | | Add a few encodings that were not documented.
* When cloning template0 (or other fully-frozen databases), set the newTom Lane2005-03-12
| | | | | | | | | | | database's datallowconn and datfrozenxid to the current transaction ID instead of copying the source database's values. This is OK because we assume the source DB contains no normal transaction IDs whatsoever. This keeps VACUUM from immediately starting to complain about unvacuumed databases in the situation where we are more than 2 billion transactions out from the XID stamp of template0. Per discussion with Milen Radev (although his complaint turned out to be due to something else, but the problem is real anyway).
* Fix ALTER DATABASE RENAME to allow the operation if user is a superuserTom Lane2005-03-12
| | | | | who for some reason isn't marked usecreatedb. Per report from Alexander Pravking. Also fix sloppy coding in have_createdb_privilege().
* Adjust the API for aggregate function calls so that a C-coded functionTom Lane2005-03-12
| | | | | | | | | | | | | can tell whether it is being used as an aggregate or not. This allows such a function to avoid re-pallocing a pass-by-reference transition value; normally it would be unsafe for a function to scribble on an input, but in the aggregate case it's safe to reuse the old transition value. Make int8inc() do this. This gets a useful improvement in the speed of COUNT(*), at least on narrow tables (it seems to be swamped by I/O when the table rows are wide). Per a discussion in early December with Neil Conway. I also fixed int_aggregate.c to check this, thereby turning it into something approaching a supportable technique instead of being a crude hack.