summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2005-05-19Update comment that I missed the first time around.Tom Lane
2005-05-19Factor out lock cleanup code that is needed in several places in lock.c.Tom Lane
Also, remove the rather useless return value of LockReleaseAll. Change response to detection of corruption in the shared lock tables to PANIC, since that is the only way of cleaning up fully. Originally an idea of Heikki Linnakangas, variously hacked on by Alvaro Herrera and Tom Lane.
2005-05-19Split the shared-memory array of PGPROC pointers out of the sinvalTom Lane
communication structure, and make it its own module with its own lock. This should reduce contention at least a little, and it definitely makes the code seem cleaner. Per my recent proposal.
2005-05-18Upon closer inspection, Greg's psql tab completion patch leaks memory.Neil Conway
Fix the leak, and add a comment to note that the return value of previous_word must be free'd.
2005-05-18psql tab completion improvements, from Greg Sabino Mullane:Neil Conway
* Made DELETE into "DELETE FROM" * Moved ANALZYE to the end of the list to ease EXPLAIN / VACUUM conflicts * Removed the ANALYZE xx semicolon completion: we don't do that anywhere else * Add DECLARE support * Add parens for DROP AGGREGATE * Add "CASCADE | RESTRICT" for DROP xx * Make EXPLAIN <tab> a lot smarter * GROUP "BY" and ORDER "BY" * "ISOLATION" becomes "ISOLATION LEVEL" * Fix error in which REVOKE xx ON yy was receiving "TO", now gets "FROM" * Add GRANT/REVOKE xx ON yy TO/FROM choices: usernames, GROUP, PUBLIC * PREPARE xx <tab> AS "SELECT | INSERT | UPDATE | DELETE" * Add = at end of UPDATE xx SET yy * Beef up VACUUM stuff
2005-05-17Extend the pg_locks system view so that it can fully display all lockTom Lane
types, as per recent discussion.
2005-05-17Add a --dbname option to the pg_regress script, and use pl_regressionTom Lane
for testing PLs and contrib_regression for testing contrib, instead of overwriting the core system's regression database as formerly done. Andrew Dunstan
2005-05-17Guard against duplicate IDs in input file in SortTocFromFile().Tom Lane
Per report from Brian Hackett.
2005-05-17Cleanup GiST header files. Since GiST extensions are often written asNeil Conway
external projects, we should be careful about what parts of the GiST API are considered implementation details, and which are part of the public API. Therefore, I've moved internal-only declarations into gist_private.h -- future backward-incompatible changes to gist.h should be made with care, to avoid needlessly breaking external GiST extensions. Also did some related header cleanup: remove some unnecessary #includes from gist.h, and remove some unused definitions: isAttByVal(), _gistdump(), and GISTNStrategies.
2005-05-17GiST improvements:Neil Conway
- make sure we always invoke user-supplied GiST methods in a short-lived memory context. This means the backend isn't exposed to any memory leaks that be in those methods (in fact, it is probably a net loss for most GiST methods to bother manually freeing memory now). This also means we can do away with a lot of ugly manual memory management in the GiST code itself. - keep the current page of a GiST index scan pinned, rather than doing a ReadBuffer() for each tuple produced by the scan. Since ReadBuffer() is expensive, this is a perf. win - implement dead tuple killing for GiST indexes (which is easy to do, now that we keep a pin on the current scan page). Now all the builtin indexes implement dead tuple killing. - cleanup a lot of ugly code in GiST
2005-05-17Modify tidbitmap.c to avoid creating a hash table until there is moreTom Lane
than one heap page represented in the bitmap. This is a bit ugly but it cuts overhead fairly effectively in simple join cases. Per example from Sergey Koposov.
2005-05-16Fix a few minor mistakes in header comments. From Qingqing Zhou.Neil Conway
2005-05-16Adjust out-of-date comment.Tom Lane
2005-05-15Fix latent bug in ExecSeqRestrPos: it leaves the plan node's result slotTom Lane
in an inconsistent state. (This is only latent because in reality ExecSeqRestrPos is dead code at the moment ... but someday maybe it won't be.) Add some comments about what the API for plan node mark/restore actually is, because it's not immediately obvious.
2005-05-15Various style cleanups for GiST; no changes to functionality.Neil Conway
2005-05-15Rename Rendezvous to Bonjour to match OS/X renaming.Bruce Momjian
2005-05-14Further marginal speed hacking: in MemoryContextReset, don't callTom Lane
MemoryContextResetChildren unless necessary.
2005-05-14Minor refactoring to eliminate duplicate code and make startup aTom Lane
tad faster.
2005-05-14Minor speed hacks in AllocSetReset: avoid clearing the freelist headersTom Lane
when the blocks list is empty (there can surely be no freelist items if the context contains no memory), and use MemSetAligned not MemSet to clear the headers (we assume alignof(pointer) >= alignof(int32)). Per discussion with Atsushi Ogawa. He proposes some further hacking that I'm not yet sold on, but these two changes are unconditional wins since there is no case in which they make things slower.
2005-05-14Convert the existing regression test scripts for the various optionalTom Lane
PLs to use the standard pg_regress infrastructure. No changes in the tests themselves. Andrew Dunstan
2005-05-13Revise nodeMergejoin in light of example provided by Guillaume Smet.Tom Lane
When one side of the join has a NULL, we don't want to uselessly try to match it against every remaining tuple of the other side. While at it, rewrite the comparison machinery to avoid multiple evaluations of the left and right input expressions and to use a btree comparator where available, instead of double operator calls. Also revise the state machine to eliminate redundant comparisons and hopefully make it more readable too.
2005-05-13Add -N make flag to bcc builds from /src dir.Bruce Momjian
2005-05-13Add regression test for consecutive newlines in COPY CSV mode. (There isNeil Conway
no bug related to this functionality in HEAD, but it's worth adding a test for anyway.) From Andrew Dunstan.
2005-05-12Remove some unnecessary code: since ExecMakeFunctionResultNoSets does notTom Lane
want to handle set inputs, it should just pass NULL for isDone, not make its own failure check.
2005-05-11Give pg_regress a --load-language option, so that it can be used to testTom Lane
other PLs besides plpgsql. Andrew Dunstan
2005-05-11This patch will ensure that the hash table iteration performed byBruce Momjian
AtCommit_Portals is restarted when a portal is deleted. This is necessary since the deletion of a portal may cause the deletion of another which on rare occations may cause the iterator to return a deleted portal an thus a renewed attempt delete. Thomas Hallgren
2005-05-11This patch refactors away some duplicated code in the index AM buildNeil Conway
methods: they all invoke UpdateStats() since they have computed the number of heap tuples, so I created a function in catalog/index.c that each AM now calls.
2005-05-11This patch reduces the size of the message header used by statisticsNeil Conway
collector messages, per recent discussion on pgsql-patches. This actually required quite a few changes -- for example, "databaseid != InvalidOid" was used to check whether a slot in the backend entry table was initialized, but that no longer works since the slot might be initialized prior to receiving the BESTART message which contains the database id. We now use procpid > 0 to indicate that a slot is non-empty. Other changes: - various comment improvements and cleanups - there's no need to zero-out the entire activity buffer in pgstat_add_backend(), we can just set activity[0] to '\0'. - remove the counting of the # of connections to a database; this was not used anywhere One change in behavior I wasn't sure about: previously, the code would create a hash table entry for a database as soon as any message was received whose header referenced that database. Now, we only create hash table entries as needed (so for example BESTART won't create a database hash table entry, since it doesn't need to access anything in the per-db hash table). It would be easy enough to retain the old behavior, but AFAICS it is not required.
2005-05-11Code cleanup: in C89, there is no point casting the first argument toNeil Conway
memset() or MemSet() to a char *. For one, memset()'s first argument is a void *, and further void * can be implicitly coerced to/from any other pointer type.
2005-05-10Back out check for unreferenced files.Bruce Momjian
Heikki Linnakangas
2005-05-10Report index name on CLUSTER failure. Also, suggest ALTER TABLEBruce Momjian
WITHOUT CLUSTER for cluster failure of a single table in a full db cluster.
2005-05-10Fix typo in comment.Neil Conway
2005-05-10Regression tests for the COPY CSV header feature. From Andrew Dunstan.Neil Conway
2005-05-09Update "expected" regression test output for the recent stats collectorNeil Conway
checkin. My apologies for breaking the tests.
2005-05-09Fix duplicate call to WRITE_NODE_FIELD(whereClause) in _outSelectStmtTatsuo Ishii
2005-05-09Add some defenses against functions declared to return set that don'tTom Lane
actually follow the protocol; per example from Kris Jurka.
2005-05-09Complete the following TODO items:Neil Conway
* Add session start time to pg_stat_activity * Add the client IP address and port to pg_stat_activity Original patch from Magnus Hagander, code review by Neil Conway. Catalog version bumped. This patch sends the client IP address and port number in every statistics message; that's not ideal, but will be fixed up shortly.
2005-05-08Update release checklist to reflect that HISTORY and INSTALL don'tTom Lane
need to be created by hand anymore.
2005-05-07Repair very-low-probability race condition between relation extensionTom Lane
and VACUUM: in the interval between adding a new page to the relation and formatting it, it was possible for VACUUM to come along and decide it should format the page too. Though not harmful in itself, this would cause data loss if a third transaction were able to insert tuples into the vacuumed page before the original extender got control back.
2005-05-07Adjust time qual checking code so that we always check TransactionIdIsInProgressTom Lane
before we check commit/abort status. Formerly this was done in some paths but not all, with the result that a transaction might be considered committed for some purposes before it became committed for others. Per example found by Jan Wieck.
2005-05-07Fix case in which a debug printout would print already-pfreed data.Tom Lane
2005-05-07Add comment on C locale test for upper/lower/initcap().Bruce Momjian
2005-05-07Add COPY WITH CVS HEADER to allow a heading line as the first line inBruce Momjian
COPY. Andrew Dunstan
2005-05-06Update backend flowchart HTML.Bruce Momjian
2005-05-06Update flowchart sections to match current CVS.Bruce Momjian
2005-05-06Markup improvements.Bruce Momjian
2005-05-06Update backend flowchard wordingBruce Momjian
2005-05-06For some reason access/tupmacs.h has been #including utils/memutils.h,Tom Lane
which is neither needed by nor related to that header. Remove the bogus inclusion and instead include the header in those C files that actually need it. Also fix unnecessary inclusions and bad inclusion order in tsearch2 files.
2005-05-06Update comment to mention "Name classification hierarchy" as place toBruce Momjian
check for reserved words.
2005-05-06Convert some mulit-line comments in copy.c to single line, as appropriate.Bruce Momjian