summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2005-03-24Revert changes to CREATE TRIGGER and ALTER TABLE ADD FOREIGN KEY locking,Neil Conway
per request from Tom.
2005-03-23Adjust CREATE TRIGGER and ALTER TABLE ... ADD FOREIGN KEY to acquireNeil Conway
ExclusiveLock rather than AccessExclusiveLock. This will allow concurrent SELECT queries to proceed on the table. Per discussion with Andrew at SuperNews.
2005-03-23WAL must log CREATE and DROP DATABASE operations *without* using anyTom Lane
explicit paths, so that the log can be replayed in a data directory with a different absolute path than the original had. To avoid forcing initdb in the 8.0 branch, continue to accept the old WAL log record types; they will never again be generated however, and the code can be dropped after the next forced initdb. Per report from Oleg Bartunov. We still need to think about what it really means to WAL-log CREATE TABLESPACE commands: we more or less have to put the absolute path into those, but how to replay in a different context??
2005-03-22Use InitFunctionCallInfoData() macro instead of MemSet in performanceTom Lane
critical places in execQual. By Atsushi Ogawa; some minor cleanup by moi.
2005-03-22Create a routine PageIndexMultiDelete() that replaces a loop aroundTom Lane
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.
2005-03-21Fix quote_ident to use quote_identifier rather than its own, not quiteTom Lane
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).
2005-03-21Convert index-related tuple handling routines from char 'n'/' ' to boolTom Lane
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...
2005-03-20Change the return value of HeapTupleSatisfiesUpdate() to be an enum,Neil Conway
rather than an integer, and fix the associated fallout. From Alvaro Herrera.
2005-03-20On Windows, use QueryPerformanceCounter instead of gettimeofday forTom Lane
EXPLAIN ANALYZE instrumentation. Magnus Hagander
2005-03-20Remove unnecessary calls of FlushRelationBuffers: there is no needTom Lane
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.
2005-03-20Add mention of why malloc() has to be used in snprintf.c.Bruce Momjian
2005-03-20Department of second thoughts. Remove FRONTEND from snprintf.c becauseBruce Momjian
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.
2005-03-20Fix typo in Makefile.Bruce Momjian
2005-03-20Another change for FRONTEND snprintf.c.Bruce Momjian
2005-03-20Mark snprintf.c as a file that uses FRONTEND and needs to a version inBruce Momjian
the server-side port library. Somehow I missed that change when I added memory allocation to snprintf.c.
2005-03-19Add temp_buffers GUC variable to allow users to determine the sizeTom Lane
of the local buffer arena for temporary table access.
2005-03-19Upgrade localbuf.c to use a hash table instead of linear search toTom Lane
find already-allocated local buffers. This is the last obstacle in the way of setting NLocBuffer to something reasonably large.
2005-03-18Put 'dump complete' message in the right place, so it comes out whereTom Lane
it's supposed to when --file option is used.
2005-03-18Need to reset local buffer pin counts, not only shared buffer pins,Tom Lane
before we attempt any file deletions in ShutdownPostgres. Per Tatsuo.
2005-03-18Added patch by Christof Petig <christof@petig-baender.de> to work around gcc ↵Michael Meskes
bug on powerpc and amd64.
2005-03-18Avoid infinite loop in InvalidateBuffer if we ourselves are holdingTom Lane
a pin on the victim buffer.
2005-03-18Need to release buffer pins before attempting to drop files duringTom Lane
backend exit. Per report from Bruce.
2005-03-18Treat EPERM as a non-error case when checking to see if old postmasterTom Lane
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.
2005-03-17This patch moves some code for preprocessing FOR UPDATE fromNeil Conway
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().
2005-03-17Update obsolete comment.Tom Lane
2005-03-17Trivial comment tweak.Neil Conway
2005-03-17Factor duplicate snprintf code into functions.Bruce Momjian
2005-03-16This patch makes \d on tables and views sort fk constraints, triggersNeil Conway
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
2005-03-16Force initdb cause of encoding additions.Bruce Momjian
2005-03-16Revise TupleTableSlot code to avoid unnecessary construction and disassemblyTom Lane
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.
2005-03-16Add sprintf support, that were were missing.Bruce Momjian
Add support for snprintf '+', 'h', and %* length settings.
2005-03-16pgindent snprintf.c for consistency.Bruce Momjian
2005-03-16Fix snprintf for %*$.Bruce Momjian
2005-03-16Add CVS \r\n regression tests.Bruce Momjian
Andrew Dunstan
2005-03-16Fix snprintf to handle %$ properly by storing and reordering theBruce Momjian
arguments. Nicolai Tufar
2005-03-16Add missing include for new lc_ctype_is_c() function.Bruce Momjian
Per Neil.
2005-03-16Prevent locale-aware handling of upper, lower, and initcap when theBruce Momjian
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.
2005-03-16Wrap the implementation of fork_process() inside #ifndef WIN32 -- thisNeil Conway
should hopefully unbreak the Win32 build. Apologies for breaking it in the first place.
2005-03-14Issue free space notices to both the user and the server log file.Bruce Momjian
2005-03-14Make pg_dump emit a useful error message, instead of just dumping core,Tom Lane
if it finds a pg_rewrite entry for which there is no pg_class entry. Per report from Andrew Slobodyanyk.
2005-03-14Add support for Win1252 encoding.Bruce Momjian
Roland Volkmann
2005-03-14Bump minor version numbers for 8.1 compared to 8.0.Bruce Momjian
2005-03-14Avoid O(N^2) overhead in repeated nocachegetattr calls when columns ofTom Lane
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.
2005-03-14Allow ALTER FUNCTION to change a function's strictness, volatility, andNeil Conway
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.
2005-03-14Update comments for new encoding names.Bruce Momjian
2005-03-13Add missing identification comment, remove entirely inappropriate includeTom Lane
of postgres.h.
2005-03-13Add some missing #includes.Tom Lane
2005-03-13Forgot that I had intended to replace division by masking in hash calculation.Tom Lane
2005-03-13Make default_with_oids default to false -- user-created tables will nowNeil Conway
no longer include OIDs, unless WITH OIDS is specified or the default_with_oids configuration parameter is enabled. Update the docs accordingly.
2005-03-13Update obsolete comment.Neil Conway