From 916d0744398f6ae62ceeb23f6d78a13f0f239f00 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 3 Oct 2007 23:02:16 +0000 Subject: [PATCH] Second pass at 8.3 release notes: put items in a bit more logical order where possible, add overview and incompatibilities lists, minor cleanups. The SGML-ification still leaves much to be desired. --- doc/src/sgml/release.sgml | 1340 +++++++++++++++++++++++-------------- 1 file changed, 853 insertions(+), 487 deletions(-) diff --git a/doc/src/sgml/release.sgml b/doc/src/sgml/release.sgml index be1f7ea739..23f39c787a 100644 --- a/doc/src/sgml/release.sgml +++ b/doc/src/sgml/release.sgml @@ -41,20 +41,201 @@ do it for earlier branch release files. Release date 2007-??-?? + CURRENT AS OF 2007-10-03 Overview - This release adds many functionality and performance improvements that + This release adds many improvements that were requested by users, including: - ... to be filled in ... + Full text search is now a built-in feature + + + + + + XML data type + + + + + + enum data types + + + + + + UUID data type + + + + + + Arrays of composite types + + + + + + ORDER BY ... NULLS FIRST/LAST + + + + + + UPDATE/DELETE WHERE CURRENT OF cursor_name + + + + + + Per-function parameter settings + + + + + + User-defined types can now have type modifiers (parameters) + + + + Declarations such as varchar(42) are no longer restricted to use + by built-in data types. + + + + + + Automatic plan invalidation when table definitions change + + + + This will particularly ease usage of temporary tables in + PL/PgSQL functions. + + + + + + Numerous improvements in logging and statistics collection + capabilities, including the ability to emit postmaster log messages + in CSV format that can be directly loaded into a database table + for analysis + + + + + + SSPI/GSSAPI authentication support + + + + + + Multiple autovacuum worker processes, and other autovacuum improvements + + + + Autovacuum is now considered mature enough to be enabled by default. + + + + + + The entire PostgreSQL system can now be built with Microsoft Visual C++ + + + + This will improve the ability of Windows-based developers to + contribute to the project. Windows executables made with Visual C++ + may also have better stability and performance than those made with + other tool sets. + + + + + + Major performance improvements in this release include: + + + + + + Asynchronous commit option to allow transactions to be reported + committed before they have actually been flushed to disk + + + + This would not, of course, be acceptable if the client takes some + critical external action on the assumption that the transaction + will be remembered; but for many applications, it is an acceptable + risk for some or all transactions to use this mode. Unlike existing + options such as fsync, asynchronous commit does not risk database + corruption; the worst case is that after a crash, the last few + reportedly-committed transactions will not have taken effect. + + + + + + "Distributed" checkpoints to spread out the I/O load of a checkpoint + + + + + + Heap-Only Tuples (HOT) to reduce overhead of updates + + + + + + Just-in-time background writer strategy to improve disk write + efficiency + + + + + + Reduction of on-disk data size through reducing both per-tuple + and per-field overheads + + + + + + Efficiency improvements for large sequential scans, including + prevention of cache flushing and "piggybacking" to let concurrent + scans read the table only once + + + + + + Top-N sorting + + + + + + Lazy XID assignment to reduce the cost of read-only transactions + + + + For applications in which there are a large number of read-only + transactions, this helps not only by reducing overhead for the + transactions themselves, but by reducing overhead that's driven + by the rate of XID consumption; notably, reducing contention for + transaction log buffers and reducing the frequency of + anti-wraparound vacuuming. @@ -81,7 +262,173 @@ do it for earlier branch release files. - ... to be filled in ... + contrib/tsearch2 features have been absorbed into + the core, with some syntax changes + + + + XXX we need to provide a migration guide, at the very least + + + + + + Casts to text that formerly occurred implicitly may now need to be + written explicitly + + + + Data types other than char and varchar are no + longer implicitly castable to text, except in the limited + case of a || (concatenation) operator whose other + input is textual. While this will require explicit casts in a + few queries that didn't need them before, the elimination of + surprising interpretations justifies it. + + + + + + Numerous changes in administrator-only configuration parameters + + + + bgwriter_lru_percent, + bgwriter_all_percent, + bgwriter_all_maxpages, + stats_start_collector, and + stats_reset_on_server_start are removed. + redirect_stderr is renamed to + logging_collector. + stats_command_string is renamed to + track_activities. + stats_block_level and stats_row_level + are merged into track_counts. + archive_command changed meaning slightly: you must now set + archive_mode to on as well to enable archiving. + The default autovacuum-related settings changed. + + + + + + Commenting out a parameter in postgresql.conf now + causes it to revert to its default value + + + + + + ARRAY(SELECT ...) now returns an empty array, rather than a NULL, + when the sub-select returns zero rows + + + + + + ORDER BY ... USING operator + will now be rejected if the operator is not a + less-than or greater-than member of some btree opclass + + + + This prevents less-than-sane behavior that formerly ensued + if an operator that doesn't + actually define a proper sort ordering was specified. + + + + + + The array type associated with a type named "foo" is not necessarily + named "_foo" anymore + + + + The old naming convention is still honored when possible, but + client code should migrate away from depending on it. + + + + + + By default, non-superuser database owners can now instantiate trusted + procedural languages in their databases + + + + While this is reasonably safe, some administrators may wish to + revoke the privilege. + + + + + + SET LOCAL's effects now persist until the end of the + current top transaction, unless rolled back + + + + In 8.0 through 8.2, SET LOCAL's + effects disappeared at subtransaction commit, leading to behavior + that made little sense at the SQL level (one would not normally + expect RELEASE to do such a thing). + + + + + + Commands that are disallowed in transaction blocks are now disallowed + in multiple-statement query strings, too + + + + For example, "BEGIN; DROP DATABASE; COMMIT" will now be rejected + even if submitted as a single Query message. This was always quite + unsafe, but the PreventTransactionChain test failed to detect it. + + + + + + Additional checks for invalidly-encoded multibyte strings + + + + Some cases that might formerly have allowed invalid data to enter + the database will now be rejected. In particular, the chr() + function changed behavior. + + + + + + convert() family of functions changed behavior + + + + Strings that are not in the database's native encoding are now + represented as type bytea rather than type text. + + + + + + Minor security restrictions added to database-size inquiry functions + and some contrib functions + + + + + + C code that manipulates variable-length datums will need changes + + + + The new SET_VARSIZE() macro *must* be used to set the length word + of a generated datum. Also, it + may be necessary to "detoast" input varlena datums in cases where + no toasting could have happened before. @@ -123,9 +470,10 @@ do it for earlier branch release files. The I/O needed for a checkpoint is now spread over a fairly long - period of time, rather than being spat out in a burst. This happens + period of time, rather than being spat out in a burst. (This happens only for background checkpoints carried out by the bgwriter; other - cases, such as a shutdown checkpoint, are still done at full speed. + cases, such as a shutdown checkpoint, are still done at full speed.) + This reduces the impact of checkpoints on query processing. @@ -146,6 +494,48 @@ do it for earlier branch release files. + + + Just-in-time background writing strategy (Greg Smith, Itagaki + Takahiro) + + + + This patch avoids re-scanning buffers that cannot possibly need to + be cleaned, and estimates how many buffers it should try to clean + based on moving averages of recent allocation requests and density + of reusable buffers. + + + + + + Support varlena fields with single-byte headers and unaligned + storage (Greg Stark) + + + + This significantly reduces the on-disk size of short + character-string fields. + + + + + + Combine cmin and cmax fields of HeapTupleHeaders into a single field + (Heikki) + + + + We do this by keeping private state in each backend that has + inserted and deleted the same tuple during its current top-level + transaction. This is sufficient since there is no need to be able + to determine the cmin/cmax from any other transaction. This gets us + back down to 23-byte tuple headers, removing a space penalty paid in + 8.0 to support subtransactions. + + + Lazy XID allocation (Florian Pflug) @@ -176,82 +566,126 @@ do it for earlier branch release files. - Just-in-time background writing strategy (Greg Smith, Itagaki - Takahiro) + Improve interlocking between checkpoint start and transaction commit + (Heikki) - This patch avoids re-scanning buffers that cannot possibly need to - be cleaned, and estimates how many buffers it should try to clean - based on moving averages of recent allocation requests and density - of reusable buffers. + The new method both speeds up commit (less for it to do) and + prevents the problem of checkpoint being delayed indefinitely when + there's a constant flow of commits. - Support varlena fields with single-byte headers and unaligned - storage (Greg Stark) + Create a dedicated "wal writer" process to offload WAL-writing work + from backends (Simon) - This significantly reduces the on-disk size of short - character-string fields. + This process is also responsible for guaranteeing a maximum delay + before asynchronously-committed transactions will be flushed to + disk. - Combine cmin and cmax fields of HeapTupleHeaders into a single field - (Heikki) + Skip writing WAL in CLUSTER and COPY in cases where it's not needed + (Simon) - We do this by keeping private state in each backend that has - inserted and deleted the same tuple during its current top-level - transaction. This is sufficient since there is no need to be able - to determine the cmin/cmax from any other transaction. This gets us - back down to 23-byte tuple headers, removing a space penalty paid in - 8.0 to support subtransactions. + If WAL archiving is not enabled, it's possible to ensure + transactional safety by fsync'ing the destination table before + commit, rather than emitting WAL records for all inserted tuples. - Implement "top N" sorting in ORDER BY ... LIMIT queries (Greg Stark) + Avoid rewriting pg_control at every WAL segment switch (Simon) + + - We keep a heap of the current best N tuples and sift-up new tuples - into it as we scan the input. For M input tuples this means only - about M*log(N) comparisons instead of M*log(M), not to mention a lot - less workspace when N is small — avoiding spill-to-disk for large - M is actually the most attractive thing about it. + Reduce WAL output size for page splits in btree indexes (Heikki) - Skip writing WAL in CLUSTER and COPY in cases where it's not needed - (Simon) + Avoid unnecessary disk reads during WAL recovery (Heikki) - If WAL archiving is not enabled, it's possible to ensure - transactional safety by fsync'ing the destination table before - commit, rather than emitting WAL records for all inserted tuples. + Aside from speeding up recovery, this change eliminates a potential + data loss risk when restoring a WAL log that was written with + full_page_writes off. - Avoid rewriting pg_control at every WAL segment switch (Simon) + Make large sequential scans and VACUUMs work in a limited-size + "ring" of buffers (Simon, Heikki, Tom) + + + + Aside from avoiding cache spoliation, this fixes the problem that + VACUUM formerly tended to cause a WAL flush for every page it + modified, because we had it hacked to use only a single buffer. + Those flushes will now occur only once per ring-ful. - Reduce WAL output size for page splits in btree indexes (Heikki) + Synchronize sequential scans (Jeff Davis) + + + + Large sequential scans now synchronize with each other, so that when + multiple backends are scanning the same relation concurrently, each + page is (ideally) read only once. Note that a backend joining such + a scan starts in the middle of the relation and "wraps around" to + cover all blocks; this may affect the order in which rows are + returned. + + + + + + Suppress useless searches for unused line pointers in PageAddItem + (Heikki, improving on an idea from Hiroki Kataoka) + + + + + + Put a rate limit on messages sent by backends to the stats collector + (Tom) + + + + This reduces the overhead for short transactions by combining + reports for successive short transactions. + + + + + + Implement "top N" sorting in ORDER BY ... LIMIT queries (Greg Stark) + + + + We keep a heap of the current best N tuples and sift-up new tuples + into it as we scan the input. For M input tuples this means only + about M*log(N) comparisons instead of M*log(M), not to mention a lot + less workspace when N is small — avoiding spill-to-disk for large + M is actually the most attractive thing about it. @@ -263,148 +697,135 @@ do it for earlier branch release files. - Avoid computing X^2 at each row in avg(bigint) and avg(numeric) - (Mark Kirkwood) + Improve performance of mergejoin with a large sort operation as + inner input (Greg Stark) - - - Suppress useless searches for unused line pointers in PageAddItem - (Heikki, improving on an idea from Hiroki Kataoka) + This change uses a Materialize node between the mergejoin and the + sort to prevent the sort from having to "back up", which allows a + more efficient sort. The Materialize node keeps a circular + buffer of only the prior tuples that the mergejoin may actually + need again, so it usually won't need to spill to disk, resulting + in net I/O savings. - Improve interlocking between checkpoint start and transaction commit - (Heikki) - - - - The new method both speeds up commit (less for it to do) and - prevents the problem of checkpoint being delayed indefinitely when - there's a constant flow of commits. + Avoid computing X^2 at each row in avg(bigint) and avg(numeric) + (Mark Kirkwood) + + + + + + Server Changes + + - Put a rate limit on messages sent by backends to the stats collector - (Tom) + Autovacuum is now enabled by default (Alvaro) - This reduces the overhead for short transactions by combining - reports for successive short transactions. + Considerable work was done to make autovacuum less intrusive, + allowing this to become a reasonable default. - Avoid unnecessary disk reads during WAL recovery (Heikki) - - - - Aside from speeding up recovery, this change eliminates a potential - data loss risk when restoring a WAL log that was written with - full_page_writes off. + Support multiple concurrent autovacuum processes (Alvaro, Itagaki + Takahiro) - Improve performance of mergejoin with a large sort operation as - inner input (Greg Stark) + Set the default autovacuum vacuum_cost_delay value to 20ms, and + reduce the default autovacuum vacuum and analyze threshold values to + 50 tuples (Alvaro) + + - This change uses a Materialize node between the mergejoin and the - sort to prevent the sort from having to "back up", which allows a - more efficient sort. + Make autovacuum report the start time of its current activity in + pg_stat_activity (Tom) - Make large sequential scans and VACUUMs work in a limited-size - "ring" of buffers (Simon, Heikki, Tom) + Make configuration parameters fall back to their default values when + they are removed from the configuration file (Joachim Wieland) - Aside from avoiding cache spoliation, this fixes the problem that - VACUUM formerly tended to cause a WAL flush for every page it - modified, because we had it hacked to use only a single buffer. - Those flushes will now occur only once per ring-ful. + This fixes an ancient gotcha that returning a configuration file + line to its original commented-out state did not undo the change. - Synchronize sequential scans (Jeff Davis) + Invalidate and rebuild cached plans whenever there is a schema + change or statistics update to referenced relations (Tom) - Large sequential scans now synchronize with each other, so that when - multiple backends are scanning the same relation concurrently, each - page is (ideally) read only once. Note that a backend joining such - a scan starts in the middle of the relation and "wraps around" to - cover all blocks; this may affect the order in which rows are - returned. + Aside from improving performance (for example, by being able to make + use of newly-added indexes), this finally fixes the problem + that you couldn't drop and recreate a temp table that's used by a + PL/PgSQL function, unless you used EXECUTE for all references to it. + A statement that depends on a temp table will now be replanned + automatically if the temp table has been recreated. - Create a dedicated "wal writer" process to offload WAL-writing work - from backends (Simon) + Add support for GSSAPI authentication (Henry Hotz, Magnus) + + - This process is also responsible for guaranteeing a maximum delay - before asynchronously-committed transactions will be flushed to - disk. + Support SSPI authentication on Windows (Magnus) - - - - - - Server Changes - - - Autovacuum is now enabled by default (Alvaro) + Support a global SSL configuration file (Victor Wagner) + + - Considerable work was done to make autovacuum less intrusive, - allowing this to become a reasonable default. + Add ssl_ciphers parameter to control allowed ciphers (Victor Wagner) - Support multiple concurrent autovacuum processes (Alvaro, Itagaki - Takahiro) + Add new encodings EUC_JIS_2004 and SHIFT_JIS_2004, along with new + conversions among EUC_JIS_2004, SHIFT_JIS_2004 and UTF-8 (Tatsuo) - Set the default autovacuum vacuum_cost_delay value to 20ms, and - reduce the default autovacuum vacuum and analyze threshold values to - 50 tuples (Alvaro) + Make JOHAB encoding client-only (Tatsuo) - - - Make autovacuum report the start time of its current activity in - pg_stat_activity (Tom) + It was found that JOHAB does not meet the assumptions needed to be + used safely as a server-side encoding. @@ -413,10 +834,6 @@ do it for earlier branch release files. Provide for logfiles in machine readable CSV format (Arul Shaji, Greg Smith, Andrew Dunstan) - - - In consequence, rename redirect_stderr to logging_collector. - @@ -446,20 +863,6 @@ do it for earlier branch release files. - - - Use our own timezone support for formatting timestamps displayed in - the server log (Tom) - - - - This avoids Windows-specific problems with localized time zone names - that are in the wrong encoding. There is a new log_timezone - parameter that controls the timezone used in log messages, - separately from the client-visible timezone parameter. - - - %s and %c escapes in log_line_prefix can now be used in all @@ -469,25 +872,29 @@ do it for earlier branch release files. - Support a global SSL configuration file (Victor Wagner) + Use our own timezone support for formatting timestamps displayed in + the server log (Tom) - Add ssl_ciphers parameter to control allowed ciphers (Victor Wagner) + This avoids Windows-specific problems with localized time zone names + that are in the wrong encoding. There is a new log_timezone + parameter that controls the timezone used in log messages, + separately from the client-visible timezone parameter. - Invalidate and rebuild cached plans whenever there is a schema - change or statistics update to referenced relations (Tom) + Change the timestamps recorded in transaction commit/abort xlog + records from time_t to TimestampTz representation (Tom) - Aside from improving performance (for example, by being able to make - use of newly-added indexes), this finally fixes the ancient gotcha - that you can't drop and recreate a temp table that's used by a - PL/PgSQL function, unless you use EXECUTE for all references to it. + This provides full gettimeofday() resolution for the timestamps, + which might be useful when attempting to do point-in-time recovery + — previously it was not possible to specify the stop point with + sub-second resolution. @@ -524,6 +931,21 @@ do it for earlier branch release files. + + + Create a temp_tablespaces parameter to allow selection of the + tablespace(s) in which to store temp tables and temporary files + (Jaime Casanova, Albert Cervera, Bernd Helmle) + + + + This is a list to allow spreading the load across multiple + tablespaces; a random list element is chosen each time a temp object + is to be created. Temp files are not stored in per-database + pgsql_tmp/ directories anymore, but in per-tablespace directories. + + + New system view pg_stat_bgwriter displays statistics about the @@ -557,45 +979,36 @@ do it for earlier branch release files. - Add new encoding EUC_JIS_2004 and SHIFT_JIS_2004, along with new - conversions among EUC_JIS_2004, SHIFT_JIS_2004 and UTF-8 (Tatsuo) - - - - - - Make JOHAB encoding client-only (Tatsuo) + Remove stats_start_collector parameter (Tom) - It was found that JOHAB does not meet the assumptions needed to be - used safely as a server-side encoding. + We now always start the collector process, unless prevented by a + problem with setting up the stats UDP socket. - Make configuration parameters fall back to their default values when - they are removed from the configuration file (Joachim Wieland) + Remove stats_reset_on_server_start parameter (Tom) - This fixes an ancient gotcha that returning a configuration file - line to its original commented-out state did not undo the change. + This seemed useless in view of the availability of pg_stat_reset(). - Change the timestamps recorded in transaction commit/abort xlog - records from time_t to TimestampTz representation (Tom) + Merge stats_block_level and stats_row_level parameters into a single + parameter track_counts, which controls all reports sent to the + collector process (Tom) + + - This provides full gettimeofday() resolution for the timestamps, - which might be useful when attempting to do point-in-time recovery - — previously it was not possible to specify the stop point with - sub-second resolution. + Rename stats_command_string parameter to track_activities (Tom) @@ -614,21 +1027,6 @@ do it for earlier branch release files. - - - Create a temp_tablespaces parameter to allow selection of the - tablespace(s) in which to store temp tables and temporary files - (Jaime Casanova, Albert Cervera, Bernd Helmle) - - - - This is a list to allow spreading the load across multiple - tablespaces; a random list element is chosen each time a temp object - is to be created. Temp files are not stored in per-database - pgsql_tmp/ directories anymore, but in per-tablespace directories. - - - Arrange to put TOAST tables belonging to temporary tables into @@ -642,21 +1040,6 @@ do it for earlier branch release files. than shared buffers for access. Aside from obvious performance benefits, this provides a solution to bug #3483, in which other backends unexpectedly held open file references to temporary tables. - The scheme preserves the property that TOAST tables are not in any - schema that's normally in the search path, so they don't conflict - with user table names. - - - - - - Add support for GSSAPI authentication (Henry Hotz, Magnus) - - - - - - Support SSPI authentication on Windows (Magnus) @@ -675,41 +1058,6 @@ do it for earlier branch release files. - - - Remove stats_start_collector parameter (Tom) - - - - We now always start the collector process, unless prevented by a - problem with setting up the stats UDP socket. - - - - - - Remove stats_reset_on_server_start parameter (Tom) - - - - This seemed useless in view of the availability of pg_stat_reset(). - - - - - - Merge stats_block_level and stats_row_level parameters into a single - parameter track_counts, which controls all reports sent to the - collector process (Tom) - - - - - - Rename stats_command_string parameter to track_activities (Tom) - - - @@ -722,52 +1070,45 @@ do it for earlier branch release files. Text search capability is now in core Postgres (Teodor, Oleg) + + + The features previously provided by contrib/tsearch2 have been + improved and moved into the standard server. + - Support ORDER BY ... NULLS FIRST/LAST, and add ASC/DESC/NULLS - FIRST/NULLS LAST per-column options for btree indexes (Tom, Teodor) + Support ORDER BY ... NULLS FIRST/LAST (Teodor, Tom) - Note incompatible change from prior behavior: ORDER BY ... USING - will now be rejected if the operator is not a less-than or - greater-than member of some btree opclass. This prevents - less-than-sane behavior if an operator that doesn't actually define - a proper sort ordering is selected. + Users can now control whether nulls sort before or after + other values. - Support UPDATE/DELETE WHERE CURRENT OF cursor_name (Arul Shaji, Tom) + Add ASC/DESC and NULLS FIRST/NULLS LAST per-column options for btree + indexes (Teodor, Tom) - - - Allow FOR UPDATE in cursors (Arul Shaji, Tom) + This is primarily useful for customizing multicolumn indexes to match + the ordering needed by a specific query. - Add support for cross-type hashing (Tom) - - - - This allows hash joins, hash indexes, hashed subplans, and hash - aggregation to be used in situations involving cross-data-type - comparisons, if the data types have compatible hash functions. That - is currently the case for smallint/integer/bigint, and also for - float4/float8. + Support UPDATE/DELETE WHERE CURRENT OF cursor_name (Arul Shaji, Tom) - Make 'col IS NULL' clauses be btree-indexable conditions (Teodor) + Allow FOR UPDATE in cursors (Arul Shaji, Tom) @@ -780,7 +1121,11 @@ do it for earlier branch release files. This change eliminates a lot of surprising interpretations that the parser could formerly make in cases when there was no directly - applicable operator. + applicable operator. The || (concatenation) operator + has been generalized so that it will still accept non-textual + inputs, thus preserving the main useful case for implicit text + coercion. In other cases, if you want something to be treated + as text you'll need to say so. @@ -808,29 +1153,24 @@ do it for earlier branch release files. - Fix some issues with user tables and views that are named similarly - to system catalogs (Tom) + Make 'col IS NULL' clauses be btree-indexable conditions (Teodor) - Remove the undocumented "not in" operator (!!=) (Tom) + Add support for cross-type hashing (Tom) - This operator was obsoleted long ago by IN (sub-SELECT) queries. + This allows hash joins, hash indexes, hashed subplans, and hash + aggregation to be used in situations involving cross-data-type + comparisons, if the data types have compatible hash functions. That + is currently the case for smallint/integer/bigint, and also for + float4/float8. - - - - - - Planner Changes - - Improve handling of "equivalence classes" of variables that are @@ -846,14 +1186,14 @@ do it for earlier branch release files. - Fix problems with selectivity estimation for partial indexes (Tom) + Improve performance for planning large inheritance trees that are + mostly excluded by constraints (Tom) - Improve performance for planning large inheritance trees that are - mostly excluded by constraints (Tom) + Fix problems with selectivity estimation for partial indexes (Tom) @@ -864,6 +1204,23 @@ do it for earlier branch release files. + + + Fix some issues with user tables and views that are named similarly + to system catalogs (Tom) + + + + + + Remove the undocumented !!= (not in) operator (Tom) + + + + This operator was obsoleted long ago by IN (SELECT ...) queries. + + + @@ -935,28 +1292,28 @@ do it for earlier branch release files. - Invent "operator families" to allow improved handling of - cross-data-type operators (Tom) + Support type modifiers for user-defined types (Teodor, Tom) - This change allows significantly better planning of queries - involving cross-data-type comparisons. + User-defined types can now use parameters, similar to the maximum + length and precision parameters used by some built-in types. Any + simple constant (numeric or string) or identifier can be used as a + parameter value. A type-specific function must be provided to + validate this information and pack it into a 32-bit "typmod" value + for storage. - Support type modifiers for user-defined types (Teodor, Tom) + Invent "operator families" to allow improved handling of + cross-data-type operators (Tom) - User-defined types can now use parameters, similar to the maximum - length and precision parameters used by some built-in types. Any - simple constant (numeric or string) or identifier can be used as a - parameter value. A type-specific function must be provided to - validate this information and pack it into a 32-bit "typmod" value - for storage. + This change allows significantly better planning of queries + involving cross-data-type comparisons. @@ -992,14 +1349,18 @@ do it for earlier branch release files. - Support SET FROM CURRENT in CREATE/ALTER FUNCTION, ALTER DATABASE, - ALTER ROLE (Tom) + Allow non-superuser database owners to create procedural languages + (Jeremy Drake) - This provides a convenient way of applying a session's current - parameter setting as the default for future sessions or function - calls. + A database owner is now allowed to create a language in his database + if it's marked "tmpldbacreate" in pg_pltemplate. The factory + default is that this is set for all standard trusted languages, but + of course a superuser may adjust the settings. In service of this, + add the long-foreseen owner column to pg_language; renaming, + dropping, and altering owner of a PL now follow normal ownership + rules instead of being superuser-only. @@ -1012,7 +1373,7 @@ do it for earlier branch release files. - This is an INCOMPATIBLE CHANGE: in 8.0 through 8.2, SET LOCAL's + This is an incompatible change: in 8.0 through 8.2, SET LOCAL's effects disappeared at subtransaction commit (leading to behavior that made little sense at the SQL level). @@ -1020,150 +1381,146 @@ do it for earlier branch release files. - Add ALTER VIEW ... RENAME TO and ALTER SEQUENCE ... RENAME TO (David - Fetter, Neil) + Support SET FROM CURRENT in CREATE/ALTER FUNCTION, ALTER DATABASE, + ALTER ROLE (Tom) - While it has long been possible to perform these operations using ALTER - TABLE, users were often surprised that they couldn't say ALTER VIEW - or ALTER SEQUENCE as appropriate. + This provides a convenient way of applying a session's current + parameter setting as the default for future sessions or function + calls. - Implement CREATE TABLE LIKE ... INCLUDING INDEXES (Trevor - Hardcastle, Nikhil S, Neil) + Implement new commands DISCARD ALL, DISCARD PLANS, DISCARD TEMP, + CLOSE ALL, and DEALLOCATE ALL (Marko Kreen, Neil) + + + + These commands simplify resetting a database session to its initial + state, and are particularly handy for connection-pooling software. - Fix EXPLAIN so it can always print the correct referent of an upper - plan level expression (Tom) + Add ALTER VIEW ... RENAME TO and ALTER SEQUENCE ... RENAME TO (David + Fetter, Neil) - This fix banishes the old hack of showing "?columnN?" when things - got too complicated. + While it has long been possible to perform these operations using ALTER + TABLE, users were often surprised that they couldn't say ALTER VIEW + or ALTER SEQUENCE as appropriate. - Make EXPLAIN ANALYZE show which sort method was used by a Sort node - (Tom) + Implement CREATE TABLE LIKE ... INCLUDING INDEXES (Trevor + Hardcastle, Nikhil S, Neil) - Make PreventTransactionChain reject commands submitted as part of a - multi-statement simple-Query message (Tom) + Make CLUSTER MVCC-safe (Heikki Linnakangas) - For example, "BEGIN; DROP DATABASE; COMMIT" will now be rejected - even if submitted as a single Query message. This is a potential - incompatibility since some clients expected such strings to work; - but it was always unsafe. + Formerly, a CLUSTER command would discard all tuples that were + committed dead, even if there were still transactions that should be + able to see them under the MVCC snapshot rules. - Allow non-superuser database owners to create procedural languages - (Jeremy Drake) - - - - A database owner is now allowed to create a language in his database - if it's marked "tmpldbacreate" in pg_pltemplate. The factory - default is that this is set for all standard trusted languages, but - of course a superuser may adjust the settings. In service of this, - add the long-foreseen owner column to pg_language; renaming, - dropping, and altering owner of a PL now follow normal ownership - rules instead of being superuser-only. + Support syntax "CLUSTER table USING index", which is more logical + than the old CLUSTER syntax (Holger Schurig) - Make NOTIFY/LISTEN/UNLISTEN only accept identifiers without a schema - qualifier - (Bruce) + Make CLUSTER freeze tuples where possible (Heikki, Alvaro) - Formerly, these commands accepted "schema.relation" but then ignored - the schema part, leading to confusion. + This is nearly free and may avoid the need for a subsequent VACUUM + of the table. - Support syntax "CLUSTER table USING index", which is more logical - than the old CLUSTER syntax (Holger Schurig) + Make CLUSTER and TRUNCATE advance the table's relfrozenxid to + RecentXmin (Alvaro) + + + + This may avoid the need for a subsequent VACUUM of the table. The + table-rewriting variants of ALTER TABLE do it too. - Make CLUSTER MVCC-safe (Heikki Linnakangas) + Fix EXPLAIN so it can always print the correct referent of an upper + plan level expression (Tom) - Formerly, a CLUSTER command would discard all tuples that were - committed dead, even if there were still transactions that should be - able to see them under the MVCC snapshot rules. + This fix banishes the old hack of showing "?columnN?" when things + got too complicated. - Implement new commands DISCARD ALL, DISCARD PLANS, DISCARD TEMP, - CLOSE ALL, and DEALLOCATE ALL (Marko Kreen, Neil) - - - - These commands simplify resetting a database session to its initial - state, and are particularly handy for connection-pooling software. + Make EXPLAIN ANALYZE show which sort method was used by a Sort node + (Tom) - Make CLUSTER freeze tuples where possible (Heikki, Alvaro) + Make PreventTransactionChain reject commands submitted as part of a + multi-statement simple-Query message (Tom) - This is nearly free and may avoid the need for a subsequent VACUUM - of the table. + For example, "BEGIN; DROP DATABASE; COMMIT" will now be rejected + even if submitted as a single Query message. This is a potential + incompatibility since some clients expected such strings to work; + but it was always unsafe. - Make CLUSTER and TRUNCATE advance the table's relfrozenxid to - RecentXmin (Alvaro) + Make CREATE/DROP/RENAME DATABASE wait a little bit to see if other + backends will exit before failing because of conflicting DB usage + (Tom) - This may avoid the need for a subsequent VACUUM of the table. The - table-rewriting variants of ALTER TABLE do it too. + This helps mask the fact that backend exit takes nonzero time. - Make CREATE/DROP/RENAME DATABASE wait a little bit to see if other - backends will exit before failing because of conflicting DB usage - (Tom) + Make NOTIFY/LISTEN/UNLISTEN only accept identifiers without a schema + qualifier + (Bruce) - This helps mask the fact that backend exit takes nonzero time. + Formerly, these commands accepted "schema.relation" but then ignored + the schema part, leading to confusion. @@ -1179,11 +1536,17 @@ do it for earlier branch release files. SQL/XML support (Nikolay Samokhvalov, Peter) + + + There is now an xml data type and standard operations + on it; see . + - Support enum data types (Tom Dunstan) + Support enum data types (see ) + (Tom Dunstan) @@ -1202,36 +1565,48 @@ do it for earlier branch release files. - Add "isodow" option to EXTRACT() and date_part() (Bruce) + Add new regexp functions regexp_matches(), regexp_split_to_array(), + and regexp_split_to_table() (Jeremy Drake, Neil) - This is day of the week, with Sunday = 7. + These functions provide access to the capture groups resulting from + a POSIX regular expression match, and provide the ability to split a + string on a POSIX regular expression. - Check for overflow when converting far-future date values to - timestamp (Tom) + Add lo_truncate() function for large object truncation (Kris Jurka) - Make to_timestamp() and to_date() assume "TM" for potentially - variable-width fields (Bruce) + Implement width_bucket() for the float8 data type (Neil) + + - This matches Oracle behavior. + Add a function pg_stat_clear_snapshot() that discards any statistics + snapshot already collected in the current transaction (Tom) + + + + This allows plpgsql functions to watch for stats updates even though + they are confined to a single transaction. - Fix off-by-one conversion in to_date()/to_timestamp() 'D' fields - (Bruce) + Add "isodow" option to EXTRACT() and date_part() (Bruce) + + + + This is day of the week, with Sunday = 7. @@ -1244,56 +1619,44 @@ do it for earlier branch release files. - Add lo_truncate() function for large object truncation (Kris Jurka) + Check for overflow when converting far-future date values to + timestamp (Tom) - Fix float4/float8 to handle Infinity and Nan consistently (Bruce) - - - - The code formerly was not consistent about distinguishing Infinity - symbols from overflow conditions. + Make to_timestamp() and to_date() assume "TM" for potentially + variable-width fields (Bruce) - - - Implement width_bucket() for the float8 data type (Neil) + This matches Oracle behavior. - Make setseed() return void, rather than a useless integer value - (Neil) + Fix off-by-one conversion in to_date()/to_timestamp() 'D' fields + (Bruce) - Add a function pg_stat_clear_snapshot() that discards any statistics - snapshot already collected in the current transaction (Tom) + Fix float4/float8 to handle Infinity and Nan consistently (Bruce) - This allows plpgsql functions to watch for stats updates even though - they are confined to a single transaction. + The code formerly was not consistent about distinguishing Infinity + symbols from overflow conditions. - Add new regexp functions regexp_matches(), regexp_split_to_array(), - and regexp_split_to_table() (Jeremy Drake, Neil) - - - - These functions provide access to the capture groups resulting from - a POSIX regular expression match, and provide the ability to split a - string on a POSIX regular expression. + Make setseed() return void, rather than a useless integer value + (Neil) @@ -1322,12 +1685,6 @@ do it for earlier branch release files. - - - Add explicit casts between boolean and text/varchar (Neil) - - - Add additional checks for invalidly-encoded data (Andrew) @@ -1638,6 +1995,13 @@ do it for earlier branch release files. <link linkend="APP-PGDUMP"><application>pg_dump</></link> Changes + + + Add --tablespaces-only and --roles-only options to pg_dumpall (Dave + Page) + + + Add output-file option for pg_dumpall (Dave Page) @@ -1656,13 +2020,6 @@ do it for earlier branch release files. - - - Add --tablespaces-only and --roles-only options to pg_dumpall (Dave - Page) - - - In -n and -t switches, always match $ literally, whether quoted or @@ -1744,26 +2101,26 @@ do it for earlier branch release files. - Support a global SSL configuration file (Victor Wagner) + Interpret the dbName parameter of PQsetdbLogin as a conninfo string + if it contains an = sign (Andrew) - - - Add libpq environment variable PGSSLKEY to control SSL hardware keys - (Victor Wagner) + This allows use of all the options of conninfo strings through + client programs that still use PQsetdbLogin. - Interpret the dbName parameter of PQsetdbLogin as a conninfo string - if it contains an = sign (Andrew) + Support a global SSL configuration file (Victor Wagner) + + - This allows use of all the options of conninfo strings through - client programs that still use PQsetdbLogin. + Add libpq environment variable PGSSLKEY to control SSL hardware keys + (Victor Wagner) @@ -1785,14 +2142,6 @@ do it for earlier branch release files. - - - Get rid of client-code dependencies on the exact text of the - no-password error message, by using PQconnectionUsedPassword() - instead (Tom) - - - @@ -1824,6 +2173,13 @@ do it for earlier branch release files. + + + Prevent ecpg libraries from exporting any symbols other than + their intended API (Michael) + + + @@ -1878,55 +2234,93 @@ do it for earlier branch release files. - Improve smgr/md API (Tom) + Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, + len) (Greg Stark, Tom) - This improves error detection and reporting, both for external - problems and for coding errors inside the backend. Notably, - disallow mdread() beyond EOF, and enforce that mdwrite() is to be - used for rewriting existing blocks while mdextend() is to be used - for extending the relation EOF. + Third-party C code that manipulates varlena datums *must* convert to + this convention, since the varvarlena patch changes the + representation of length words on some architectures. Also, it + may be necessary to "detoast" input varlena datums in cases where + no toasting could have happened before. - Support "gmake draft" in doc/src/sgml/Makefile (Bruce) + Rename DLLIMPORT macro to PGDLLIMPORT to avoid conflict with third + party includes (like tcl) that define DLLIMPORT (Magnus) - Allow GIN's extractQuery method to signal that nothing can satisfy - the query (Teodor) + Remove the prohibition on executing cursor commands through + SPI_execute (Tom) - This changes prototype of extractQuery method to use int32* instead - of uint32* for nentries argument. A -1 result means that no search - is needed. + The macro definition of SPI_ERROR_CURSOR still exists, so as not to + needlessly break any SPI callers that are checking for it, but that + code will never actually be returned anymore. - Rename MaxTupleSize to MaxHeapTupleSize to clarify that it's not - meant to describe the maximum size of index tuples (Tom) + Clean up SPI's API a little bit by declaring SPI plan pointers as + "SPIPlanPtr" instead of "void *" (Tom) + + + + This does not break any existing code, but switching is recommended + to help catch simple programming mistakes. - Remove the xlog-centric "database system is ready" message and - replace it with "database system is ready to accept connections" + Expose more cursor-related functionality in SPI (Pavel Stehule) + + + + Allow access to the planner's cursor-related planning options, and + provide new FETCH/MOVE routines that allow access to the full power + of those commands. - Provide strlcpy() and strlcat() on all platforms, and replace - error-prone uses of strncpy(), strncat(), etc (Peter) + Add configure --enable-profiling switch to enable code profiling + (works with gcc only, for now) (Korry Douglas and Nikhil S) + + + + + + Add configure option --with-system-tzdata to use operating system + time zone database (Peter) + + + + + + Support "gmake draft" in doc/src/sgml/Makefile (Bruce) + + + + + + Allow GIN's extractQuery method to signal that nothing can satisfy + the query (Teodor) + + + + This changes prototype of extractQuery method to use int32* instead + of uint32* for nentries argument. A -1 result means that no search + is needed. @@ -1947,36 +2341,59 @@ do it for earlier branch release files. - Restructure planner-to-executor API (Tom) + Get rid of client-code dependencies on the exact text of the + no-password error message, by using PQconnectionUsedPassword() + instead (Tom) + + - Notably, the executor no longer sees the Query structure at all, but - gets a new node type called PlannedStmt that is more suitable as - executor input. This allows us to stop storing mostly-redundant - Query trees in prepared statements, portals, etc. Also, the - rangetable used by the executor is now a flat list with no - unnecessary substructure --- this simplifies many things. + Rename MaxTupleSize to MaxHeapTupleSize to clarify that it's not + meant to describe the maximum size of index tuples (Tom) - Add configure --enable-profiling switch to enable code profiling - (works with gcc only, for now) (Korry Douglas and Nikhil S) + Remove the xlog-centric "database system is ready" message and + replace it with "database system is ready to accept connections" - Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, - len) (Greg Stark, Tom) + Provide strlcpy() and strlcat() on all platforms, and replace + error-prone uses of strncpy(), strncat(), etc (Peter) + + + + + + Improve smgr/md API (Tom) - Third-party code that manipulates varlena datums *must* convert to - this convention, since the varvarlena patch changes the - representation of length words on some architectures. + This improves error detection and reporting, both for external + problems and for coding errors inside the backend. Notably, + disallow mdread() beyond EOF, and enforce that mdwrite() is to be + used for rewriting existing blocks while mdextend() is to be used + for extending the relation EOF. + + + + + + Restructure planner-to-executor API (Tom) + + + + Notably, the executor no longer sees the Query structure at all, but + gets a new node type called PlannedStmt that is more suitable as + executor input. This allows us to stop storing mostly-redundant + Query trees in prepared statements, portals, etc. Also, the + rangetable used by the executor is now a flat list with no + unnecessary substructure — this simplifies many things. @@ -2029,44 +2446,13 @@ do it for earlier branch release files. - Remove the prohibition on executing cursor commands through - SPI_execute (Tom) - - - - The macro definition of SPI_ERROR_CURSOR still exists, so as not to - needlessly break any SPI callers that are checking for it, but that - code will never actually be returned anymore. - - - - - - Clean up SPI's API a little bit by declaring SPI plan pointers as - "SPIPlanPtr" instead of "void *" (Tom) - - - - This does not break any existing code, but switching is recommended - to help catch simple programming mistakes. - - - - - - Expose more cursor-related functionality in SPI (Pavel Stehule) - - - - Allow access to the planner's cursor-related planning options, and - provide new FETCH/MOVE routines that allow access to the full power - of those commands. + Fix pgstats counting of live and dead tuples to recognize that + committed and aborted transactions have different effects (Tom) - - - Add tas() support for Renesas' M32R processor (Kazuhiro Inaoka) + This should result in noticeably more accurate tracking of + n_live_tuples and n_dead_tuples. @@ -2082,18 +2468,6 @@ do it for earlier branch release files. - - - Fix pgstats counting of live and dead tuples to recognize that - committed and aborted transactions have different effects (Tom) - - - - This should result in noticeably more accurate tracking of - n_live_tuples and n_dead_tuples. - - - Create hooks to let a loadable plugin monitor (or even replace) the @@ -2112,7 +2486,13 @@ do it for earlier branch release files. - Downgrade some low-level startup messages to DEBUG1 (Peter) + Add tas() support for Renesas' M32R processor (Kazuhiro Inaoka) + + + + + + Downgrade some boring startup messages to DEBUG1 (Peter) @@ -2149,13 +2529,6 @@ do it for earlier branch release files. - - - Rename DLLIMPORT macro to PGDLLIMPORT to avoid conflict with third - party includes (like tcl) that define DLLIMPORT (Magnus) - - - Adjust the output of MemoryContextStats() so that the line for a @@ -2164,13 +2537,6 @@ do it for earlier branch release files. - - - Add configure option --with-system-tzdata to use operating system - time zone database (Peter) - - - Change on-disk representation of NUMERIC datatype so that the -- 2.39.5