aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
* 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.
* 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.
* 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().
* Fix problem with infinite recursion between write_syslogger_file andTom Lane2005-03-12
| | | | | | | | elog if the former has trouble writing its file. Code review for Magnus' patch to redirect stderr to syslog on Windows (Bruce's version seems right, but did some minor prettification). Backpatch both changes to 8.0 branch.
* Replace ARC cache management algorithm with the similar but slightlyTom Lane2005-03-03
| | | | | | | | | simpler 2Q algorithm, to avoid possible problems with the pending patent on ARC. Testing so far suggests that there is little if any performance loss from doing this. Note that this patch is going into the 8.0 branch only; a much more extensive revision is planned for HEAD.
* Release proclock immediately in RemoveFromWaitQueue() if it representsTom Lane2005-03-01
| | | | | | no held locks. This maintains the invariant that proclocks are present only for procs that are holding or awaiting a lock; when this is not true, LockRelease will fail. Per report from Stephen Clouse.
* Adjust OR indexscan logic to not generate redundant condition-free ORTom Lane2005-03-01
| | | | | | indexscans involving partial indexes. These would always be dominated by a simple indexscan on such an index, so there's no point in considering them. Fixes overoptimism in a patch I applied last October.
* Revert the logic for expanding AND/OR conditions in pred_test() to whatTom Lane2005-03-01
| | | | | | it was in 7.4, and add some comments explaining why it has to be this way. I broke it for OR'd index predicates in a fit of code cleanup last summer. Per example from Sergey Koshcheyev.
* New arrangement to always let the bgwriter do checkpoints brokeTom Lane2005-02-19
| | | | | CHECKPOINT and some other commands in the context of a standalone backend. Allow a standalone backend to do its own checkpoints.
* Ensure that the resolved datatype of any unknown Param is propagatedTom Lane2005-02-19
| | | | | into the sub-SELECT targetlist when it appears in the context INSERT INTO foo SELECT $1 ... Per report from Abhijit Menon-Sen.
* ALTER LANGUAGE RENAME has never worked. Per Sergey Yatskevich.Tom Lane2005-02-14
|
* Translation updatesPeter Eisentraut2005-02-11
|
* Fix SPI cursor support to allow scanning the results of utility commandsTom Lane2005-02-10
| | | | | | that return tuples (such as EXPLAIN). Per gripe from Michael Fuhr. Side effect: fix an old bug that unintentionally disabled backward scans for all SPI-created cursors.
* ALTER TABLE ADD COLUMN exhibits a significant memory leak when adding aNeil Conway2005-02-09
| | | | | | | | | | | | | | | | | | | | column with a default expression. In that situation, we need to rewrite the heap relation. To evaluate the new default expression, we use ExecEvalExpr(); however, this can allocate memory in the current memory context, and ATRewriteTable() does not switch out of the active portal's heap memory context. The end result is a rather large memory leak (on the order of gigabytes for a reasonably sized table). This patch changes ATRewriteTable() to switch to the per-tuple memory context before beginning the per-tuple loop. It also removes an explicit heap_freetuple() in the loop, since that is no longer needed. In an unrelated change, I noticed the code was scanning through the attributes of the new tuple descriptor for each tuple of the old table. I changed this to use precomputation, which should slightly speed up the loop. Thanks to steve@deefs.net for reporting the leak.
* Repair CLUSTER failure after ALTER TABLE SET WITHOUT OIDS. Turns outTom Lane2005-02-06
| | | | | | | there are corner cases involving dropping toasted columns in which the previous coding would fail, too: the new version of the table might not have any TOAST table, but we'd still propagate possibly-wide values of dropped columns forward.
* Ensure that all details of the ARC algorithm are hidden within freelist.c.Tom Lane2005-02-03
| | | | | This refactoring does not change any algorithms or data structures, just remove visibility of the ARC datastructures from other source files.
* Improve performance of fmgr.c calling routines for cases with more thanTom Lane2005-02-02
| | | | two arguments. Per suggestions from A. Ogawa.
* Adjust constant-folding of CASE expressions so that the simple comparisonTom Lane2005-02-02
| | | | | | | | form of CASE (eg, CASE 0 WHEN 1 THEN ...) can be constant-folded as it was in 7.4. Also, avoid constant-folding result expressions that are certainly unreachable --- the former coding was a bit cavalier about this and could generate unexpected results for all-constant CASE expressions. Add regression test cases. Per report from Vlad Marchenko.
* Fix a bug induced by the list-rewrite that resulted in incrementing theNeil Conway2005-02-01
| | | | command counter more than necessary. Per report from Michael Fuhr.
* Adjust estimate_num_groups() to not clamp per-relation group countTom Lane2005-02-01
| | | | | | | estimate to less than the number of values estimated for any one grouping Var, as suggested by Manfred. This is intuitively right, and what's more it puts the plan choices in the subselect regression test back the way they were before ...
* Sync inet formatting code with recent BIND releases. In particular,Tom Lane2005-02-01
| | | | | fix bug with inconsistent selection of default mask length for "class D" addresses. Per report from Steve Atkins.
* Translation updatesPeter Eisentraut2005-01-30
|
* When dealing with multiple grouping columns coming from the same table,Tom Lane2005-01-28
| | | | | | | | | clamp the estimated number of groups to table row count over 10, instead of table row count; this reflects a heuristic that people probably won't group over a near-unique set of columns, and the knowledge that we don't currently have any way to estimate the correlation of the columns better than guessing. This change creates a trivial plan change in one of the regression tests.
* Improve planner's estimation of the space needed for HashAgg plans:Tom Lane2005-01-28
| | | | | | look at the actual aggregate transition datatypes and the actual overhead needed by nodeAgg.c, instead of using pessimistic round numbers. Per a discussion with Michael Tiemann.
* Check that aggregate creator has the right to execute the transitionTom Lane2005-01-27
| | | | functions of the aggregate, at both aggregate creation and execution times.
* Close all cursors created during a failed subtransaction. This is neededTom Lane2005-01-26
| | | | | | to avoid problems when a cursor depends on objects created or changed in the same subtransaction. We'd like to do better someday, but this seems the only workable answer for 8.0.1.
* On Windows, set the postmaster executable's stack size to 4MB, so thatTom Lane2005-01-26
| | | | it agrees with the default value of max_stack_depth.
* Translation updatePeter Eisentraut2005-01-25
|
* Fix ALTER TABLE ADD COLUMN so that constraints of domain types areTom Lane2005-01-24
| | | | | enforced properly when there is no explicit default value for the new column. Per report from Craig Perras.
* Disallow LOAD to non-superusers. Per report from John Heasman.Tom Lane2005-01-24
|
* Fix memory leak in rtdosplit, per report from Clive Page.Tom Lane2005-01-24
|
* The result of a FULL or RIGHT join can't be assumed to be sorted by theTom Lane2005-01-23
| | | | | left input's sorting, because null rows may be inserted at various points. Per report from Ferenc Lutischá¸n.
* Translation updatesPeter Eisentraut2005-01-17
|
* Translation updatesPeter Eisentraut2005-01-17
|
* Translation updatesPeter Eisentraut2005-01-17
|
* Fix format string error.Peter Eisentraut2005-01-17
|
* Translation updatesPeter Eisentraut2005-01-17
|
* postgres -boot would print the wrong program name in event of aTom Lane2005-01-14
| | | | failure in SelectConfigFiles(). Cosmetic issue, but ...
* Update obsolete comment, per Alvaro.Tom Lane2005-01-14
|
* Translation updatesPeter Eisentraut2005-01-13
|
* get_names_for_var didn't do recursion for unnamed JOIN vars quite right;Tom Lane2005-01-13
| | | | | | | got it wrong when the JOIN was in an outer query level. Per example from Laurie Burrow. Also fix same issue in markTargetListOrigin. I think the latter is only a latent bug since we currently don't apply markTargetListOrigin except at the outer level ... but should do it right anyway.
* Remove unportable assumption that it's okay to use the target bufferTom Lane2005-01-13
| | | | | of an sprintf() as a source string. Demonstrably does not work with recent gcc and/or glibc on some platforms.
* Add conditional inclusion of <com_err.h> to support old 'heimdal'Tom Lane2005-01-12
| | | | version of Kerberos. Per report from Reinhard Max.
* Re-allow an untyped literal as the test expression of a CASE, ieTom Lane2005-01-12
| | | | | | CASE 'a' WHEN 'a' THEN 1 ELSE 2 END. This worked in 7.4 and before but had been broken due to premature freezing of the type of the test expression. Per gripe from GÄbor SzÃcs.
* Increase MAXLISTEN to a more generous value, and add an error messageTom Lane2005-01-12
| | | | | telling when it has been exceeded. Per trouble report from Jean-GÅrard Pailloncy.
* interval_out failed to mention 'ago' for negative intervals in SQL andTom Lane2005-01-11
| | | | GERMAN datestyles. Ancient bug reported by Terry Lee Tucker.
* Separate the functions of relcache entry flush and smgr cache entry flushTom Lane2005-01-10
| | | | | | so that we can get the size of a shared inval message back down to what it was in 7.4 (and simplify the logic too). Phase 2 of fixing the 'SMgrRelation hashtable corrupted' problem.
* Phase 1 of fix for 'SMgrRelation hashtable corrupted' problem. ThisTom Lane2005-01-10
| | | | | | is the minimum required fix. I want to look next at taking advantage of it by simplifying the message semantics in the shared inval message queue, but that part can be held over for 8.1 if it turns out too ugly.