aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Undo perl's nasty locale setting on Windows. Since we can't do that asAndrew Dunstan2006-01-28
| | | | | elsewhere by setting the environment appropriately, we make perl do it right after interpreter startup by calling its POSIX::setlocale().
* Per a bug report from Theo Schlossnagle, plperl_return_next() leaksNeil Conway2006-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | memory in the executor's per-query memory context. It also inefficient: it invokes get_call_result_type() and TupleDescGetAttInMetadata() for every call to return_next, rather than invoking them once (per PL/Perl function call) and memoizing the result. This patch makes the following changes: - refactor the code to include all the "per PL/Perl function call" data inside a single struct, "current_call_data". This means we don't need to save and restore N pointers for every recursive call into PL/Perl, we can just save and restore one. - lookup the return type metadata needed by plperl_return_next() once, and then stash it in "current_call_data", so as to avoid doing the lookup for every call to return_next. - create a temporary memory context in which to evaluate the return type's input functions. This memory context is reset for each call to return_next. The patch appears to fix the memory leak, and substantially reduces the overhead imposed by return_next.
* Tweak initdb to reduce verbosity of progress messages, by printing justTom Lane2006-01-27
| | | | | | | one 'creating subdirectories' message instead of one per subdirectory. The original decision to print something for each subdirectory was made when there were only one or two of 'em; we have way too many now. Per discussion.
* Snowball multibyte. It's a pity, but snowball sources is very diferent for ↵Teodor Sigaev2006-01-27
| | | | | | | | multibyte and singlebyte encodings, so we should have snowball for every encodings. I hope that finalize multibyte support work in tsearch2, but testing is needed...
* Suppress signed-vs-unsigned-char warning.Tom Lane2006-01-26
|
* Fix display of whole-row Var appearing at the top level of a SELECT list.Tom Lane2006-01-26
| | | | | | | | While we normally prefer the notation "foo.*" for a whole-row Var, that does not work at SELECT top level, because in that context the parser will assume that what is wanted is to expand the "*" into a list of separate target columns, yielding behavior different from a whole-row Var. We have to emit just "foo" instead in that context. Per report from Sokolov Yura.
* Update btree_gist for CIDR/INET changes --- there's really no need toTom Lane2006-01-26
| | | | have a separate set of CIDR code here, either.
* Done:Bruce Momjian2006-01-26
| | | | | | | | < * %Prevent INET cast to CIDR if the unmasked bits are not zero, or < zero the bits < * %Prevent INET cast to CIDR from dropping netmask, SELECT '1.1.1.1'::inet::cidr > * -Zero umasked bits in conversion from INET cast to CIDR > * -Prevent INET cast to CIDR from dropping netmask, SELECT '1.1.1.1'::inet::cidr
* Clean up the INET-vs-CIDR situation. Get rid of the internal is_cidr flagTom Lane2006-01-26
| | | | | | | | and rely exclusively on the SQL type system to tell the difference between the types. Prevent creation of invalid CIDR values via casting from INET or set_masklen() --- both of these operations now silently zero any bits to the right of the netmask. Remove duplicate CIDR comparison operators, letting the type rely on the INET operators instead.
* Remove the no-longer-useful HashItem/HashItemData level of structure.Tom Lane2006-01-25
| | | | Same motivation as for BTItem.
* Remove the no-longer-useful BTItem/BTItemData level of structure, andTom Lane2006-01-25
| | | | | | | just refer to btree index entries as plain IndexTuples, which is what they have been for a very long time. This is mostly just an exercise in removing extraneous notation, but it does save a palloc/pfree cycle per index insertion.
* Remove unnecessary PQconsumeInput call from PQputCopyData; it's redundantTom Lane2006-01-25
| | | | | | | because pqSendSome will absorb input data anytime it'd be forced to block. Avoiding a kernel call per PQputCopyData call helps COPY speed materially. Alon Goldshuv
* Allow row comparisons to be used as indexscan qualifications.Tom Lane2006-01-25
| | | | This completes the project to upgrade our handling of row comparisons.
* Update regression error message for NUMERIC range overflow. Display "1"Bruce Momjian2006-01-25
| | | | instead of "10^0".
* Update regression error message for NUMERIC range overflow. Display "1"Bruce Momjian2006-01-25
| | | | instead of 10^0.
* Improve error message when NUMERIC precision is exceeded.Bruce Momjian2006-01-25
|
* Fix unportable usage of socklen_t: should use ACCEPT_TYPE_ARG3 macroTom Lane2006-01-24
| | | | provided by configure, instead. Per bug #2205.
* - Synced parser and keyword list.Michael Meskes2006-01-24
| | | | - Added another test case.
* Instead of using a numberOfRequiredKeys count to distinguish requiredTom Lane2006-01-23
| | | | | | | | | and non-required keys in a btree index scan, mark the required scankeys with private flag bits SK_BT_REQFWD and/or SK_BT_REQBKWD. This seems at least marginally clearer to me, and it eliminates a wired-into-the- data-structure assumption that required keys are consecutive. Even though that assumption will remain true for the foreseeable future, having it in there makes the code seem more complex than necessary.
* Prototype fix for typo.Bruce Momjian2006-01-23
|
* Use is_cidr in INET/CIDR structure, rather than the generic 'type'.Bruce Momjian2006-01-23
|
* Improve wording of descriptions of SIGHUP GUC parameters, as per myTom Lane2006-01-23
| | | | | | | suggestion a couple days ago. Fix some cases in which the documentation neglected to mention any restriction on when a parameter can be set. Try to be consistent about calling parameters parameters; use the term option only for command-line switches.
* Fix typeing as Tom suggestTeodor Sigaev2006-01-23
|
* Done:Bruce Momjian2006-01-23
| | | | | | | | | | < o Allow an alias to be provided for the target table in < UPDATE/DELETE < < This is not SQL-spec but many DBMSs allow it. < > o -Allow an alias to be provided for the target table in > UPDATE/DELETE (Neil)
* Improve note about not using the target table name in the SET clause.Tom Lane2006-01-22
| | | | It's not related to whether an alias is used or not.
* Fix alias-for-target-table-of-UPDATE-or-DELETE patch so that alias canTom Lane2006-01-22
| | | | | be any ColId other than 'SET', rather than only IDENT as originally. Per discussion.
* Allow an optional alias for the target table to be specified for UPDATENeil Conway2006-01-22
| | | | | | | | | | and DELETE. If specified, the alias must be used instead of the full table name. Also, the alias currently cannot be used in the SET clause of UPDATE. Patch from Atsushi Ogawa, various editorialization by Neil Conway. Along the way, make the rowtypes regression test pass if add_missing_from is enabled, and add a new (skeletal) regression test for DELETE.
* Minor improvements to GEQO documentation.Neil Conway2006-01-22
|
* Marginal improvements in the wording of the autovacuum documentation:Tom Lane2006-01-21
| | | | | | | | be consistent about whether it's called a daemon or a subprocess, and don't describe the autovacuum setting in exactly the same way as the stats_start_collector setting, because that leaves people thinking (if they aren't paying close attention) that autovacuum can't be changed on the fly.
* Fix broken markup.Tom Lane2006-01-21
|
* Repair longstanding bug in slru/clog logic: it is possible for two backendsTom Lane2006-01-21
| | | | | | | | | | to try to create a log segment file concurrently, but the code erroneously specified O_EXCL to open(), resulting in a needless failure. Before 7.4, it was even a PANIC condition :-(. Correct code is actually simpler than what we had, because we can just say O_CREAT to start with and not need a second open() call. I believe this accounts for several recent reports of hard-to-reproduce "could not create file ...: File exists" errors in both pg_clog and pg_subtrans.
* Add GRANT ON SEQUENCE syntax to support sequence-only permissions.Bruce Momjian2006-01-21
| | | | | | | | | | | | | Continue to support GRANT ON [TABLE] for sequences for backward compatibility; issue warning for invalid sequence permissions. [Backward compatibility warning message.] Add USAGE permission for sequences that allows only currval() and nextval(), not setval(). Mention object name in grant/revoke warnings because of possible multi-object operations.
* Replace bitwise looping with bytewise looping in hemdistsign andTom Lane2006-01-20
| | | | | | | sizebitvec of tsearch2, as well as identical code in several other contrib modules. This provided about a 20X speedup in building a large tsearch2 index ... didn't try to measure its effects for other operations. Thanks to Stephan Vollmer for providing a test case.
* Update EXPLAIN wording for GEQO usage.Bruce Momjian2006-01-20
|
* Fix thinko in autovacuum's test to skip temp tables: want to skip anyTom Lane2006-01-20
| | | | | | temp table not only our own process' tables. It's not real important since vacuum.c will skip temp tables anyway, but might as well make the code do what it claims to do.
* Doc patch that adds an example of a correllated UPDATE.Bruce Momjian2006-01-19
| | | | David Fetter
* Clarify STABLE function documentation to highlight how such functionsBruce Momjian2006-01-19
| | | | can be optimized.
* Add some test scaffolding to allow cache-flush stress testing (and I doTom Lane2006-01-19
| | | | mean stress ... system is orders of magnitude slower with this enabled).
* Remove $(DESTDIR) from the pgxs BE_DLLLIBS= -L path for AIX and Darwin.Bruce Momjian2006-01-19
|
* Remove $(DESTDIR) from the pgxs BE_DLLLIBS= -L path.Bruce Momjian2006-01-19
|
* Avoid crashing if relcache flush occurs while trying to load data into anTom Lane2006-01-19
| | | | | | | | | | | | | | | index's support-function cache (in index_getprocinfo). Since none of that data can change for an index that's in active use, it seems sufficient to treat all open indexes the same way we were treating "nailed" system indexes --- that is, just re-read the pg_class row and leave the rest of the relcache entry strictly alone. The pg_class re-read might not be strictly necessary either, but since the reltablespace and relfilenode can change in normal operation it seems safest to do it. (We don't support changing any of the other info about an index at all, at the moment.) Back-patch as far as 8.0. It might be possible to adapt the patch to 7.4, but it would take more work than I care to expend for such a low-probability problem. 7.3 is out of luck for sure.
* Fix pgxs -L library path specification for Win32 and Cygwin, was /bin,Bruce Momjian2006-01-19
| | | | now /lib.
* It turns out that TablespaceCreateDbspace fails badly if a relcache flushTom Lane2006-01-19
| | | | | | | | | | | | | | occurs when it tries to heap_open pg_tablespace. When control returns to smgrcreate, that routine will be holding a dangling pointer to a closed SMgrRelation, resulting in mayhem. This is of course a consequence of the violation of proper module layering inherent in having smgr.c call a tablespace command routine, but the simplest fix seems to be to change the locking mechanism. There's no real need for TablespaceCreateDbspace to touch pg_tablespace at all --- it's only opening it as a way of locking against a parallel DROP TABLESPACE command. A much better answer is to create a special-purpose LWLock to interlock these two operations. This drops TablespaceCreateDbspace quite a few layers down the food chain and makes it something reasonably safe for smgr to call.
* Fix a tiny memory leak (one List header) in RelationCacheInvalidate().Tom Lane2006-01-19
| | | | | | | This is utterly insignificant in normal operation, but it becomes a problem during cache inval stress testing. The original coding in fact had no leak --- the 8.0 List rewrite created the issue. I wonder whether list_concat should pfree the discarded header?
* Clarify use of btree indexes for ILIKE and ~*.Bruce Momjian2006-01-18
|
* You'll find attached a patch for a fixed explanation on parameter_modeBruce Momjian2006-01-18
| | | | | | column, OUT and INOUT added. Guillaume LELARGE
* Modify pgstats code to reduce performance penalties from oversized stats dataTom Lane2006-01-18
| | | | | | | | | | | | | files: avoid creating stats hashtable entries for tables that aren't being touched except by vacuum/analyze, ensure that entries for dropped tables are removed promptly, and tweak the data layout to avoid storing useless struct padding. Also improve the performance of pgstat_vacuum_tabstat(), and make sure that autovacuum invokes it exactly once per autovac cycle rather than multiple times or not at all. This should cure recent complaints about 8.1 showing much higher stats I/O volume than was seen in 8.0. It'd still be a good idea to revisit the design with an eye to not re-writing the entire stats dataset every half second ... but that would be too much to backpatch, I fear.
* Done:Bruce Momjian2006-01-18
| | | | > o -Allow pooled connections to list all open WITH HOLD cursors
* Add a new system view, pg_cursors, that displays the currently availableNeil Conway2006-01-18
| | | | | | | | | | | | | | | | | | | | | cursors. Patch from Joachim Wieland, review and ediorialization by Neil Conway. The view lists cursors defined by DECLARE CURSOR, using SPI, or via the Bind message of the frontend/backend protocol. This means the view does not list the unnamed portal or the portal created to implement EXECUTE. Because we do list SPI portals, there might be more rows in this view than you might expect if you are using SPI implicitly (e.g. via a procedural language). Per recent discussion on -hackers, the query string included in the view for cursors defined by DECLARE CURSOR is based on debug_query_string. That means it is not accurate if multiple queries separated by semicolons are submitted as one query string. However, there doesn't seem a trivial fix for that: debug_query_string is better than nothing. I also changed SPI_cursor_open() to include the source text for the portal it creates: AFAICS there is no reason not to do this. Update the documentation and regression tests, bump the catversion.
* Fix fsync code to test whether F_FULLFSYNC is available, instead ofTom Lane2006-01-17
| | | | assuming it always is on Darwin. Per report from Neil Brandt.