aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Change the pgstat logic so that the stats collector writes the stats file onlyTom Lane2008-11-03
| | | | | | | | | | | | | | | | | | upon requests from backends, rather than on a fixed 500msec cycle. (There's still throttling logic to ensure it writes no more often than once per 500msec, though.) This should result in a significant reduction in stats file write traffic in typical scenarios where the stats are demanded only infrequently. This approach also means that the former difficulty with changing stats_temp_directory on-the-fly has gone away, so remove the caution about that as well as the thrashing we did to minimize the trouble window. In passing, also fix pgstat_report_stat() so that we will send a stats message if we have function call stats but not table stats to report; this fixes a bug in the recent patch to support function-call stats. Martin Pihlak
* Remove the last vestiges of the MAKE_PTR/MAKE_OFFSET mechanism. We haven'tTom Lane2008-11-02
| | | | | | | | | allowed different processes to have different addresses for the shmem segment in quite a long time, but there were still a few places left that used the old coding convention. Clean them up to reduce confusion and improve the compiler's ability to detect pointer type mismatches. Kris Jurka
* Remove all uses of the deprecated functions heap_formtuple, heap_modifytuple,Tom Lane2008-11-02
| | | | | | | | | | | and heap_deformtuple in favor of the newer functions heap_form_tuple et al (which do the same things but use bool control flags instead of arbitrary char values). Eliminate the former duplicate coding of these functions, reducing the deprecated functions to mere wrappers around the newer ones. We can't get rid of them entirely because add-on modules probably still contain many instances of the old coding style. Kris Jurka
* Move from strcmp to strncmp to be more tolerant for changes to the parser.Michael Meskes2008-11-01
|
* Use string component in index structure.Michael Meskes2008-11-01
|
* Do not eat memory even in case of an out-of-memory error.Michael Meskes2008-11-01
|
* Simplify ExecutorRun's API and save some trivial number of cycles by havingTom Lane2008-10-31
| | | | | | | it just return void instead of sometimes returning a TupleTableSlot. SQL functions don't need that anymore, and noplace else does either. Eliminating the return value also means one less hassle for the ExecutorRun hook functions that will be supported beginning in 8.4.
* Update FSM on WAL replay. This is a bit limited; the FSM is only updatedHeikki Linnakangas2008-10-31
| | | | | | | | | | | | | | | | | on non-full-page-image WAL records, and quite arbitrarily, only if there's less than 20% free space on the page after the insert/update (not on HOT updates, though). The 20% cutoff should avoid most of the overhead, when replaying a bulk insertion, for example, while ensuring that pages that are full are marked as full in the FSM. This is mostly to avoid the nasty worst case scenario, where you replay from a PITR archive, and the FSM information in the base backup is really out of date. If there was a lot of pages that the outdated FSM claims to have free space, but don't actually have any, the first unlucky inserter after the recovery would traverse through all those pages, just to find out that they're full. We didn't have this problem with the old FSM implementation, because we simply threw the FSM information away on a non-clean shutdown.
* Allow SQL-language functions to return the output of an INSERT/UPDATE/DELETETom Lane2008-10-31
| | | | | | | | | RETURNING clause, not just a SELECT as formerly. A side effect of this patch is that when a set-returning SQL function is used in a FROM clause, performance is improved because the output is collected into a tuplestore within the function, rather than using the less efficient value-per-call mechanism.
* Added missing ';'Michael Meskes2008-10-31
|
* Unite ReadBufferWithFork, ReadBufferWithStrategy, and ZeroOrReadBufferHeikki Linnakangas2008-10-31
| | | | | | | | | | | | functions into one ReadBufferExtended function, that takes the strategy and mode as argument. There's three modes, RBM_NORMAL which is the default used by plain ReadBuffer(), RBM_ZERO, which replaces ZeroOrReadBuffer, and a new mode RBM_ZERO_ON_ERROR, which allows callers to read corrupt pages without throwing an error. The FSM needs the new mode to recover from corrupt pages, which could happend if we crash after extending an FSM file, and the new page is "torn". Add fork number to some error messages in bufmgr.c, that still lacked it.
* The conversion rule from postgres.sgml to postgres.xml didn't work withPeter Eisentraut2008-10-31
| | | | | | BSD sed. So write it in Perl, which is more portable and a bit faster, too. We already use Perl for standard documentation builds, so this imposes no additional requirement.
* Add test case for CREATE CAST.Heikki Linnakangas2008-10-31
|
* Add support for user-defined I/O conversion casts.Heikki Linnakangas2008-10-31
|
* Message improvementPeter Eisentraut2008-10-31
| | | | (also backported to 8.3)
* Update back-branch release notes.Tom Lane2008-10-30
|
* Revert previous patch to put the shared memory segment on win32Magnus Hagander2008-10-30
| | | | | | | | in the Global\ namespace, because it caused permission errors on a lot of platforms. We need to come up with something better for 8.4, but for now revert to the pre-8.3.4 behaviour.
* Update time zone data files to tzdata release 2008i (DST law changes inTom Lane2008-10-30
| | | | Argentina, Brazil, Mauritius, Syria).
* Missing space in error messagePeter Eisentraut2008-10-30
|
* Fix recoveryLastXTime logic so that it actually does what one would expect.Tom Lane2008-10-30
| | | | Per gripe from Kevin Grittner. Backpatch to 8.3, where the bug was introduced.
* Move forgotten comment closer to where it matters.Peter Eisentraut2008-10-29
|
* Support for Sun Studio compiler on LinuxPeter Eisentraut2008-10-29
| | | | | | | This basically takes some build system code that was previously labeled "Solaris" and ties it to the compiler rather than the operating system. Author: Julius Stroffek <Julius.Stroffek@Sun.COM>
* Remove tab from sgml file.Bruce Momjian2008-10-29
|
* Update on array features supportPeter Eisentraut2008-10-29
|
* Since SQL:2003, the array size specification in the SQL ARRAY syntax hasPeter Eisentraut2008-10-29
| | | | been optional.
* Use Autoconf provided AS_HELP_STRING macro to automatically format andPeter Eisentraut2008-10-29
| | | | | align strings in the --help output. Do this through our abstraction layer to eliminate redundancy and randomness in configure.in.
* Unicode escapes in strings and identifiersPeter Eisentraut2008-10-29
|
* Be more tense about not creating tuplestores with randomAccess = true unlessTom Lane2008-10-29
| | | | | | | | backwards scan could actually happen. In particular, pass a flag to materialize-mode SRFs that tells them whether they need to require random access. In passing, also suppress unneeded backward-scan overhead for a Portal's holdStore tuplestore. Per my proposal about reducing I/O costs for tuplestores.
* Extend ExecMakeFunctionResult() to support set-returning functions that returnTom Lane2008-10-28
| | | | | | | | | via a tuplestore instead of value-per-call. Refactor a few things to reduce ensuing code duplication with nodeFunctionscan.c. This represents the reasonably noncontroversial part of my proposed patch to switch SQL functions over to returning tuplestores. For the moment, SQL functions still do things the old way. However, this change enables PL SRFs to be called in targetlists (observe changes in plperl regression results).
* Change WorkTableScan to not support backward scan. The apparent supportTom Lane2008-10-28
| | | | | | | | | | didn't actually work, because nodeRecursiveunion.c creates the underlying tuplestore with backward scan disabled; which is a decision that we shouldn't reverse because of performance cost. We could imagine adding signaling from WorkTableScan to RecursiveUnion about whether backward scan is needed ... but in practice it'd be a waste of effort, because there simply isn't any current or plausible future scenario where WorkTableScan would be called on to scan backward. So just dike out the code that claims to support it.
* Arrange to squeeze out the MINIMAL_TUPLE_PADDING in the tuple representationTom Lane2008-10-28
| | | | | | written to temp files by tuplesort.c and tuplestore.c. This saves 2 bytes per row for 32-bit machines, and 6 bytes per row for 64-bit machines, which seems worth the slight additional uglification of the tuple read/write routines.
* Add WITH [NO] DATA clause to CREATE TABLE AS, per SQL.Peter Eisentraut2008-10-28
| | | | | | | Also, since WITH is now a reserved word, simplify the token merging code to only deal with WITH_TIME. by Tom Lane and myself
* Remove support for (insecure) crypt authentication.Magnus Hagander2008-10-28
| | | | This breaks compatibility with pre-7.2 versions.
* Downgrade can't-happen error reports to elog().Alvaro Herrera2008-10-27
|
* No need for extra code to log freezing zero tuples. Callers already check thatAlvaro Herrera2008-10-27
| | | | they are freezing a nonzero amount anyway.
* Make hba parsing error messages more specific.Magnus Hagander2008-10-27
|
* Install a more robust solution for the problem of infinite error-processingTom Lane2008-10-27
| | | | | | | | | | | | | recursion when we are unable to convert a localized error message to the client's encoding. We've been over this ground before, but as reported by Ibrar Ahmed, it still didn't work in the case of conversion failures for the conversion-failure message itself :-(. Fix by installing a "circuit breaker" that disables attempts to localize this message once we get into recursion trouble. Patch all supported branches, because it is in fact broken in all of them; though I had to add some missing translations to the older branches in order to expose the failure in the particular test case I was using.
* Add support for multiple error messages from libpq, by simply appending themMagnus Hagander2008-10-27
| | | | | | | | | after each other (since we already add a newline on each, this makes them multiline). Previously a new error would just overwrite the old one, so for example any error caused when trying to connect with SSL enabled would be overwritten by the error message form the non-SSL connection when using sslmode=prefer.
* SQL:2008 syntax CURRENT_CATALOG, CURRENT_SCHEMA, SET CATALOG, SET SCHEMA.Peter Eisentraut2008-10-27
|
* Update standalong libpq makefiles for msvc and bcc to work with the newMagnus Hagander2008-10-27
| | | | | | libpq events code. Hiroshi Saito
* Allow EXPLAIN on CREATE TABLE AS.Peter Eisentraut2008-10-27
|
* Feature list updatePeter Eisentraut2008-10-27
|
* Better solution to the IN-list issue: instead of having an arbitrary cutoff,Tom Lane2008-10-26
| | | | | | | treat Var and non-Var IN-list items differently. Only non-Var items are candidates to go into an ANY(ARRAY) construct --- we put all Vars as separate OR conditions on the grounds that that leaves more scope for optimization. Per suggestion from Robert Haas.
* Be a little smarter about qual handling for semi-joins: a qual that mentionsTom Lane2008-10-25
| | | | | only the outer side can be pushed down rather than having to be evaluated at the join.
* Add a heuristic to transformAExprIn() to make it prefer expanding "x IN (list)"Tom Lane2008-10-25
| | | | | | | | | | | | | into an OR of equality comparisons, rather than x = ANY(ARRAY[...]), when there are Vars in the right-hand side. This avoids a performance regression compared to pre-8.2 releases, in cases where the OR form can be optimized into scans of multiple indexes. Limit the possible downside by preferring this form only when the list isn't very long (I set the cutoff at 32 elements, which is a bit arbitrary but in the right ballpark). Per discussion with Jim Nasby. In passing, also make it try the OR form if it cannot select a common type for the array elements; we've seen a complaint or two about how the OR form worked for such cases and ARRAY doesn't.
* Reduce the memory footprint of large pending-trigger-event lists, as per myTom Lane2008-10-24
| | | | | | | | | | | | | | | recent proposal. In typical cases, we now need 12 bytes per insert or delete event and 16 bytes per update event; previously we needed 40 bytes per event on 32-bit hardware and 80 bytes per event on 64-bit hardware. Even in the worst case usage pattern with a large number of distinct triggers being fired in one query, usage is at most 32 bytes per event. It seems to be a bit faster than the old code as well, due to reduction of palloc overhead. This commit doesn't address the TODO item of allowing the event list to spill to disk; rather it's trying to stave off the need for that. However, it probably makes that task a bit easier by reducing the data structure's dependency on pointers. It would now be practical to dump an event list to disk by "chunks" instead of individual events.
* Replace now unnecessary goto statements by using return directly.Magnus Hagander2008-10-24
|
* Remove notes from the frontend SSL source that are incorrect orMagnus Hagander2008-10-24
| | | | end-user documentation that lives in the actual documentation.
* Remove a "TODO-list" structure at the top of the file, referring backMagnus Hagander2008-10-24
| | | | | to the old set of SSL patches. Hasn't been updated since, and we keep the TODOs in the "real" TODO list, really...
* Remove large parts of the old SSL readme, that consisted of a coupleMagnus Hagander2008-10-24
| | | | | | | | of copy/paste:d emails. Much of the contents had already been migrated into the main documentation, some was out of date and some just plain wrong. Keep the "protocol-flowchart" which can still be useful.