aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
* Improve numeric overflow error message.Bruce Momjian2006-10-03
| | | | David Fetter
* Make some sentences consistent with similar ones.Bruce Momjian2006-10-03
| | | | Euler Taveira de Oliveira
* The attached patch changes units of the some default values inBruce Momjian2006-10-03
| | | | | | | | | | | | | | | | | | | postgresql.conf. - shared_buffers = 32000kB => 32MB - temp_buffers = 8000kB => 8MB - wal_buffers = 8 => 64kB The code of initdb was a bit modified to write MB-unit values. Values greater than 8000kB are rounded out to MB. GUC_UNIT_XBLOCKS is added for wal_buffers. It is like GUC_UNIT_BLOCKS, but uses XLOG_BLCKSZ instead of BLCKSZ. Also, I cleaned up the test of GUC_UNIT_* flags in preparation to add more unit flags in less bits. ITAGAKI Takahiro
* Mention in postgresql.conf that autovacuum also needsBruce Momjian2006-10-03
| | | | | | stats_start_collector and stats_row_level to also be on David Wheeler
* Do a CHECK_FOR_INTERRUPTS after emitting a message of less than ERRORTom Lane2006-10-01
| | | | | | | severity. This is to ensure the user can cancel a query that's spitting out lots of notice/warning messages, even if they're coming from a loop that doesn't otherwise contain a CHECK_FOR_INTERRUPTS. Per gripe from Stephen Frost.
* Fix overly enthusiastic Assert introduced in 8.1: it's expecting aTom Lane2006-10-01
| | | | | CaseTestExpr, but forgot that the optimizer is sometimes able to replace CaseTestExpr by Const.
* Allow assignment to array elements not contiguous with those alreadyTom Lane2006-09-29
| | | | | | | | | | present; intervening positions are filled with nulls. This behavior is required by SQL99 but was not implementable before 8.2 due to lack of support for nulls in arrays. I have only made it work for the one-dimensional case, which is all that SQL99 requires. It seems quite complex to get it right in higher dimensions, and since we never allowed extension at all in higher dimensions, I think that must count as a future feature addition not a bug fix.
* Fix IS NULL and IS NOT NULL tests on row-valued expressions to conform toTom Lane2006-09-28
| | | | | | | | | | | | the SQL spec, viz IS NULL is true if all the row's fields are null, IS NOT NULL is true if all the row's fields are not null. The former coding got this right for a limited number of cases with IS NULL (ie, those where it could disassemble a ROW constructor at parse time), but was entirely wrong for IS NOT NULL. Per report from Teodor. I desisted from changing the behavior for arrays, since on closer inspection it's not clear that there's any support for that in the SQL spec. This probably needs more consideration.
* Replace strncpy with strlcpy in selected places that seem possibly relevantTom Lane2006-09-27
| | | | | | | to performance. (A wholesale effort to get rid of strncpy should be undertaken sometime, but not during beta.) This commit also fixes dynahash.c to correctly truncate overlength string keys for hashtables, so that its callers don't have to anymore.
* Degrade the transaction-id wraparound point message from LOG to DEBUG1, perAlvaro Herrera2006-09-26
| | | | | | discussion. Patch from Simon Riggs.
* Increase default value of effective_cache_size to 128MB, per discussion.Tom Lane2006-09-25
|
* Add a check to prevent overwriting valid data if smgrnblocks() gives aTom Lane2006-09-25
| | | | | | wrong answer, as has been seen to occur with a buggy Linux kernel. Not really our bug, but it's a simple test in a seldom-used control path, so might as well have a defense.
* Fix notice message from DROP FUNCTION IF EXISTS, and improve messageTom Lane2006-09-25
| | | | for DROP AGGREGATE IF EXISTS. Per report from Teodor.
* Fix pg_locks view to call advisory locks advisory locks, while preservingTom Lane2006-09-22
| | | | | backward compatibility for anyone using the old userlock code that's now on pgfoundry --- locks from that code still show as 'userlock'.
* Fix bugs in plpgsql and ecpg caused by assuming that isspace() would onlyTom Lane2006-09-22
| | | | | | | | | return true for exactly the characters treated as whitespace by their flex scanners. Per report from Victor Snezhko and subsequent investigation. Also fix a passel of unsafe usages of <ctype.h> functions, that is, ye olde char-vs-unsigned-char issue. I won't miss <ctype.h> when we are finally able to stop using it.
* Add units to the default postgresql.conf. For the most part, this shouldPeter Eisentraut2006-09-22
| | | | | match what SHOW displays as default value, to make the user experience uniform.
* Fix free space map to correctly track the total amount of FSM space neededTom Lane2006-09-21
| | | | | | | even when a single relation requires more than max_fsm_pages pages. Also, make VACUUM emit a warning in this case, since it likely means that VACUUM FULL or other drastic corrective measure is needed. Per reports from Jeff Frost and others of unexpected changes in the claimed max_fsm_pages need.
* Change patternsel (LIKE/regex selectivity estimation) so that if thereTom Lane2006-09-20
| | | | | | | | | is a large enough histogram, it will use the number of matches in the histogram to derive a selectivity estimate, rather than the admittedly pretty bogus heuristics involving examining the pattern contents. I set 'large enough' at 100, but perhaps we should change that later. Also apply the same technique in contrib/ltree's <@ and @> estimator. Per discussion with Stefan Kaltenbrunner and Matteo Beccati.
* Improve usage of effective_cache_size parameter by assuming that all theTom Lane2006-09-19
| | | | | | | | | | | tables in the query compete for cache space, not just the one we are currently costing an indexscan for. This seems more realistic, and it definitely will help in examples recently exhibited by Stefan Kaltenbrunner. To get the total size of all the tables involved, we must tweak the handling of 'append relations' a bit --- formerly we looked up information about the child tables on-the-fly during set_append_rel_pathlist, but it needs to be done before we start doing any cost estimation, so push it into the add_base_rels_to_query scan.
* Add built-in userlock manipulation functions to replace the formerTom Lane2006-09-18
| | | | | | | contrib functionality. Along the way, remove the USER_LOCKS configuration symbol, since it no longer makes any sense to try to compile that out. No user documentation yet ... mmoncure has promised to write some. Thanks to Abhijit Menon-Sen for creating a first draft to work from.
* Fix problems with column name list of CREATE TABLE AS being applied toTom Lane2006-09-18
| | | | | the input query's target list too soon, causing it to affect processing of ORDER BY in the input query.
* Fix CREATE TABLE ... AS VALUES ... to work rather than Assert'ing;Tom Lane2006-09-18
| | | | | | oversight in original implementation of VALUES. Also fix an oversight in recent addition of options to CREATE TABLE AS: they weren't getting propagated if the query was a set-operation such as UNION.
* Change ANALYZE to take ShareUpdateExclusiveLock not AccessShareLock onTom Lane2006-09-17
| | | | | | | | | | | | the table being analyzed. This prevents two ANALYZEs from running concurrently on the same table and possibly suffering concurrent-update failures while trying to store their results into pg_statistic. The downside is that a database-wide ANALYZE executed within a transaction block will hold ShareUpdateExclusiveLock on many tables simultaneously, which could lead to concurrency issues or even deadlock against another such ANALYZE. However, this seems a corner case of less importance than getting unexpected errors from a foreground ANALYZE when autovacuum elects to analyze the same table concurrently. Per discussion.
* Marginal cleanup in arrangements for ensuring StrategyHintVacuum is clearedTom Lane2006-09-17
| | | | | | | | | after an error during VACUUM. We have a PG_TRY block anyway around the only call sites, so just reset it in the CATCH clause instead of having AtEOXact_Buffers blindly do it during xact end. I think the old code was actively wrong for the case of a failure during ANALYZE inside a subtransaction --- the flag wouldn't get cleared until main transaction end. Probably not worth back-patching though.
* Rename the recently-added pg_timezonenames view to pg_timezone_abbrevs,Tom Lane2006-09-16
| | | | | | and create a new view pg_timezone_names that provides information about the zones known in the 'zic' database. Magnus Hagander, with some additional work by Tom Lane.
* Remove WINLDAPAPI decoration from ldap_start_tls_sA typedef, per Magnus.Tom Lane2006-09-15
|
* Improve confusing comment for HeapTupleSatisfiesNow, per gripe from Greg Stark.Tom Lane2006-09-15
|
* Make postgresql.conf.sample match the initdb defaults. This fixesBruce Momjian2006-09-14
| | | | comment alignment on most systems.
* Add a couple of information functions to support direct checks on whetherTom Lane2006-09-14
| | | | | | a schema is our own temp schema or another backend's temp schema, and use these in place of some former kluges in information_schema. Per my proposal of yesterday.
* Improve error message. Per discussionTeodor Sigaev2006-09-14
| | | | http://archives.postgresql.org/pgsql-general/2006-09/msg00186.php
* Make logging of extended-protocol commands a bit more consistent, perTom Lane2006-09-13
| | | | discussion with Guillaume Smet.
* Code review for patch to avoid second scan when vacuuming index-lessTom Lane2006-09-13
| | | | | table: avoid invoking LockBufferForCleanup without need, put out the same log message we would have before, minor code beautification.
* Remove unnecessary brace pair.Bruce Momjian2006-09-10
|
* Back out patch added during 8.2.X development:Bruce Momjian2006-09-10
| | | | | | | Allow to_char() "D" format specifiers for interval/time. It doesn't work, and I doubt it is useful enough to fix ("D" = day of week).
* If we're going to advertise the array overlap/containment operators,Tom Lane2006-09-10
| | | | | | we probably should make them work reliably for all arrays. Fix code to handle NULLs and multidimensional arrays, move it into arrayfuncs.c. GIN is still restricted to indexing arrays with no null elements, however.
* Rename contains/contained-by operators to @> and <@, per discussion thatTom Lane2006-09-10
| | | | | | | | agreed these symbols are less easily confused. I made new pg_operator entries (with new OIDs) for the old names, so as to provide backward compatibility while making it pretty easy to remove the old names in some future release cycle. This commit only touches the core datatypes, contrib will be fixed separately.
* Revise OpenLDAP configuration and linking to work on more platformsTom Lane2006-09-09
| | | | | than before. Albe Laurenz (but editorialized heavily by me, so if it doesn't work it's my fault).
* Put back plan-time check for trying to apply SELECT FOR UPDATE/SHARETom Lane2006-09-08
| | | | | | to a relation on the nullable side of an outer join. I had removed this during the outer join planning rewrite a few months ago ... I think I intended to put it somewhere else, but forgot ...
* Tweak the behavior of log_duration as proposed by Guillaume Smet: ratherTom Lane2006-09-08
| | | | | | | than being equivalent to setting log_min_duration_statement to zero, this option now forces logging of all query durations, but doesn't force logging of query text. Also, add duration logging coverage for fastpath function calls.
* Clean up logging for extended-query-protocol operations, as per my recentTom Lane2006-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | proposal. Parameter logging works even for binary-format parameters, and logging overhead is avoided when disabled. log_statement = all output for the src/test/examples/testlibpq3.c example now looks like LOG: statement: execute <unnamed>: SELECT * FROM test1 WHERE t = $1 DETAIL: parameters: $1 = 'joe''s place' LOG: statement: execute <unnamed>: SELECT * FROM test1 WHERE i = $1::int4 DETAIL: parameters: $1 = '2' and log_min_duration_statement = 0 results in LOG: duration: 2.431 ms parse <unnamed>: SELECT * FROM test1 WHERE t = $1 LOG: duration: 2.335 ms bind <unnamed> to <unnamed>: SELECT * FROM test1 WHERE t = $1 DETAIL: parameters: $1 = 'joe''s place' LOG: duration: 0.394 ms execute <unnamed>: SELECT * FROM test1 WHERE t = $1 DETAIL: parameters: $1 = 'joe''s place' LOG: duration: 1.251 ms parse <unnamed>: SELECT * FROM test1 WHERE i = $1::int4 LOG: duration: 0.566 ms bind <unnamed> to <unnamed>: SELECT * FROM test1 WHERE i = $1::int4 DETAIL: parameters: $1 = '2' LOG: duration: 0.173 ms execute <unnamed>: SELECT * FROM test1 WHERE i = $1::int4 DETAIL: parameters: $1 = '2' (This example demonstrates the folly of ignoring parse/bind steps for duration logging purposes, BTW.) Along the way, create a less ad-hoc mechanism for determining which commands are logged by log_statement = mod and log_statement = ddl. The former coding was actually missing quite a few things that look like ddl to me, and it did not handle EXECUTE or extended query protocol correctly at all. This commit does not do anything about the question of whether log_duration should be removed or made less redundant with log_min_duration_statement.
* Specify lo_write() to take a _const_ buffer, to match documentation.Bruce Momjian2006-09-07
|
* Change processing of extended-Query mode so that an unnamed statementTom Lane2006-09-06
| | | | | | | | that has parameters is always planned afresh for each Bind command, treating the parameter values as constants in the planner. This removes the performance penalty formerly often paid for using out-of-line parameters --- with this definition, the planner can do constant folding, LIKE optimization, etc. After a suggestion by Andrew@supernews.
* Get rid of the separate RULE privilege for tables: now only a table's ownerTom Lane2006-09-05
| | | | | | | | | | | | | can create or modify rules for the table. Do setRuleCheckAsUser() while loading rules into the relcache, rather than when defining a rule. This ensures that permission checks for tables referenced in a rule are done with respect to the current owner of the rule's table, whereas formerly ALTER TABLE OWNER would fail to update the permission checking for associated rules. Removal of separate RULE privilege is needed to prevent various scenarios in which a grantee of RULE privilege could effectively have any privilege of the table owner. For backwards compatibility, GRANT/REVOKE RULE is still accepted, but it doesn't do anything. Per discussion here: http://archives.postgresql.org/pgsql-hackers/2006-04/msg01138.php
* Make Gen_fmgrtab.sh locale-proof. Per report from Marko Kreen andTom Lane2006-09-05
| | | | fix suggestion from Peter.
* Fix Intel compiler bug. Per discussionTeodor Sigaev2006-09-05
| | | | | 'GIN FailedAssertions on Itanium2 with Intel compiler' in pgsql-hackers, http://archives.postgresql.org/pgsql-hackers/2006-08/msg01914.php
* Fix imprecision from interval rounding of multiplication/division.Bruce Momjian2006-09-05
| | | | Bruce, Michael Glaesemann
* Fix information_schema.key_column_usage to show correct value ofTom Lane2006-09-04
| | | | | position_in_unique_constraint (column newly added per SQL2003). Greg Mullane
* Trivial patch to double vacuum speed on tables with no indexes (preventBruce Momjian2006-09-04
| | | | | | second scan of table). Gregory Stark
* Disallow TRUNCATE when there are any pending after-trigger events forTom Lane2006-09-04
| | | | | | | the target relation(s). There might be some cases where we could discard the pending event instead, but for the moment a conservative approach seems sufficient. Per report from Markus Schiltknecht and subsequent discussion.
* Sequences were not being shown due to the use of lowercase 's' insteadBruce Momjian2006-09-04
| | | | | | | of 'S', and the views were not checking for table visibility with regards to temporary tables and sequences. Greg Sabino Mullane