aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
...
* Avoid running out of memory during hash_create, by not passing aTom Lane2003-12-30
| | | | | number-of-buckets that exceeds the size we actually plan to allow the hash table to grow to. Per trouble report from Sean Shanny.
* ShmemInitHash forgot to specify HASH_ALLOC flag bit in its hash_createTom Lane2003-12-30
| | | | | | call. You'd think this would cause some problems, but because of the way hash_create is coded, the only side-effect was creation of a useless memory context for the hashtable.
* Use hash table name, not one-size-fits-all 'DynaHashTable', to identifyTom Lane2003-12-29
| | | | | memory contexts belonging to hash tables. Makes the memory stats printout a little more useful.
* Using canonicalize_qual() to get rid of duplicate index predicateTom Lane2003-12-29
| | | | | | | conditions is overkill; set_union() does the job about as well, and much more efficiently. Furthermore this avoids assuming that canonicalize_qual() will check for duplicate clauses at all, which it may not always do.
* Improve comment.Tom Lane2003-12-29
|
* Tweak OpernameGetCandidates() to reduce palloc overhead --- profilingTom Lane2003-12-29
| | | | | | showed that for common operator names such as '=', the pallocs done by this routine occupied a surprisingly large fraction of the total time for the parser to process an operator.
* Clean up the usage of canonicalize_qual(): in particular, be consistentTom Lane2003-12-28
| | | | | | | | | about whether it is applied before or after eval_const_expressions(). I believe there were some corner cases where the system would fail to recognize that a partial index is applicable because of the previous inconsistency. Store normal rather than 'implicit AND' representations of constraints and index predicates in the catalogs. initdb forced due to representation change of constraints/predicates.
* Improve spinlock code for recent x86 processors: insert a PAUSETom Lane2003-12-27
| | | | | | instruction in the s_lock() wait loop, and use test before test-and-set in TAS() macro to avoid unnecessary bus traffic. Patch from Manfred Spraul, reworked a bit by Tom.
* Continued rearrangement to permit pgstat + BootstrapMain processes to beBruce Momjian2003-12-25
| | | | | | fork/exec'd, in the same mode as the previous patch for backends. Claudio Natoli
* Patch that makes quoting "sameuser", "samegroup", and "all" removeBruce Momjian2003-12-25
| | | | | | | | | special meaning of these terms in pg_hba.conf. Also changes ugly pg_hba.conf IPv6 netmask of ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff to ::1/128. Andrew Dunstan
* > > I have no idea if this in Oracle or not. But it's something IBruce Momjian2003-12-25
| | | | | | | | | | | | | | | > > needed, and other people in the past asked about it too. > > It is in Oracle, but you aren't exactly on the spot. It should be > > IYYY - 4 digits ('2003') > IYY - 3 digits ('003') > IY - 2 digits ('03') > I - 1 digit ('3') Here is an updated patch that does that. Kurt Roeckx
* Use inlined TAS() on PA-RISC, if we are compiling with gcc.Tom Lane2003-12-23
| | | | Patch inspired by original submission from ViSolve.
* Fix a number of places where reconfiguring with a different installationTom Lane2003-12-23
| | | | | prefix would fail, because the new path did not get propagated to where it needed to be. Note this would fail even with --enable-depend.
* Mop-up for HAS_TEST_AND_SET refactoring. Un-break two or three platformsTom Lane2003-12-23
| | | | | | that were broken, try to make layout of s_lock.h entries consistent, use HAVE_SPINLOCKS in preference to HAS_TEST_AND_SET everywhere outside s_lock.h itself.
* Move slock_t typdefs into s_lock.h from include/port files forBruce Momjian2003-12-23
| | | | centralization and easier maintanence.
* Remove __alpha__ additions in main.c but document that they are missing.Bruce Momjian2003-12-23
|
* Remove NEED_I386_TAS_ASM and just test for compiler defines.Bruce Momjian2003-12-23
|
* This applied patch remove NEED_SPARC_TAS_ASM and instead uses __sparc ||Bruce Momjian2003-12-22
| | | | __sparc__.
* Test for __alpha and __alpha__.Bruce Momjian2003-12-22
|
* Further cleanup in _bt_first: eliminate duplicate code paths.Tom Lane2003-12-21
|
* Back out:Bruce Momjian2003-12-21
| | | | | | | > Attached is a patch that addressed all the discussed issues > that did not break backward compatability, including the > ability to output ISO-8601 compliant intervals by setting > datestyle to iso8601basic.
* [ This description should have been on the earlier fork/execBruce Momjian2003-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | commit, but I am adding it now so it is in CVS.] The patch basically is a slight rearrangement of the code to allow fork/exec on Unix, with the ultimate goal of doing CreateProcess on Win32. The changes are: o Write out postmaster global variables and per-backend variables to be read by the exec'ed backend o Mark some static variables as global when exec is used so then can be dumped from postmaster.c, marked NON_EXEC_STATIC o Remove value passing with -p now that we have per-backend file o Move some pointer storage out of shared memory for easier dumping. o Modified pgsql_temp directory cleanup to handle per-database directories and the backend exec directory under datadir. Claudio Natoli
* Previous change exposed some opportunities for further simplificationTom Lane2003-12-21
| | | | in _bt_first().
* Improve btree's initial-positioning-strategy code so that we never needTom Lane2003-12-21
| | | | | | | to step more than one entry after descending the search tree to arrive at the correct place to start the scan. This can improve the behavior substantially when there are many entries equal to the chosen boundary value. Per suggestion from Dmitry Tkach, 14-Jul-03.
* The recent DUMMY_PROCS patch broke accounting for the number of semaphoresTom Lane2003-12-21
| | | | | needed. This caused us to fail all the time on Darwin, and we'd fail for some values of maxBackends on SysV-sema platforms, too.
* bufmgr.c failed to compile on Darwin, because it didn't includeTom Lane2003-12-20
| | | | <sys/time.h> where struct timeval is defined.
* Fix broken IDENT support for FreeBSD (appears to have been broken byTom Lane2003-12-20
| | | | | ill-considered conditional logic in getpeereid patch of 3-Dec-2002). Per bug #1021.
* This patch is the next step towards (re)allowing fork/exec.Bruce Momjian2003-12-20
| | | | Claudio Natoli
* In my mind there were two categories of open issuesBruce Momjian2003-12-20
| | | | | | | | | | | | | | | | | | | | | | | | a) ones that are 100% backward (such as the comment about outputting this format) and b) ones that aren't (such as deprecating the current postgresql shorthand of '1Y1M'::interval = 1 year 1 minute in favor of the ISO-8601 'P1Y1M'::interval = 1 year 1 month. Attached is a patch that addressed all the discussed issues that did not break backward compatability, including the ability to output ISO-8601 compliant intervals by setting datestyle to iso8601basic. Interval values can now be written as ISO 8601 time intervals, using the "Format with time-unit designators". This format always starts with the character 'P', followed by a string of values followed by single character time-unit designators. A 'T' separates the date and time parts of the interval. Ron Mayer
* Forbid REVOKE on untrusted languages, and don't dump privileges ofPeter Eisentraut2003-12-19
| | | | untrusted languages (in case they sneak in).
* Make to_hex() behave portably on negative input values (treat them asTom Lane2003-12-19
| | | | unsigned integers). Per report from Jim Crate.
* Use a shutdown callback to ensure proper clean up when rescanningJoe Conway2003-12-19
| | | | | partially-evaluated SRFs. Per report found here: http://archives.postgresql.org/pgsql-general/2003-12/msg00851.php
* Fix memory leak with SSL connections due to missing X509_free() calls.Tom Lane2003-12-18
| | | | Per Neil Conway.
* Use a shutdown callback to clear setArgsValid in a FuncExprState that isTom Lane2003-12-18
| | | | | evaluating a set-valued function. This fixes some additional problems with rescanning partially-evaluated SRFs.
* Ensure set-returning functions in the targetlist of a plan node will beTom Lane2003-12-18
| | | | | | shut down cleanly if the plan node is ReScanned before the SRFs are run to completion. This fixes the problem for SQL-language functions, but still need work on functions using the SRF_XXX() macros.
* Here is the definition of relation_byte_size() in optimizer/path/costsize.c:Bruce Momjian2003-12-18
| | | | | | | | | | | | | | | | | | | | | | ---------------------------------------------------------------------- /* * relation_byte_size * Estimate the storage space in bytes for a given number of tuples * of a given width (size in bytes). */ static double relation_byte_size(double tuples, int width) { return tuples * (MAXALIGN(width) + MAXALIGN(sizeof(HeapTupleData))); } ---------------------------------------------------------------------- Shouldn't this be HeapTupleHeaderData and not HeapTupleData ? (Of course, from a costing perspective these shouldn't be very different but ...) Sailesh Krishnamurthy
* Be a little smarter in group_clauses_by_indexkey_for_join: detect casesTom Lane2003-12-18
| | | | | | where a joinclause is redundant with a restriction clause. Original coding believed this was impossible and didn't need to be checked for, but that was a thinko ...
* information_schema.constraint_column_usage and key_column_usage shouldTom Lane2003-12-17
| | | | | not discriminate against system columns, since we support constraints on system columns, and in fact constraints on OID are moderately useful.
* Fix DecodeInterval to handle '-0.1' sanely, per gripe from Tilo Schwarz.Tom Lane2003-12-17
|
* Reorder tests in parse_coerce so that ANY/ANYELEMENT/ANYARRAY coercionTom Lane2003-12-17
| | | | | | does not affect UNKNOWN-type literals or Params. This fixes the recent complaint about count('x') being broken, and improves consistency in a few other respects too.
* Repair planner failure when there are multiple IN clauses, each withTom Lane2003-12-17
| | | | | | | a join in its subselect. In this situation we *must* build a bushy plan because there are no valid left-sided or right-sided join trees. Accordingly, hoary sanity check needs an update. Per report from Alessandro Depase.
* Fix constraint_column_usage for foreign keys.Peter Eisentraut2003-12-16
|
* Add mention with might need to use cp -R someday for portability.Bruce Momjian2003-12-15
|
* I posted some bufmgr cleanup a few weeks ago, but it conflicted withNeil Conway2003-12-14
| | | | | | | | | | | | | | | | | | | | | | | | some concurrent changes Jan was making to the bufmgr. Here's an updated version of the patch -- it should apply cleanly to CVS HEAD and passes the regression tests. This patch makes the following changes: - remove the UnlockAndReleaseBuffer() and UnlockAndWriteBuffer() macros, and replace uses of them with calls to the appropriate functions. - remove a bunch of #ifdef BMTRACE code: it is ugly & broken (i.e. it doesn't compile) - make BufferReplace() return a bool, not an int - cleanup some logic in bufmgr.c; should be functionality equivalent to the previous code, just cleaner now - remove the BM_PRIVATE flag as it is unused - improve a few comments, etc.
* This patch properly sets the prototype for the on_shmem_exit andPeter Eisentraut2003-12-12
| | | | | | | on_proc_exit functions, and adjust all other related code to use the proper types too. by Kurt Roeckx
* query_tree_mutator should copy RangeTblEntry nodes even when it's notTom Lane2003-12-09
| | | | | | | planning to modify them itself. Otherwise we end up with shared RTE substructure, which breaks inheritance_planner because the rte->inh flag needs to be independent in each copied subquery. Per bug report from Chris Piker.
* Whole-row references were broken for subqueries and functions, becauseTom Lane2003-12-08
| | | | | attr_needed/attr_widths optimization failed to allow for Vars with attno zero in this case. Per report from Tatsuo Ishii.
* Remove test on c.relkind from check_constraints view; unnecessary andTom Lane2003-12-07
| | | | | prevents view from showing constraints on domains. This addresses the other half of Claus Colloseus' bug report.
* Fix typmod interpretation for bit types. (It was erroneously assumed thatPeter Eisentraut2003-12-07
| | | | for bit(x), the typmod stores x+4, like for the character types.)
* Repair indexed bytea like operations, and related selectivityJoe Conway2003-12-07
| | | | | functionality. Per bug report by Alvar Freude: http://archives.postgresql.org/pgsql-bugs/2003-12/msg00022.php