From f031610297e23e8e1675c33b47df855e557d25c9 Mon Sep 17 00:00:00 2001 From: Bruce Momjian <bruce@momjian.us> Date: Thu, 18 Oct 2007 16:45:05 +0000 Subject: [PATCH] Move a few items into migration from the main changes section. Indent 8.3 consistently. --- doc/src/sgml/release.sgml | 4318 ++++++++++++++++++------------------- 1 file changed, 2120 insertions(+), 2198 deletions(-) diff --git a/doc/src/sgml/release.sgml b/doc/src/sgml/release.sgml index adf8c93152..67aa28f590 100644 --- a/doc/src/sgml/release.sgml +++ b/doc/src/sgml/release.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.523 2007/10/18 06:07:23 neilc Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.524 2007/10/18 16:45:05 momjian Exp $ --> <!-- Typical markup: @@ -35,2281 +35,2203 @@ do it for earlier branch release files. <appendix id="release"> <title>Release Notes</title> - <sect1 id="release-8-3"> - <title>Release 8.3</title> + <sect1 id="release-8-3"> + <title>Release 8.3</title> - <note> - <title>Release date</title> - <simpara>2007-12-??</simpara> - <para>CURRENT AS OF 2007-10-03</> - </note> + <note> + <title>Release date</title> + <simpara>2007-12-??</simpara> + <para>CURRENT AS OF 2007-10-03</> + </note> - <sect2> - <title>Overview</title> + <sect2> + <title>Overview</title> - <para> - This release represents a major leap forward for - <productname>PostgreSQL</> by adding significant new functionality - and performance enhancements. This was made possible by a growing - community that has dramatically accelerated the pace of - development. This release adds the follow major capabilities: + <para> + This release represents a major leap forward for + <productname>PostgreSQL</> by adding significant new functionality + and performance enhancements. This was made possible by a growing + community that has dramatically accelerated the pace of + development. This release adds the follow major capabilities: + </para> - <itemizedlist> + <itemizedlist> - <listitem> - <para> - Full text search now fully integrated into the core database - system - </para> - </listitem> + <listitem> + <para> + Full text search now fully integrated into the core database + system + </para> + </listitem> - <listitem> - <para> - Support for the SQL/XML standard, including new operators and a - new <type>XML</type> builtin type - </para> - </listitem> + <listitem> + <para> + Support for the SQL/XML standard, including new operators and a + new <type>XML</type> builtin type + </para> + </listitem> - <listitem> - <para> - Support for enumerated data types (<type>ENUM</type>) - </para> - </listitem> + <listitem> + <para> + Support for enumerated data types (<type>ENUM</type>) + </para> + </listitem> - <listitem> - <para> - Universally Unique Identifier (<type>UUID</>) data type, similar - to that defined by RFC 4122 - </para> - </listitem> + <listitem> + <para> + Universally Unique Identifier (<type>UUID</>) data type, similar + to that defined by RFC 4122 + </para> + </listitem> - <listitem> - <para> - Arrays of composite types - </para> - </listitem> + <listitem> + <para> + Arrays of composite types + </para> + </listitem> - <listitem> - <para> - Control over whether <literal>NULL</>s sort first or last, using - <literal>ORDER BY ... NULLS FIRST/LAST</> - </para> - </listitem> + <listitem> + <para> + Control over whether <literal>NULL</>s sort first or last, using + <literal>ORDER BY ... NULLS FIRST/LAST</> + </para> + </listitem> - <listitem> - <para> - Updatable cursors using <literal>UPDATE/DELETE WHERE CURRENT OF</> - </para> - </listitem> + <listitem> + <para> + Updatable cursors using <literal>UPDATE/DELETE WHERE CURRENT OF</> + </para> + </listitem> - <listitem> - <para> - Server configuration parameters can now be set on a per-function - basis - </para> - </listitem> + <listitem> + <para> + Server configuration parameters can now be set on a per-function + basis + </para> + </listitem> - <listitem> - <para> - User-defined types can now have type modifiers - </para> - </listitem> + <listitem> + <para> + User-defined types can now have type modifiers + </para> + </listitem> - <listitem> - <para> - Automatically invalidate cached function code when table - definitions change or statistics are updated - </para> - </listitem> + <listitem> + <para> + Automatically invalidate cached function code when table + definitions change or statistics are updated + </para> + </listitem> - <listitem> - <para> - Numerous improvements in logging and statistics collection, - including the ability to emit postmaster log messages in - <acronym>CSV</> format, which can be loaded into a database - table for analysis - </para> - </listitem> + <listitem> + <para> + Numerous improvements in logging and statistics collection, + including the ability to emit postmaster log messages in + <acronym>CSV</> format, which can be loaded into a database + table for analysis + </para> + </listitem> - <listitem> - <para> - Support Security Service Provider Interface (SSPI) on - authentication for Windows and GSSAPI - </para> - </listitem> + <listitem> + <para> + Support Security Service Provider Interface (SSPI) on + authentication for Windows and GSSAPI + </para> + </listitem> - <listitem> - <para> - Multiple autovacuum worker processes, and other autovacuum improvements - </para> - </listitem> + <listitem> + <para> + Multiple autovacuum worker processes, and other autovacuum improvements + </para> + </listitem> - <listitem> - <para> - The backend database server can now be compiled with - <productname>Microsoft Visual C++</> - </para> - </listitem> + <listitem> + <para> + The backend database server can now be compiled with + <productname>Microsoft Visual C++</> + </para> + </listitem> - </itemizedlist> + </itemizedlist> + <para> Major performance improvements are listed below. Fortunately, most of these enhancements are automatic and do not require user changes or tuning: + </para> - <itemizedlist> + <itemizedlist> + <listitem> + <para> + Asynchronous commit option allows transactions to be committed + but on-disk changes to be delayed + </para> + </listitem> + + <listitem> + <para> + <quote>Distributed</> checkpoints prevent I/O spikes during + checkpoints + </para> + </listitem> + + <listitem> + <para> + Heap-Only Tuples (<acronym>HOT</>) improves <command>UPDATE</> + space usage + </para> + </listitem> + + <listitem> + <para> + Just-in-time background writer strategy to improve disk write + efficiency + </para> + </listitem> + + <listitem> + <para> + Reduction of both per-field and per-row storage requirements + </para> + </listitem> + + <listitem> + <para> + Prevent large sequential scans from forcing out more frequently + used cached pages + </para> + </listitem> + + <listitem> + <para> + Allow large sequential scans to use cached pages from other + concurrent sequential scans + </para> + </listitem> + + <listitem> + <para> + Allow <literal>ORDER BY ... LIMIT</> to be done without sorting + </para> + </listitem> + + <listitem> + <para> + Use pseudo-transaction ids in read-only transactions + </para> + </listitem> + + </itemizedlist> + + </para> + + </sect2> + + <sect2> + <title>Migration to version 8.3</title> + + <para> + A dump/restore using <application>pg_dump</application> is + required for those wishing to migrate data from any previous + release. + </para> + + <para> + Observe the following incompatibilities: + </para> + + <itemizedlist> + + <listitem> + <para> + <filename>contrib/tsearch2</> features have been moved into + the core server, with some minor syntax changes + </para> + + <para> + XXX we need to provide a migration guide, at the very least + </para> + </listitem> + + <listitem> + <para> + Queries that previously automatically cast values to + <type>TEXT</type> might now need explicit casts (Peter, Tom) + </para> + + <para> + Data types other than <type>CHAR</> and <type>VARCHAR</> no + longer automatically cast to <type>TEXT</>, except in the + limited case of concatenation (<literal>||</>) where the other + input is textual. While this change will require additional + casts for some queries it also eliminates some unusual + behavior. + </para> + </listitem> + + <listitem> + <para> + Numerous changes in administrative server parameters + </para> + + <para> + <varname>bgwriter_lru_percent</>, + <varname>bgwriter_all_percent</>, + <varname>bgwriter_all_maxpages</>, + <varname>stats_start_collector</>, and + <varname>stats_reset_on_server_start</> are removed. + <varname>redirect_stderr</> is renamed to + <varname>logging_collector</>. + <varname>stats_command_string</> is renamed to + <varname>track_activities</>. + <varname>stats_block_level</> and <varname>stats_row_level</> + are merged into <varname>track_counts</>. + A new boolean configuration parameter, <varname>archive_mode</>, + controls archiving. Autovacuum's default settings have changed. + </para> + </listitem> + + <listitem> + <para> + Commenting out a parameter in <filename>postgresql.conf</> now + causes it to revert to its default value (Joachim Wieland) + </para> + + <para> + Previously commenting out a value kept the value unchanged until + the next server restart. + </para> + </listitem> + + <listitem> + <para> + <literal>ARRAY(SELECT ...)</literal>, where <command>SELECT</> + returns no rows, now returns an empty array, rather than NULL + (Tom) + </para> + </listitem> + + <listitem> + <para> + <literal>ORDER BY ... USING</> <replaceable>operator</> now must + use a less-than or greater-than <replaceable>operator</> that is + defined in a btree operator class (???) + </para> + + <para> + This restriction was added to prevent unexpected results. + </para> + </listitem> + + <listitem> + <para> + The array name for a base data type is no longer required to + be the data type name with an underscore prefix + </para> + + <para> + The old naming convention is still honored when possible, but + client code should no longer depending on it. Application code + should use the new <literal>pg_type.typarray</literal> column to + determine the array data type. + </para> + </listitem> + + <listitem> + <para> + <command>SET LOCAL</command> changes now persist until + the end of the top-most transaction, unless rolled back (Tom) + </para> + + <para> + Previously <command>SET LOCAL</command>'s effects reverted + during subtransaction commit and <command>RELEASE</>. + </para> + </listitem> + + <listitem> + <para> + Commands that are disallowed in transaction blocks are now also + disallowed in multiple-statement query strings (Tom) + </para> + + <para> + For example, <literal>BEGIN; DROP DATABASE; COMMIT</> will now be + rejected even if submitted as a single query message. + </para> + </listitem> + + <listitem> + <para> + More checks for invalidly-encoded data (Andrew) + </para> + + <para> + This change plugs some holes that existed in literal backslash + escape string processing and <command>COPY</command> escape + processing. Now the de-escaped string is rechecked to see if the + result created an invalid multi-byte character. + </para> + </listitem> + + <listitem> + <para> + Ensure that <function>chr()</function> cannot create invalidly + encoded values (Andrew) + </para> + + <para> + In UTF8-encoded databases the argument is processed as a Unicode + code point. In other multi-byte encodings the argument must + designate a 7-bit ASCII character, or an error is raised. Zero + also causes an error. <function>ascii()</function> has been + adjusted as well to match this behavior. + + </para> + </listitem> + + <listitem> + <para> + Adjust <function>convert()</function> behavior to ensure encoding + validity (Andrew) + </para> + + <para> + The two argument form of <function>convert()</function> has been + removed. The three argument form now takes a <type>BYTEA</type> + first argument and returns a <type>BYTEA</type>. To cover this + loss three new functions are introduced: + </para> + + <itemizedlist> <listitem> <para> - Asynchronous commit option allows transactions to be committed - but on-disk changes to be delayed + <function>convert_from(bytea, name)</function> returns + <type>TEXT</> — converts the first argument from the named + encoding to the database encoding. </para> </listitem> <listitem> <para> - <quote>Distributed</> checkpoints prevent I/O spikes during - checkpoints + <function>convert_to(text, name)</function> returns + <type>BYTEA</> — converts the first argument from the + database encoding to the named encoding. </para> </listitem> <listitem> <para> - Heap-Only Tuples (<acronym>HOT</>) improves <command>UPDATE</> - space usage + <function>length(bytea, name)</function> returns + <type>INTEGER</> — gives the length of the first + argument in characters in the named encoding. </para> </listitem> - - <listitem> - <para> - Just-in-time background writer strategy to improve disk write - efficiency - </para> - </listitem> - - <listitem> - <para> - Reduction of both per-field and per-row storage requirements - </para> - </listitem> - - <listitem> - <para> - Prevent large sequential scans from forcing out more frequently - used cached pages - </para> - </listitem> - - <listitem> - <para> - Allow large sequential scans to use cached pages from other - concurrent sequential scans - </para> - </listitem> - - <listitem> - <para> - Allow <literal>ORDER BY ... LIMIT</> to be done without sorting - </para> - </listitem> - - <listitem> - <para> - Use pseudo-transaction ids in read-only transactions - </para> - </listitem> - </itemizedlist> + </listitem> - </para> + <listitem> + <para> + Remove <literal>convert(argument USING conversion_name)</literal> + (Andrew) + </para> - </sect2> + <para> + Its behavior did not match the SQL standard and could not be + implemented in this release. + </para> + </listitem> - <sect2> - <title>Migration to version 8.3</title> + <listitem> + <para> + <function>convert()</function> encoding has changed behavior + </para> - <para> - A dump/restore using <application>pg_dump</application> is - required for those wishing to migrate data from any previous - release. - </para> + <para> + </listitem> - <para> - Observe the following incompatibilities: - </para> + <listitem> + <para> + Restrict object size functions to users who have reasonable + permissions to view such information (Tom) + </para> + <para> + For example, <function>pg_database_size()</function> now + requires <literal>CONNECT</> permission, which is granted to + everyone by default. <function>pg_tablespace_size()</function> + requires <literal>CREATE</> permission in the tablespace, or the + tablespace is the default tablespace for the database. + </para> + </listitem> + + <listitem> + <para> + New C macros for handling variable-length data values (Greg + Stark, Tom) + </para> + + <para> + The new <function>SET_VARSIZE()</> macro <emphasis>must</> be + used to set the length of generated values. Also, it might be + necessary to expand (<quote>de-TOAST</quote>) input values in + additional places. + </para> + </listitem> + + </itemizedlist> + </sect2> + + <sect2> + <title>Changes</title> + + <para> + Below you will find a detailed account of the + changes between <productname>PostgreSQL</productname> 8.3 and + the previous major release. + </para> + + <sect3> + <title>Performance Improvements</title> <itemizedlist> - <listitem> - <para> - <filename>contrib/tsearch2</> features have been moved into - the core server, with some minor syntax changes - </para> + <listitem> + <para> + Asynchronous commit option allows transactions to be committed + but on-disk changes to be delayed (Simon) + </para> - <para> - XXX we need to provide a migration guide, at the very least - </para> - </listitem> + <para> + This feature dramatically increases performance for data + modification queries. The disadvantage is that because on-disk + changes are delayed, if the operating system crashes before data + is written to the disk, committed data will be lost. This is + useful only for applications that can accept some data loss. + Unlike <varname>fsync</varname>, asynchronous commit does not + risk database corruption; the worst case is that after an + operating system crash the last few reportedly-committed + transactions will be missing. + </para> + </listitem> - <listitem> - <para> - Queries that previously automatically cast values to - <type>TEXT</type> might now need explicit casts - </para> - </listitem> + <listitem> + <para> + <quote>Distributed</> checkpoints prevent I/O spikes during + checkpoints (Itagaki Takahiro and Heikki Linnakangas) + </para> - <listitem> - <para> - Numerous changes in administrative server parameters - </para> + <para> + Previously all modified buffers were forced to disk at + checkpoint time, causing an I/O spike and decreasing server + performance. This new capability spreads checkpoint activity out + between checkpoints, reducing peak I/O usage. (User-requested + and shutdown checkpoints are still immediately written to disk.) + </para> + </listitem> - <para> - <varname>bgwriter_lru_percent</>, - <varname>bgwriter_all_percent</>, - <varname>bgwriter_all_maxpages</>, - <varname>stats_start_collector</>, and - <varname>stats_reset_on_server_start</> are removed. - <varname>redirect_stderr</> is renamed to - <varname>logging_collector</>. - <varname>stats_command_string</> is renamed to - <varname>track_activities</>. - <varname>stats_block_level</> and <varname>stats_row_level</> - are merged into <varname>track_counts</>. - A new boolean configuration parameter, <varname>archive_mode</>, - controls archiving. Autovacuum's default settings have changed. - </para> - </listitem> + <listitem> + <para> + Heap-Only Tuples (<acronym>HOT</>) improves <command>UPDATE</> + space usage (Pavan Deolasee, with ideas from many others) + </para> - <listitem> - <para> - Commenting out a parameter in <filename>postgresql.conf</> now - causes it to revert to its default value - </para> - </listitem> + <para> + To allow high concurrency <productname>PostgreSQL</> retains old + versions of updated rows. Previously only <command>VACUUM</> + could reuse space taken by dead rows. With <acronym>HOT</> dead + row space can be reused at the time of <command>UPDATE</> or + <command>INSERT</>. This allows for more consistent performance. + <acronym>HOT</> even allows deleted row space reuse. + <command>UPDATE</> space reuse is only possible if no modified + columns are indexed. + </para> + </listitem> - <listitem> - <para> - <literal>ARRAY(SELECT ...)</literal>, where <command>SELECT</> - returns no rows, now returns an empty array, rather than NULL - </para> - </listitem> + <listitem> + <para> + Just-in-time background writer strategy to improve disk write + efficiency (Greg Smith, Itagaki Takahiro) + </para> - <listitem> - <para> - <literal>ORDER BY ... USING</> <replaceable>operator</> now must - use a less-than or greater-than <replaceable>operator</> that is - defined in a btree operator class - </para> + <para> + This basically makes the background writer self-tuning. + </para> + </listitem> - <para> - This restriction was added to prevent unexpected results. - </para> - </listitem> + <listitem> + <para> + Reduction of both per-field and per-row storage requirements + (Greg Stark) + </para> - <listitem> - <para> - The array name for a base data type is no longer required to - be the data type name with an underscore prefix - </para> - </listitem> + <para> + Variable-length data types with data values less then 128 bytes + will see a decrease of 3-6 bytes. For example, two + <type>CHAR(1)</type> fields now take 4 bytes instead of 16. Rows + are also 4 bytes shorter. + </para> + </listitem> - <listitem> - <para> - Non-superuser database owners now have privileges to add trusted - procedural languages in their databases by default - </para> - </listitem> + <listitem> + <para> + Use pseudo-transaction ids in read-only transactions (Florian Pflug) + </para> - <listitem> - <para> - <command>SET LOCAL</command> changes now persist until - the end of the top-most transaction, unless rolled back - </para> + <para> + This reduces transaction overhead for read-only transactions, + and reduces the necessity of vacuuming for transaction id + wrap-around. Other transaction performance improvements were + also made that should improve concurrency. + </para> + </listitem> - </listitem> + <listitem> + <para> + Create a dedicated <acronym>WAL</> writer process to off-load + WAL-writing work from backends (Simon) + </para> + </listitem> - <listitem> - <para> - Commands that are disallowed in transaction blocks are now also - disallowed in multiple-statement query strings - </para> - </listitem> + <listitem> + <para> + Skip unnecessary WAL writes for <command>CLUSTER</command> and + <command>COPY</command> (Simon) + </para> - <listitem> - <para> - Add additional checks for invalidly-encoded multibyte strings - </para> + <para> + Unless WAL archiving is enabled, it is possible to just + <function>fsync()</> the table at the end of the command, + increasing performance. Additional WAL efficiencies were also + added. + </para> + </listitem> - <para> - For example, <function>chr()</function> has additional checks. - </para> - </listitem> + <listitem> + <para> + Prevent large sequential scans from forcing out more frequently + used cached pages (Simon, Heikki, Tom) + </para> + </listitem> - <listitem> - <para> - <function>convert()</function> encoding has changed behavior - </para> + <listitem> + <para> + Allow large sequential scans to use cached pages from other + concurrent sequential scans (Jeff Davis) + </para> - <para> - <type>bytea</> is now used for strings that do not match the - server encoding, and <function>convert_from</> and - <function>convert_to</> have been added for consistency. - </para> - </listitem> + <para> + This is accomplished by starting the new sequential scan in the + middle of the table (where the other sequential scan is already + in-progress) and wrapping around to the beginning to finish. + This may affect the order in which rows are returned in a + non-<literal>ORDER BY</> query. + </para> + </listitem> - <listitem> - <para> - Restrict object size functions to users who have reasonable - permissions to view such information - </para> - </listitem> + <listitem> + <para> + Reduce overhead of populating the statistics tables. (Tom) + </para> + </listitem> - <listitem> - <para> - New C macros for handling variable-length data values - </para> - </listitem> + <listitem> + <para> + Allow <literal>ORDER BY ... LIMIT</> to be done without sorting + (Greg Stark) + </para> + + <para> + This is done by scanning the table and using a filter to save + the few requested rows, rather than sorting the entire table. + </para> + </listitem> + + <listitem> + <para> + Improve hash join performance for cases with many NULLs (Tom) + </para> + </listitem> </itemizedlist> - </sect2> - <sect2> - <title>Changes</title> + </sect3> - <para> - Below you will find a detailed account of the - changes between <productname>PostgreSQL</productname> 8.3 and - the previous major release. - </para> + <sect3> + <title>Server Changes</title> + <itemizedlist> - <sect3> - <title>Performance Improvements</title> - <itemizedlist> - - <listitem> - <para> - Asynchronous commit option allows transactions to be committed - but on-disk changes to be delayed (Simon) - </para> - - <para> - This feature dramatically increases performance for data - modification queries. The disadvantage is that because on-disk - changes are delayed, if the operating system crashes before data - is written to the disk, committed data will be lost. This is - useful only for applications that can accept some data loss. - Unlike <varname>fsync</varname>, asynchronous commit does not - risk database corruption; the worst case is that after an - operating system crash the last few reportedly-committed - transactions will be missing. - </para> - </listitem> - - <listitem> - <para> - <quote>Distributed</> checkpoints prevent I/O spikes during - checkpoints (Itagaki Takahiro and Heikki Linnakangas) - </para> - - <para> - Previously all modified buffers were forced to disk at - checkpoint time, causing an I/O spike and decreasing server - performance. This new capability spreads checkpoint activity out - between checkpoints, reducing peak I/O usage. (User-requested - and shutdown checkpoints are still immediately written to disk.) - </para> - </listitem> - - <listitem> - <para> - Heap-Only Tuples (<acronym>HOT</>) improves <command>UPDATE</> - space usage (Pavan Deolasee, with ideas from many others) - </para> - - <para> - To allow high concurrency <productname>PostgreSQL</> retains old - versions of updated rows. Previously only <command>VACUUM</> - could reuse space taken by dead rows. With <acronym>HOT</> dead - row space can be reused at the time of <command>UPDATE</> or - <command>INSERT</>. This allows for more consistent performance. - <acronym>HOT</> even allows deleted row space reuse. - <command>UPDATE</> space reuse is only possible if no modified - columns are indexed. - </para> - </listitem> - - <listitem> - <para> - Just-in-time background writer strategy to improve disk write - efficiency (Greg Smith, Itagaki Takahiro) - </para> - - <para> - This basically makes the background writer self-tuning. - </para> - </listitem> - - <listitem> - <para> - Reduction of both per-field and per-row storage requirements - (Greg Stark) - </para> - - <para> - Variable-length data types with data values less then 128 bytes - will see a decrease of 3-6 bytes. For example, two - <type>CHAR(1)</type> fields now take 4 bytes instead of 16. Rows - are also 4 bytes shorter. - </para> - </listitem> - - <listitem> - <para> - Use pseudo-transaction ids in read-only transactions (Florian Pflug) - </para> - - <para> - This reduces transaction overhead for read-only transactions, - and reduces the necessity of vacuuming for transaction id - wrap-around. Other transaction performance improvements were - also made that should improve concurrency. - </para> - </listitem> - - <listitem> - <para> - Create a dedicated <acronym>WAL</> writer process to off-load - WAL-writing work from backends (Simon) - </para> - </listitem> - - <listitem> - <para> - Skip unnecessary WAL writes for <command>CLUSTER</command> and - <command>COPY</command> (Simon) - </para> - - <para> - Unless WAL archiving is enabled, it is possible to just - <function>fsync()</> the table at the end of the command, - increasing performance. Additional WAL efficiencies were also - added. - </para> - </listitem> - - <listitem> - <para> - Prevent large sequential scans from forcing out more frequently - used cached pages (Simon, Heikki, Tom) - </para> - </listitem> - - <listitem> - <para> - Allow large sequential scans to use cached pages from other - concurrent sequential scans (Jeff Davis) - </para> - - <para> - This is accomplished by starting the new sequential scan in the - middle of the table (where the other sequential scan is already - in-progress) and wrapping around to the beginning to finish. - This may affect the order in which rows are returned in a - non-<literal>ORDER BY</> query. - </para> - </listitem> - - <listitem> - <para> - Reduce overhead of populating the statistics tables. (Tom) - </para> - </listitem> - - <listitem> - <para> - Allow <literal>ORDER BY ... LIMIT</> to be done without sorting - (Greg Stark) - </para> - - <para> - This is done by scanning the table and using a filter to save - the few requested rows, rather than sorting the entire table. - </para> - </listitem> - - <listitem> - <para> - Improve hash join performance for cases with many NULLs (Tom) - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title>Server Changes</title> - <itemizedlist> - - <listitem> - <para> - Support multiple concurrent autovacuum processes (Alvaro, Itagaki - Takahiro) - </para> - - <para> - This allows multiple vacuums to run concurrently, meaning - vacuuming of a large table will not prevent smaller tables from - being vacuumed at the same time. Autovacuum is now considered - mature and thus enabled by default. Several autovacuum - default parameter values were also updated. - </para> - </listitem> - - <listitem> - <para> - Autovacuum is now enabled by default (Alvaro) - </para> - - <para> - Also, autovacuum now reports its activity start time in - <literal>pg_stat_activity</literal> (Tom) - </para> - </listitem> - - <listitem> - <para> - Commenting out a parameter in <filename>postgresql.conf</> now - causes it to revert to its default value (Joachim Wieland) - </para> - - - <para> - Previously commenting out a value kept the value unchanged until - the next server restart. - </para> - </listitem> - - <listitem> - <para> - Automatically invalidate cached function code when table - definitions change or statistics are updated (Tom) - </para> - - <para> - Previously PL/PgSQL functions that referenced temporary tables - would fail if the temporary table was dropped and recreated - between function invocations, unless <literal>EXECUTE</> was - used. - </para> - </listitem> - - <listitem> - <para> - Support Security Service Provider Interface (SSPI) - authentication on Windows (Magnus) - </para> - </listitem> - - <listitem> - <para> - Add support for GSSAPI authentication (Henry Hotz, Magnus) - </para> - </listitem> - - <listitem> - <para> - Support a global SSL configuration file (Victor Wagner) - </para> - </listitem> - - <listitem> - <para> - Add <varname>ssl_ciphers</> parameter to control accepted SSL ciphers - (Victor Wagner) - </para> - </listitem> - - <listitem> - <para> - Add new encodings EUC_JIS_2004 and SHIFT_JIS_2004, along with new - conversions between EUC_JIS_2004, SHIFT_JIS_2004 and UTF-8 (Tatsuo) - </para> - </listitem> - - <listitem> - <para> - Make JOHAB encoding client-only (Tatsuo) - </para> - - <para> - JOHAB cannot safely be used as a server-side encoding. - </para> - </listitem> - - <listitem> - <para> - Allow logfile creation in CSV format (Arul Shaji, Greg Smith, - Andrew Dunstan) - </para> - </listitem> - - <listitem> - <para> - Add <varname>log_autovacuum_min_duration</varname> parameter to - support configurable logging of autovacuum actions (Simon, Alvaro) - </para> - </listitem> - - <listitem> - <para> - Add <varname>log_lock_waits</varname> parameter to log long wait - times (Simon) - </para> - </listitem> - - <listitem> - <para> - Add <varname>log_temp_files</varname> parameter to log usage of - temporary files (Bill Moran) - </para> - </listitem> - - <listitem> - <para> - Add <varname>log_checkpoints</varname> parameter to improve logging - of checkpoints (Greg Smith, Heikki) - </para> - </listitem> - - <listitem> - <para> - <varname>log_line_prefix</varname> escapes <literal>%s</literal> - and <literal>%c</literal> can now be used in all processes - (Andrew) - </para> - </listitem> - - <listitem> - <para> - Use our own timezone support for formatting timestamps displayed in - the server log (Tom) - </para> - - <para> - This avoids Windows-specific problems with localized time zone - names that are in the wrong encoding. There is a new - <varname>log_timezone</> parameter that controls the timezone - used in log messages, independent of the client-visible - <varname>timezone</> parameter. - </para> - </listitem> - - <listitem> - <para> - Change the timestamps recorded in transaction WAL records from - time_t to TimestampTz representation (Tom) - </para> - - <para> - This provides sub-second resolution in WAL, which can be useful for - point-in-time recovery. - </para> - </listitem> - <listitem> - <para> - New boolean configuration parameter, <varname>archive_mode</>, - controls archiving (Simon) - </para> - - <para> - Previously setting <varname>archive_command</> to an empty - string turned off archiving. Now <varname>archive_mode</> turns - archiving on and off. This is useful for stopping archiving - temporarily. - </para> - </listitem> - - <listitem> - <para> - Improve ability to create warm standby servers using archiving - (Simon) - </para> - - <para> - Allow the warm standby server to pass the earliest needed WAL - file to the recovery script to allow automatic removal of - unneeded WAL files. This is done using - <varname>restore_command</varname> <literal>%r</> in - <filename>recovery.conf</filename>. - </para> - </listitem> - - <listitem> - <para> - Add <varname>log_restartpoints</varname> archive recovery option - to emit a log message at each recovery restart point (Simon) - </para> - </listitem> - - <listitem> - <para> - Last transaction end time is now logged at end of recovery and at - each logged restart point (Simon) - </para> - </listitem> - - <listitem> - <para> - Add a <varname>temp_tablespaces</varname> parameter to control - the tablespaces for temporary tables and files (Jaime Casanova, - Albert Cervera, Bernd Helmle) - </para> - - <para> - This parameters allows a list of tablespaces to be specified - which enables spreading the I/O load across multiple - tablespaces. A random tablespace is chosen each time a temporary - object is created. Temporary files are not stored in - per-database <filename>pgsql_tmp/</filename> directories anymore - but in per-tablespace directories. - </para> - </listitem> - - <listitem> - <para> - New system view <literal>pg_stat_bgwriter</literal> displays - statistics about the background writer activity (Magnus) - </para> - </listitem> - - <listitem> - <para> - Add new columns for database-wide tuple statistics to - <literal>pg_stat_database</literal> (Magnus) - </para> - </listitem> - - <listitem> - <para> - Add an <literal>xact_start</literal> column to - <literal>pg_stat_activity</literal> (Neil) - </para> - - <para> - This makes it easier to identify long-running transactions. - </para> - </listitem> - - <listitem> - <para> - Add <literal>n_live_tuples</> and <literal>n_dead_tuples</> columns - to <literal>pg_stat_all_tables</literal> and related views (Glen - Parker) - </para> - </listitem> - - <listitem> - <para> - Remove <varname>stats_start_collector</varname> parameter (Tom) - </para> - - <para> - We now always start the collector process, unless prevented by a - problem with setting up the stats UDP socket. - </para> - </listitem> - - <listitem> - <para> - Remove <varname>stats_reset_on_server_start</varname> parameter (Tom) - </para> - - <para> - This was removed because <function>pg_stat_reset()</function> - can be used for this purpose. - </para> - </listitem> - - <listitem> - <para> - Merge <varname>stats_block_level</> and <varname>stats_row_level</> - parameters into a single parameter <varname>track_counts</>, - which controls all messages sent to the collector process (Tom) - </para> - </listitem> - - <listitem> - <para> - Rename <varname>stats_command_string</varname> parameter to - <varname>track_activities</varname> (Tom) - </para> - </listitem> - - <listitem> - <para> - Limit the amount of information reported when a user is dropped - (Alvaro) - </para> - - <para> - Previously, dropping (or attempting to drop) a user who owned many - objects could result in extremely large <literal>NOTICE</literal> or - <literal>ERROR</literal> messages listing all these objects; this - caused problems for some client applications. The length of the - list is now limited, although a full list is still sent to the - server log. - </para> - </listitem> - - <listitem> - <para> - Arrange to put TOAST tables belonging to temporary tables into - special schemas named - <literal>pg_toast_temp_<replaceable>nnn</></literal> (Tom) - </para> - - <para> - This allows low-level code to recognize that these tables are - temporary, which enables various optimizations such as not - WAL-logging changes and using local rather than shared buffers - for access. This also fixes a bug where backends unexpectedly - held open file references to temporary tables. - </para> - </listitem> - - <listitem> - <para> - Fix problem that a constant flow of new connection requests could - indefinitely delay the postmaster from completing a shutdown or - crash restart (Tom) - </para> - </listitem> - - <listitem> - <para> - Allow <command>CREATE INDEX CONCURRENTLY</command> to ignore - transactions in other databases (Simon) - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title>Query Changes</title> - <itemizedlist> - - <listitem> - <para> - Text search capability is now in core Postgres (Teodor, Oleg) - </para> - - <para> - This features was previously in <filename>contrib/tsearch2</>. - It has been improved, moved into the server, and is now installed - by default. - </para> - </listitem> - - <listitem> - <para> - Control over whether <literal>NULL</>s sort first or last, using - <literal>ORDER BY ... NULLS FIRST/LAST</> (Teodor, Tom) - </para> - </listitem> - - <listitem> - <para> - Allow ascending/descending (<literal>ASC</>/<literal>DESC</>) - control during index creation (Teodor, Tom) - </para> - - <para> - Previously a query using <literal>ORDER BY</> with mixed - <literal>ASC</>/<literal>DESC</> specifiers could not fully use - an index. Now an index can be fully used in such cases if the - index was created with matching - <literal>ASC</>/<literal>DESC</> specifictions. - </para> - </listitem> - - <listitem> - <para> - Updatable cursors using <literal>UPDATE/DELETE WHERE CURRENT - OF</> (Arul Shaji, Tom) - </para> - - <para> - This eliminates the need to reference a primary key to update or - delete rows returned by a cursor. - </para> - </listitem> - - <listitem> - <para> - Allow <literal>FOR UPDATE</literal> in cursors (Arul Shaji, Tom) - </para> - </listitem> - - <listitem> - <para> - Queries that previously automatically cast values to - <type>TEXT</type> might now need explicit casts (Peter, Tom) - </para> - - - <para> - Data types other than <type>CHAR</> and <type>VARCHAR</> no - longer automatically cast to <type>TEXT</>, except in the - limited case of concatenation (<literal>||</>) where the other - input is textual. While this change will require additional - casts for some queries it also eliminates some unusual - behavior. - </para> - </listitem> - - <listitem> - <para> - Create a general mechanism that supports casts to and from the - standard string types (<type>TEXT</type>, <type>VARCHAR</type>, - <type>CHAR</type>) for <emphasis>every</emphasis> datatype, by - invoking the datatype's I/O functions (Tom) - </para> - - <para> - XXX? bjm These new casts are assignment-only in the to-string direction, - explicit-only in the other, and therefore should create no - surprising behavior. Remove a bunch of thereby-obsoleted - datatype-specific casting functions. - </para> - </listitem> - - <listitem> - <para> - <literal>ARRAY(SELECT ...)</literal>, where <command>SELECT</> - returns no rows, now returns an empty array, rather than NULL - (Tom) - </para> - </listitem> - - <listitem> - <para> - Allow <literal>col IS NULL</> to use an index (Teodor) - </para> - </listitem> - - <listitem> - <para> - Allow limited hashing when using two different data types (Tom) - </para> - - <para> - 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. - Current cross-data-type hashing support exists for - <type>SMALLINT</type>/<type>INTEGER</type>/<type>BIGINT</type>, - and for <type>FLOAT4</type>/<type>FLOAT8</type>. - </para> - </listitem> - - <listitem> - <para> - Improve optimizer logic for detecting when variables are equal - in a <literal>WHERE</> clause (Tom) - </para> - - <para> - This allows mergejoins to work with descending sort orders, and - improves recognition of redundant sort columns. - </para> - </listitem> - - <listitem> - <para> - Improve performance when planning large inheritance trees when - most tables are excluded by constraints (Tom) - </para> - </listitem> - - <listitem> - <para> - Remove the undocumented <literal>!!=</> (not in) operator (Tom) - </para> - - <para> - <literal>NOT IN (SELECT ...)</literal> is the proper way to - perform this operation. - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title>Object Manipulation Changes</title> - <itemizedlist> - - <listitem> - - <para> - Support arrays of composite types (David Fetter, Andrew, Tom) - </para> - - <para> - Arrays of rowtypes of regular tables and views are now - supported, but not for system catalogs, sequences, or TOAST - tables. - </para> - - </listitem> - - <listitem> - <para> - The array name for a base data type is no longer required to - be the data type name with an underscore prefix - </para> - - <para> - The old naming convention is still honored when possible, but - client code should no longer depending on it. Application code - should use the new <literal>pg_type.typarray</literal> column to - determine the array data type. - </para> - </listitem> - - <listitem> - <para> - Server configuration parameters can now be set on a per-function - basis (Tom) - </para> - - <para> - For example, functions can now set their own - <varname>search_path</> to prevent unexpected behavior if a - different <varname>search_path</> exists at run-time. Security - definer functions should set <varname>search_path</varname> to - avoid security loopholes. - </para> - </listitem> - - <listitem> - <para> - Add <literal>COST</literal> and <literal>ROWS</literal> options to - <command>CREATE/ALTER FUNCTION</command> (Tom) - </para> - - <para> - This allows simple control of the estimated cost of a function - call and control over the estimated number of rows returned by a - set-returning function. - </para> - </listitem> - - <listitem> - <para> - Allow triggers and rules to be deactivated in groups using a - session variable, for replication purposes (Jan) - </para> - - <para> - This allows replication systems to disable triggers and rewrite - rules as a group without modifying the system catalogs directly. - The behavior is controlled by <command>ALTER TABLE</> and a new - parameter <varname>session_replication_role</varname>. + <listitem> + <para> + Support multiple concurrent autovacuum processes (Alvaro, Itagaki + Takahiro) </para> - <para> - <application>psql</application>'s <literal>\d</literal> command - and <application>pg_dump</application> have been enhanced - </para> - </listitem> + <para> + This allows multiple vacuums to run concurrently, meaning + vacuuming of a large table will not prevent smaller tables from + being vacuumed at the same time. Autovacuum is now considered + mature and thus enabled by default. Several autovacuum + default parameter values were also updated. + </para> + </listitem> - <listitem> - <para> - User-defined types can now have type modifiers (Teodor, Tom) - </para> - - <para> - This allows a user type to take a modifier when - being created, e.g. <type>SSNUM(7)</>. Previously only - predefined system data types would allow this, e.g. - <type>CHAR(4)</>. - </para> - </listitem> - - <listitem> - <para> - Foreign keys now must match indexable conditions for - cross-data-type references (Tom) - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title>Utility Command Changes</title> - <itemizedlist> - - <listitem> - <para> - Non-superuser database owners now have privileges to add trusted - procedural languages in their databases by default (Jeremy Drake) - </para> - - - <para> - While this is reasonably safe, some administrators may wish to - revoke the privilege. It is controlled by - <structname>pg_pltemplate</>.<structfield>tmpldbacreate</>. - </para> - </listitem> - - <listitem> - <para> - <command>SET LOCAL</command> changes now persist until - the end of the top-most transaction, unless rolled back (Tom) - </para> - - <para> - Previously <command>SET LOCAL</command>'s effects reverted - during subtransaction commit and <command>RELEASE</>. - </para> - </listitem> - - <listitem> - <para> - Allow a session's current parameter setting to be used as the - default for future sessions (Tom) - </para> - - <para> - This is done with <literal>SET ... FROM CURRENT</literal> in - <command>CREATE/ALTER FUNCTION</command>, <command>ALTER - DATABASE</command>, or <command>ALTER ROLE</command>. - </para> - </listitem> - - <listitem> - <para> - Implement new commands <command>DISCARD ALL</command>, - <command>DISCARD PLANS</command>, <command>DISCARD - TEMPORARY</command>, <command>CLOSE ALL</command>, and - <command>DEALLOCATE ALL</command> (Marko Kreen, Neil) - </para> - - <para> - These commands simplify resetting a database session to its initial - state, and are particularly useful for connection-pooling software. - </para> - </listitem> - - <listitem> - <para> - Allow <command>ALTER VIEW ... RENAME TO</command> and <command>ALTER - SEQUENCE ... RENAME TO</command> (David Fetter, Neil) - </para> - - <para> - Previously this could only be done via <command>ALTER TABLE ... - RENAME TO</command>. - </para> - </listitem> - - <listitem> - <para> - Implement <command>CREATE TABLE LIKE ... INCLUDING - INDEXES</command> (Trevor Hardcastle, Nikhil S, Neil) - </para> - </listitem> - - <listitem> - <para> - Make <command>CLUSTER</command> MVCC-safe (Heikki Linnakangas) - </para> - - <para> - Formerly, <command>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 visibility rules. - </para> - </listitem> - - <listitem> - <para> - Add new syntax for <command>CLUSTER</command>: <literal>CLUSTER - <replaceable>table</> USING <replaceable>index</></literal> - (Holger Schurig) + <listitem> + <para> + Autovacuum is now enabled by default (Alvaro) </para> - <para> - The old <command>CLUSTER</command> syntax is still supported, but - the new form is considered more logical. - </para> - </listitem> - - <listitem> - <para> - Fix <command>EXPLAIN</command> so it can show more complex plans (Tom) - </para> - </listitem> - - <listitem> - <para> - Commands that are disallowed in transaction blocks are now also - disallowed in multiple-statement query strings (Tom) - </para> - - - <para> - For example, <literal>BEGIN; DROP DATABASE; COMMIT</> will now be - rejected even if submitted as a single query message. - </para> - </listitem> - - <listitem> - <para> - Make CREATE/DROP/RENAME DATABASE wait briefly for other backends - to exit before failing (Tom) - </para> - - <para> - This increases the likelihood that these commands will succeed. - </para> - </listitem> - - <listitem> - <para> - Prevent <command>NOTIFY</command>/<command>LISTEN</command>/<command>UNLISTEN</command> - from accepting schema-qualified names (Bruce) - </para> - - <para> - Formerly, these commands accepted <quote>schema.relation</> but - ignored the schema part, which was confusing. - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title>Data Type and Function Changes</title> - <itemizedlist> - - <listitem> - <para> - Support for the SQL/XML standard, including new operators and a - new <type>XML</type> builtin type (Nikolay Samokhvalov, Peter) - </para> - </listitem> - - <listitem> - <para> - Support for enumerated data types (<type>ENUM</type>) (Tom Dunstan) - </para> - - <para> - This is accomplished by creating a new data type with an - <literal>ENUM</> clause, e.g. - <literal>CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy')</>. - </para> - </listitem> - - <listitem> - <para> - Universally Unique Identifier (<type>UUID</>) data type, similar - to that defined by RFC 4122 (Gevik Babakhani, Neil) - </para> - </listitem> - - <listitem> - <para> - Widen the <type>MONEY</type> data type to 64 bits (D'Arcy Cain) - </para> - - <para> - This greatly increases the range of supported <type>MONEY</> - values. - </para> - </listitem> - - <listitem> - <para> - Add new regexp functions <function>regexp_matches()</function>, - <function>regexp_split_to_array()</function>, and - <function>regexp_split_to_table()</function> (Jeremy Drake, Neil) - </para> - - <para> - These functions provide access to the regex groups, - <literal>\(.*\)</> , and allows splitting a string on a POSIX - regular expression. - </para> - </listitem> - - <listitem> - <para> - Add <function>lo_truncate()</function> function for large object - truncation (Kris Jurka) - </para> - </listitem> - - <listitem> - <para> - Implement <function>width_bucket()</function> for the float8 data - type (Neil) - </para> - </listitem> - - <listitem> - <para> - Add <function>pg_stat_clear_snapshot()</function> to discard - statistics snapshots collected during the current transaction - (Tom) - </para> - - <para> - The first request for statistics in a transaction takes a - statistics snapshot that doesn't change during the transaction. - This function allows the snapshot to be discarded and a new - snapshot loaded during the next statistics query. This is - particularly useful for PL/PgSQL functions which are confined to - a single transaction. - </para> - </listitem> - - <listitem> - <para> - Add <literal>isodow</> option to <function>EXTRACT()</> and - <function>date_part()</> (Bruce) - </para> - - <para> - This is the day of the week, with Sunday as seven. - (<literal>dow</> returns Sunday as zero.) - </para> - </listitem> - - <listitem> - <para> - Add <literal>ID</> (ISO day of week) and <literal>IDDD</> (ISO - day of year) format types for <function>to_char()</>, - <function>to_date()</> and <function>to_timestamp()</> (Brendan - Jurd) - </para> - </listitem> - - <listitem> - <para> - Make <function>to_timestamp()</> and <function>to_date()</> - assume <quote>TM</quote> (trim) for potentially variable-width - fields (Bruce) - </para> - - <para> - This matches Oracle behavior. - </para> - </listitem> - - <listitem> - <para> - Fix off-by-one conversion in to_date()/to_timestamp() 'D' fields - (Bruce) - </para> - </listitem> - - <listitem> - <para> - Fix <type>float4</type>/<type>float8</type> to handle - <literal>Infinity</> and <literal>NAN</> (not a number) - consistently (Bruce) - </para> - - <para> - The code formerly was not consistent about distinguishing - <literal>Infinity</> from overflow conditions. - </para> - </listitem> - - <listitem> - <para> - Make <function>setseed()</function> return void, rather than a - useless integer value (Neil) - </para> - </listitem> - - <listitem> - <para> - Add a hash function for <type>NUMERIC</type> (Neil) - </para> - - <para> - This allows hash indexes and hash-based plans to be used with - <type>NUMERIC</type>. - </para> - </listitem> - - <listitem> - <para> - Improve efficiency of - <literal>LIKE</literal>/<literal>ILIKE</literal>, especially for - multi-byte character sets like UTF8 (Andrew, Itagaki Takahiro) - </para> - </listitem> - - <listitem> - <para> - Allow leading and trailing whitespace for <type>BOOLEAN</type> - values (Neil) - </para> - </listitem> - - <listitem> - <para> - More checks for invalidly-encoded data (Andrew) - </para> - - <para> - This change plugs some holes that existed in literal backslash - escape string processing and <command>COPY</command> escape - processing. Now the de-escaped string is rechecked to see if the - result created an invalid multi-byte character. - </para> - </listitem> - - <listitem> - <para> - Ensure that <function>chr()</function> cannot create invalidly - encoded values (Andrew) - </para> - - <para> - In UTF8-encoded databases the argument is processed as a Unicode - code point. In other multi-byte encodings the argument must - designate a 7-bit ASCII character, or an error is raised. Zero - also causes an error. <function>ascii()</function> has been - adjusted as well to match this behavior. - + <para> + Also, autovacuum now reports its activity start time in + <literal>pg_stat_activity</literal> (Tom) </para> - </listitem> - - <listitem> - <para> - Adjust <function>convert()</function> behavior to ensure encoding - validity (Andrew) - </para> - - <para> - The two argument form of <function>convert()</function> has been - removed. The three argument form now takes a <type>BYTEA</type> - first argument and returns a <type>BYTEA</type>. To cover this - loss three new functions are introduced: - </para> - - <itemizedlist> - <listitem> - <para> - <function>convert_from(bytea, name)</function> returns - <type>TEXT</> — converts the first argument from the named - encoding to the database encoding. - </para> - </listitem> - - <listitem> - <para> - <function>convert_to(text, name)</function> returns - <type>BYTEA</> — converts the first argument from the - database encoding to the named encoding. - </para> - </listitem> - - <listitem> - <para> - <function>length(bytea, name)</function> returns - <type>INTEGER</> — gives the length of the first - argument in characters in the named encoding. - </para> - </listitem> - </itemizedlist> - </listitem> - - <listitem> - <para> - Remove <literal>convert(argument USING conversion_name)</literal> - (Andrew) - </para> - - <para> - Its behavior did not match the SQL standard and could not be - implemented in this release. - </para> - </listitem> - - <listitem> - <para> - Restrict object size functions to users who have reasonable - permissions to view such information (Tom) - </para> - - <para> - For example, <function>pg_database_size()</function> now - requires <literal>CONNECT</> permission, which is granted to - everyone by default. <function>pg_tablespace_size()</function> - requires <literal>CREATE</> permission in the tablespace, or the - tablespace is the default tablespace for the database. - </para> - </listitem> - - <listitem> - <para> - Make <function>currtid()</function> functions require - <literal>SELECT</literal> privileges on the target table (Tom) - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title>PL/PgSQL Server-Side Language Changes</title> - <itemizedlist> - - <listitem> - <para> - Add scrollable cursor support by adding directional control to - PL/PgSQL's <command>FETCH</command> (Pavel Stehule) - </para> - </listitem> - - <listitem> - <para> - Add support for <literal>IN</literal> as an alternative to - <literal>FROM</literal> in PL/PgSQL's <command>FETCH</command> - statement, for consistency with the backend's - <command>FETCH</command> command (Pavel Stehule) - </para> - </listitem> - - <listitem> - <para> - Add <command>MOVE</command> to PL/PgSQL (Magnus, Pavel Stehule, - Neil) - </para> - </listitem> - - <listitem> - <para> - Implement <command>RETURN QUERY</command> (Pavel Stehule, Neil) - </para> - - <para> - This adds convenient syntax for PL/PgSQL set-returning functions - that want to return the result of a query, rather than using - <command>RETURN NEXT</command>. <command>RETURN QUERY</command> - is more efficient too. - </para> - </listitem> - - <listitem> - <para> - Allow function parameter names to be qualified with the - function's name(Tom) - </para> - - <para> - For example, <literal>myfunc.myvar</>. This is particularly - useful for specifying variables in a query where the variable - name might match a column name. - </para> - </listitem> - - <listitem> - <para> - Tighten requirements for <literal>FOR</literal> loop - <literal>STEP</> values (Tom) - </para> - - <para> - Prevent non-positive <literal>STEP</> values, and handle - loop overflows. - </para> - - </listitem> - - <listitem> - <para> - Improve accuracy when reporting syntax error locations (Tom) - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title>PL/Perl Server-Side Language Changes</title> - <itemizedlist> - - <listitem> - <para> - Allow type-name arguments to <function>spi_prepare()</function> to - be data type aliases in addition to names in - <literal>pg_type</literal> (Andrew) - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title>PL/Python Server-Side Language Changes</title> - <itemizedlist> - - <listitem> - <para> - Enable PL/PythonU to compile on Python 2.5 (Marko Kreen) - </para> - </listitem> - - <listitem> - <para> - Allow type-name arguments to <function>plpy.prepare()</function> to - be data type aliases in addition to names in - <literal>pg_type</literal> (Andrew) - </para> - </listitem> - - <listitem> - <para> - Support a true boolean type in compatible Python versions - (Python 2.3 and later) (Marko Kreen) - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title>PL/Tcl Server-Side Language Changes</title> - <itemizedlist> - - <listitem> - <para> - Allow type-name arguments to <function>spi_prepare</> to - be data type aliases in addition to names in - <literal>pg_type</literal> (Andrew) - </para> - </listitem> - - <listitem> - <para> - Fix problems with thread-enabled <filename>libtcl</> spawning - multiple threads within the backend (Steve Marshall, Paul Bayer, - Doug Knight) - </para> - - <para> - This caused all sorts of unpleasantness. - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title><link linkend="APP-PSQL"><application>psql</></link> Changes</title> - <itemizedlist> - - <listitem> - <para> - List disabled triggers separately in <literal>\d</literal> output - (Brendan Jurd) - </para> - </listitem> - - <listitem> - <para> - Show aggregate return types in <literal>\da</literal> output - (Greg Sabino Mullane) - </para> - </listitem> - - <listitem> - <para> - Add the function's volatility to the output of - <literal>\df+</literal> (Neil) - </para> - </listitem> - - <listitem> - <para> - In <literal>\d</literal> patterns, always match <literal>$</literal> - literally (Tom) - </para> - </listitem> - - <listitem> - <para> - Add <literal>\prompt</literal> capability (Chad Wagner) - </para> - </listitem> - - <listitem> - <para> - Allow <literal>\pset</literal>, <literal>\t</literal>, and - <literal>\x</literal> to use <literal>on</>/<literal>off</>, - rather than just toggling (Chad Wagner) - </para> - </listitem> - - <listitem> - <para> - Add <literal>\sleep</> capability (Jan) - </para> - </listitem> - - <listitem> - <para> - Enable <literal>\timing</> output for <literal>\copy</> (Andrew) - </para> - </listitem> - - <listitem> - <para> - Improve <literal>\timing</literal> resolution on Windows - (Itagaki Takahiro) - </para> - </listitem> - - <listitem> - <para> - Flush <literal>\o</> output after each backslash command (Tom) - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title><link linkend="APP-PGDUMP"><application>pg_dump</></link> Changes</title> - <itemizedlist> - - <listitem> - <para> - Add <literal>--tablespaces-only</> and <literal>--roles-only</> - options to <application>pg_dumpall</application> (Dave Page) - </para> - </listitem> - - <listitem> - <para> - Add an output file option to - <application>pg_dumpall</application> (Dave Page) - </para> - - <para> - This is primarily useful on Windows, where output redirection of - child <application>pg_dump</application> processes does not work. - </para> - </listitem> - - <listitem> - <para> - Allow <application>pg_dumpall</> to accept an initial-connection - database name rather than the default - <literal>template1</literal> (Dave Page) - </para> - </listitem> - - <listitem> - <para> - In <literal>-n</> and <literal>-t</> switches, always match - <literal>$</literal> literally (Tom) - </para> - </listitem> - - <listitem> - <para> - Improve performance when a database has many thousands of objects (Tom) - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title>Other Client Application Changes</title> - <itemizedlist> - - <listitem> - <para> - In <application>initdb</>, allow the location of the - <filename>pg_xlog</filename> directory location to be specified - (Euler Taveira de Oliveira) - </para> - </listitem> - - <listitem> - <para> - Enable core dump generation in <application>pg_regress</> and - <application>pg_ctl</>, if possible (Andrew) - </para> - </listitem> - - <listitem> - <para> - Allow Control-C to cancel <application>clusterdb</>, - <application>reindexdb</>, and <application>vacuumdb</> (Itagaki - Takahiro, Magnus) - </para> - </listitem> - - <listitem> - <para> - Suppress command tag output for <application>createdb</>, - <application>createuser</>, <application>dropdb</>, - <application>dropuser</> (Peter) - </para> - - <para> - The <literal>--quiet</> option is ignored and will be removed in 8.4. - Progress messages when acting on all databases now go to stdout - instead of stderr because they are not actually errors. - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title><link linkend="libpq"><application>libpq</></link> Changes</title> - <itemizedlist> - - <listitem> - <para> - Interpret the <literal>dbName</> parameter of - <function>PQsetdbLogin()</> as a <literal>conninfo</> string if - it contains an equals sign (Andrew) - </para> - - <para> - This allows use of <literal>conninfo</> strings in client - programs that still use <literal>PQsetdbLogin()</>. - </para> - </listitem> - - <listitem> - <para> - Support a global <acronym>SSL</> configuration file (Victor - Wagner) - </para> - </listitem> - - <listitem> - <para> - Add environment variable <varname>PGSSLKEY</> to control - <acronym>SSL</> hardware keys (Victor Wagner) - </para> - </listitem> - - <listitem> - <para> - Add <function>lo_truncate()</function> for large object - truncation (Kris Jurka) - </para> - </listitem> - - <listitem> - <para> - Add <function>PQconnectionUsedPassword()</function> that returns - true if the server required a password (Joe Conway) - </para> - - <para> - If this returns true and the connection failed a client - application should prompt the user for a password. - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title><link linkend="ecpg"><application>ecpg</></link> Changes</title> - <itemizedlist> - - <listitem> - <para> - Major rewrite to use V3 frontend/backend protocol (Michael) - </para> - - <para> - This adds server-side prepared statements. - </para> - </listitem> - - <listitem> - <para> - Use native threads, instead of pthreads, on Windows (Magnus) - </para> - </listitem> - - <listitem> - <para> - Improve thread-safety of ecpglib (Itagaki Takahiro) - </para> - </listitem> - - <listitem> - <para> - Have ecpg libraries exporting only API symbols (Michael) - Win32 only? XXX - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title><application>Windows</> Port</title> - <itemizedlist> - - <listitem> - <para> - The backend database server can now be compiled with - <productname>Microsoft Visual C++</> (Magnus and others) - </para> - - <para> - Windows executables made with Visual C++ might have better - stability and performance than those made with other tool sets. - Development and debugging tools familiar to Windows developers - will also work. The client-only C++ build scripts have been - removed. - </para> - </listitem> - - <listitem> - <para> - Allow regression tests to be started by an <literal>admin</> - user (Magnus) - </para> - </listitem> - - <listitem> - <para> - Native shared memory implementation for Windows (Magnus) - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title>Source Code Changes</title> - <itemizedlist> - - <listitem> - <para> - New C macros for handling variable-length data values (Greg - Stark, Tom) - </para> - - <para> - The new <function>SET_VARSIZE()</> macro <emphasis>must</> be - used to set the length of generated values. Also, it might be - necessary to expand (<quote>de-TOAST</quote>) input values in - additional places. - </para> - </listitem> - - <listitem> - <para> - Rename macro <literal>DLLIMPORT</> to <literal>PGDLLIMPORT</> to - avoid conflicting with third party includes (like TCL) that - define DLLIMPORT (Magnus) - </para> - </listitem> - - <listitem> - <para> - Allow execution of cursor commands through - <function>SPI_execute</function> (Tom) - </para> - - <para> - The macro <literal>SPI_ERROR_CURSOR</> still exists but will - never be returned. - </para> - </listitem> - - <listitem> - <para> - SPI plan pointers are now <literal>SPIPlanPtr</> instead of - <literal>void *</> (Tom) - </para> - - <para> - This does not break application code, but switching is - recommended to help catch simple programming mistakes. - </para> - </listitem> - - <listitem> - <para> - Add cursor-related functionality in SPI (Pavel Stehule) - </para> - - <para> - Allow access to the cursor-related planning options, and add - <command>FETCH</>/<command>MOVE</> routines. - </para> - </listitem> - - <listitem> - <para> - Add <application>configure</> <literal>--enable-profiling</> - to enable code profiling (works only with <application>gcc</>) - (Korry Douglas and Nikhil S) - </para> - </listitem> - - <listitem> - <para> - Add <application>configure</> <literal>--with-system-tzdata</> - to use the operating system time zone database (Peter) - </para> - </listitem> - - <listitem> - <para> - Create <quote>operator families</quote> improve planning of - queries involving cross-data-type comparisons (Tom) - </para> - </listitem> - - <listitem> - <para> - Support <command>gmake draft</command> when building the - <acronym>SGML</> documentation (Bruce) - </para> - </listitem> - - <listitem> - <para> - Update GIN <function>extractQuery()</> API to allow signalling - that nothing can satisfy the query (Teodor) - </para> - </listitem> - - <listitem> - <para> - Move <literal>NAMEDATALEN</> definition from - <filename>postgres_ext.h</> to <filename>pg_config_manual.h</> - (Peter) - </para> - </listitem> - - <listitem> - <para> - Change server startup log message from <quote>database system is - ready</quote> to <quote>database system is ready to accept - connections</quote> - </para> - </listitem> - - <listitem> - <para> - Provide <function>strlcpy()</function> and - <function>strlcat()</function> on all platforms, and replace - error-prone uses of <function>strncpy()</function>, - <function>strncat()</function>, etc (Peter) - </para> - </listitem> - - <listitem> - <para> - Fix pgstats counting of live and dead tuples to recognize that - committed and aborted transactions have different effects (Tom) - </para> - </listitem> - - <listitem> - <para> - Create hooks to let a loadable plugin monitor (or even replace) the - planner and create plans for hypothetical situations (Gurjeet - Singh, Tom) - </para> - </listitem> - - <listitem> - <para> - Create a function variable <literal>join_search_hook</> to let plugins - override the join search order portion of the planner (Julius - Stroffek) - </para> - </listitem> - - <listitem> - <para> - Add tas() support for Renesas' M32R processor (Kazuhiro Inaoka) - </para> - </listitem> - - <listitem> - <para> - Have <function>quote_identifier()</function> and - <application>pg_dump</application> not quote keywords that are - unreserved according to the grammar (Tom) - </para> - </listitem> - - <listitem> - <para> - Fix <acronym>PGXS</> so extensions can be built against Postgres - installations whose <application>pg_config</> program does not - appear first in the <varname>PATH</> (Tom) - </para> - </listitem> - - <listitem> - <para> - Change the on-disk representation of the <type>NUMERIC</type> - data type so that the <structfield>sign_dscale</> word comes - before the weight (Tom) - </para> - </listitem> - - <listitem> - <para> - Use <acronym>SYSV</> semaphores rather than POSIX on Darwin - >= 6.0, i.e., OS X 10.2 and up (Chris Marcellino) - </para> - </listitem> - - </itemizedlist> - - </sect3> - - <sect3> - <title>Contrib Changes</title> - <itemizedlist> - - <listitem> - <para> - Add <filename>/contrib/pageinspect</filename> module for low-level - page inspection (Simon, Heikki) - </para> - </listitem> - - <listitem> - <para> - Add <filename>/contrib/pg_standby</filename> module for warm standby - operation (Simon) - </para> - </listitem> - - <listitem> - <para> - Add <filename>/contrib/uuid-ossp</filename> module for generating - <type>UUID</> values using the OSSP UUID library (Peter) - </para> - - <para> - Use <application>configure</> - <literal>--with-ossp-uuid</literal> to activate. This takes - advantage of the new <type>UUID</type> builtin type. - </para> - </listitem> - - <listitem> - <para> - Allow <application>pgbench</> to set the fillfactor (Pavan Deolasee) - </para> - </listitem> - - <listitem> - <para> - Add timestamps to <application>pgbench</> <literal>-l</> (Greg - Smith) - </para> - </listitem> - - <listitem> - <para> - Add usage count statistics to - <filename>contrib/pgbuffercache</filename> (Greg Smith) - </para> - </listitem> - - <listitem> - <para> - Add GIN support for <filename>hstore</> (Teodor) - </para> - </listitem> - - <listitem> - <para> - Add GIN support for <filename>pg_trgm</> (Guillaume Smet, Teodor) - </para> - </listitem> - - <listitem> - <para> - Update OS/X startup scripts in - <filename>/contrib/start-scripts</filename> (Mark Cotner, David - Fetter) - </para> - </listitem> - - <listitem> - <para> - Restrict <function>pgrowlocks()</function> and - <function>dblink_get_pkey()</function> to users who have - <literal>SELECT</literal> privilege on the target table (Tom) - </para> - </listitem> - - <listitem> - <para> - Restrict <filename>contrib/pgstattuple</filename> functions to - superusers (Tom) - </para> - </listitem> - - <listitem> - <para> - <filename>contrib/xml2</filename> is deprecated and planned for - removal in 8.4 (Peter) - </para> - - <para> - The new XML support in core Postgres supersedes this module. - </para> - </listitem> - - </itemizedlist> - - </sect3> - </sect2> - </sect1> + </listitem> + + <listitem> + <para> + Automatically invalidate cached function code when table + definitions change or statistics are updated (Tom) + </para> + + <para> + Previously PL/PgSQL functions that referenced temporary tables + would fail if the temporary table was dropped and recreated + between function invocations, unless <literal>EXECUTE</> was + used. + </para> + </listitem> + + <listitem> + <para> + Support Security Service Provider Interface (SSPI) + authentication on Windows (Magnus) + </para> + </listitem> + + <listitem> + <para> + Add support for GSSAPI authentication (Henry Hotz, Magnus) + </para> + </listitem> + + <listitem> + <para> + Support a global SSL configuration file (Victor Wagner) + </para> + </listitem> + + <listitem> + <para> + Add <varname>ssl_ciphers</> parameter to control accepted SSL ciphers + (Victor Wagner) + </para> + </listitem> + + <listitem> + <para> + Add new encodings EUC_JIS_2004 and SHIFT_JIS_2004, along with new + conversions between EUC_JIS_2004, SHIFT_JIS_2004 and UTF-8 (Tatsuo) + </para> + </listitem> + + <listitem> + <para> + Make JOHAB encoding client-only (Tatsuo) + </para> + + <para> + JOHAB cannot safely be used as a server-side encoding. + </para> + </listitem> + + <listitem> + <para> + Allow logfile creation in CSV format (Arul Shaji, Greg Smith, + Andrew Dunstan) + </para> + </listitem> + + <listitem> + <para> + Add <varname>log_autovacuum_min_duration</varname> parameter to + support configurable logging of autovacuum actions (Simon, Alvaro) + </para> + </listitem> + + <listitem> + <para> + Add <varname>log_lock_waits</varname> parameter to log long wait + times (Simon) + </para> + </listitem> + + <listitem> + <para> + Add <varname>log_temp_files</varname> parameter to log usage of + temporary files (Bill Moran) + </para> + </listitem> + + <listitem> + <para> + Add <varname>log_checkpoints</varname> parameter to improve logging + of checkpoints (Greg Smith, Heikki) + </para> + </listitem> + + <listitem> + <para> + <varname>log_line_prefix</varname> escapes <literal>%s</literal> + and <literal>%c</literal> can now be used in all processes + (Andrew) + </para> + </listitem> + + <listitem> + <para> + Use our own timezone support for formatting timestamps displayed in + the server log (Tom) + </para> + + <para> + This avoids Windows-specific problems with localized time zone + names that are in the wrong encoding. There is a new + <varname>log_timezone</> parameter that controls the timezone + used in log messages, independent of the client-visible + <varname>timezone</> parameter. + </para> + </listitem> + + <listitem> + <para> + Change the timestamps recorded in transaction WAL records from + time_t to TimestampTz representation (Tom) + </para> + + <para> + This provides sub-second resolution in WAL, which can be useful for + point-in-time recovery. + </para> + </listitem> + <listitem> + <para> + New boolean configuration parameter, <varname>archive_mode</>, + controls archiving (Simon) + </para> + + <para> + Previously setting <varname>archive_command</> to an empty + string turned off archiving. Now <varname>archive_mode</> turns + archiving on and off. This is useful for stopping archiving + temporarily. + </para> + </listitem> + + <listitem> + <para> + Improve ability to create warm standby servers using archiving + (Simon) + </para> + + <para> + Allow the warm standby server to pass the earliest needed WAL + file to the recovery script to allow automatic removal of + unneeded WAL files. This is done using + <varname>restore_command</varname> <literal>%r</> in + <filename>recovery.conf</filename>. + </para> + </listitem> + + <listitem> + <para> + Add <varname>log_restartpoints</varname> archive recovery option + to emit a log message at each recovery restart point (Simon) + </para> + </listitem> + + <listitem> + <para> + Last transaction end time is now logged at end of recovery and at + each logged restart point (Simon) + </para> + </listitem> + + <listitem> + <para> + Add a <varname>temp_tablespaces</varname> parameter to control + the tablespaces for temporary tables and files (Jaime Casanova, + Albert Cervera, Bernd Helmle) + </para> + + <para> + This parameters allows a list of tablespaces to be specified + which enables spreading the I/O load across multiple + tablespaces. A random tablespace is chosen each time a temporary + object is created. Temporary files are not stored in + per-database <filename>pgsql_tmp/</filename> directories anymore + but in per-tablespace directories. + </para> + </listitem> + + <listitem> + <para> + New system view <literal>pg_stat_bgwriter</literal> displays + statistics about the background writer activity (Magnus) + </para> + </listitem> + + <listitem> + <para> + Add new columns for database-wide tuple statistics to + <literal>pg_stat_database</literal> (Magnus) + </para> + </listitem> + + <listitem> + <para> + Add an <literal>xact_start</literal> column to + <literal>pg_stat_activity</literal> (Neil) + </para> + + <para> + This makes it easier to identify long-running transactions. + </para> + </listitem> + + <listitem> + <para> + Add <literal>n_live_tuples</> and <literal>n_dead_tuples</> columns + to <literal>pg_stat_all_tables</literal> and related views (Glen + Parker) + </para> + </listitem> + + <listitem> + <para> + Remove <varname>stats_start_collector</varname> parameter (Tom) + </para> + + <para> + We now always start the collector process, unless prevented by a + problem with setting up the stats UDP socket. + </para> + </listitem> + + <listitem> + <para> + Remove <varname>stats_reset_on_server_start</varname> parameter (Tom) + </para> + + <para> + This was removed because <function>pg_stat_reset()</function> + can be used for this purpose. + </para> + </listitem> + + <listitem> + <para> + Merge <varname>stats_block_level</> and <varname>stats_row_level</> + parameters into a single parameter <varname>track_counts</>, + which controls all messages sent to the collector process (Tom) + </para> + </listitem> + + <listitem> + <para> + Rename <varname>stats_command_string</varname> parameter to + <varname>track_activities</varname> (Tom) + </para> + </listitem> + + <listitem> + <para> + Limit the amount of information reported when a user is dropped + (Alvaro) + </para> + + <para> + Previously, dropping (or attempting to drop) a user who owned many + objects could result in extremely large <literal>NOTICE</literal> or + <literal>ERROR</literal> messages listing all these objects; this + caused problems for some client applications. The length of the + list is now limited, although a full list is still sent to the + server log. + </para> + </listitem> + + <listitem> + <para> + Arrange to put TOAST tables belonging to temporary tables into + special schemas named + <literal>pg_toast_temp_<replaceable>nnn</></literal> (Tom) + </para> + + <para> + This allows low-level code to recognize that these tables are + temporary, which enables various optimizations such as not + WAL-logging changes and using local rather than shared buffers + for access. This also fixes a bug where backends unexpectedly + held open file references to temporary tables. + </para> + </listitem> + + <listitem> + <para> + Fix problem that a constant flow of new connection requests could + indefinitely delay the postmaster from completing a shutdown or + crash restart (Tom) + </para> + </listitem> + + <listitem> + <para> + Allow <command>CREATE INDEX CONCURRENTLY</command> to ignore + transactions in other databases (Simon) + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title>Query Changes</title> + <itemizedlist> + + <listitem> + <para> + Text search capability is now in core Postgres (Teodor, Oleg) + </para> + + <para> + This features was previously in <filename>contrib/tsearch2</>. + It has been improved, moved into the server, and is now installed + by default. + </para> + </listitem> + + <listitem> + <para> + Control over whether <literal>NULL</>s sort first or last, using + <literal>ORDER BY ... NULLS FIRST/LAST</> (Teodor, Tom) + </para> + </listitem> + + <listitem> + <para> + Allow ascending/descending (<literal>ASC</>/<literal>DESC</>) + control during index creation (Teodor, Tom) + </para> + + <para> + Previously a query using <literal>ORDER BY</> with mixed + <literal>ASC</>/<literal>DESC</> specifiers could not fully use + an index. Now an index can be fully used in such cases if the + index was created with matching + <literal>ASC</>/<literal>DESC</> specifictions. + </para> + </listitem> + + <listitem> + <para> + Updatable cursors using <literal>UPDATE/DELETE WHERE CURRENT + OF</> (Arul Shaji, Tom) + </para> + + <para> + This eliminates the need to reference a primary key to update or + delete rows returned by a cursor. + </para> + </listitem> + + <listitem> + <para> + Allow <literal>FOR UPDATE</literal> in cursors (Arul Shaji, Tom) + </para> + </listitem> + + <listitem> + <para> + Create a general mechanism that supports casts to and from the + standard string types (<type>TEXT</type>, <type>VARCHAR</type>, + <type>CHAR</type>) for <emphasis>every</emphasis> datatype, by + invoking the datatype's I/O functions (Tom) + </para> + + <para> + XXX? bjm These new casts are assignment-only in the to-string direction, + explicit-only in the other, and therefore should create no + surprising behavior. Remove a bunch of thereby-obsoleted + datatype-specific casting functions. + </para> + </listitem> + + <listitem> + <para> + Allow <literal>col IS NULL</> to use an index (Teodor) + </para> + </listitem> + + <listitem> + <para> + Allow limited hashing when using two different data types (Tom) + </para> + + <para> + 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. + Current cross-data-type hashing support exists for + <type>SMALLINT</type>/<type>INTEGER</type>/<type>BIGINT</type>, + and for <type>FLOAT4</type>/<type>FLOAT8</type>. + </para> + </listitem> + + <listitem> + <para> + Improve optimizer logic for detecting when variables are equal + in a <literal>WHERE</> clause (Tom) + </para> + + <para> + This allows mergejoins to work with descending sort orders, and + improves recognition of redundant sort columns. + </para> + </listitem> + + <listitem> + <para> + Improve performance when planning large inheritance trees when + most tables are excluded by constraints (Tom) + </para> + </listitem> + + <listitem> + <para> + Remove the undocumented <literal>!!=</> (not in) operator (Tom) + </para> + + <para> + <literal>NOT IN (SELECT ...)</literal> is the proper way to + perform this operation. + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title>Object Manipulation Changes</title> + <itemizedlist> + + <listitem> + + <para> + Support arrays of composite types (David Fetter, Andrew, Tom) + </para> + + <para> + Arrays of rowtypes of regular tables and views are now + supported, but not for system catalogs, sequences, or TOAST + tables. + </para> + + </listitem> + + <listitem> + <para> + Server configuration parameters can now be set on a per-function + basis (Tom) + </para> + + <para> + For example, functions can now set their own + <varname>search_path</> to prevent unexpected behavior if a + different <varname>search_path</> exists at run-time. Security + definer functions should set <varname>search_path</varname> to + avoid security loopholes. + </para> + </listitem> + + <listitem> + <para> + Add <literal>COST</literal> and <literal>ROWS</literal> options to + <command>CREATE/ALTER FUNCTION</command> (Tom) + </para> + + <para> + This allows simple control of the estimated cost of a function + call and control over the estimated number of rows returned by a + set-returning function. + </para> + </listitem> + + <listitem> + <para> + Allow triggers and rules to be deactivated in groups using a + session variable, for replication purposes (Jan) + </para> + + <para> + This allows replication systems to disable triggers and rewrite + rules as a group without modifying the system catalogs directly. + The behavior is controlled by <command>ALTER TABLE</> and a new + parameter <varname>session_replication_role</varname>. + </para> + + <para> + <application>psql</application>'s <literal>\d</literal> command + and <application>pg_dump</application> have been enhanced + </para> + </listitem> + + <listitem> + <para> + User-defined types can now have type modifiers (Teodor, Tom) + </para> + + <para> + This allows a user type to take a modifier when + being created, e.g. <type>SSNUM(7)</>. Previously only + predefined system data types would allow this, e.g. + <type>CHAR(4)</>. + </para> + </listitem> + + <listitem> + <para> + Foreign keys now must match indexable conditions for + cross-data-type references (Tom) + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title>Utility Command Changes</title> + <itemizedlist> + + <listitem> + <para> + Non-superuser database owners now have privileges to add trusted + procedural languages in their databases by default (Jeremy Drake) + </para> + + <para> + While this is reasonably safe, some administrators may wish to + revoke the privilege. It is controlled by + <structname>pg_pltemplate</>.<structfield>tmpldbacreate</>. + </para> + </listitem> + + <listitem> + <para> + Allow a session's current parameter setting to be used as the + default for future sessions (Tom) + </para> + + <para> + This is done with <literal>SET ... FROM CURRENT</literal> in + <command>CREATE/ALTER FUNCTION</command>, <command>ALTER + DATABASE</command>, or <command>ALTER ROLE</command>. + </para> + </listitem> + + <listitem> + <para> + Implement new commands <command>DISCARD ALL</command>, + <command>DISCARD PLANS</command>, <command>DISCARD + TEMPORARY</command>, <command>CLOSE ALL</command>, and + <command>DEALLOCATE ALL</command> (Marko Kreen, Neil) + </para> + + <para> + These commands simplify resetting a database session to its initial + state, and are particularly useful for connection-pooling software. + </para> + </listitem> + + <listitem> + <para> + Allow <command>ALTER VIEW ... RENAME TO</command> and <command>ALTER + SEQUENCE ... RENAME TO</command> (David Fetter, Neil) + </para> + + <para> + Previously this could only be done via <command>ALTER TABLE ... + RENAME TO</command>. + </para> + </listitem> + + <listitem> + <para> + Implement <command>CREATE TABLE LIKE ... INCLUDING + INDEXES</command> (Trevor Hardcastle, Nikhil S, Neil) + </para> + </listitem> + + <listitem> + <para> + Make <command>CLUSTER</command> MVCC-safe (Heikki Linnakangas) + </para> + + <para> + Formerly, <command>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 visibility rules. + </para> + </listitem> + + <listitem> + <para> + Add new syntax for <command>CLUSTER</command>: <literal>CLUSTER + <replaceable>table</> USING <replaceable>index</></literal> + (Holger Schurig) + </para> + + <para> + The old <command>CLUSTER</command> syntax is still supported, but + the new form is considered more logical. + </para> + </listitem> + + <listitem> + <para> + Fix <command>EXPLAIN</command> so it can show more complex plans (Tom) + </para> + </listitem> + + <listitem> + <para> + Make CREATE/DROP/RENAME DATABASE wait briefly for other backends + to exit before failing (Tom) + </para> + + <para> + This increases the likelihood that these commands will succeed. + </para> + </listitem> + + <listitem> + <para> + Prevent <command>NOTIFY</command>/<command>LISTEN</command>/<command>UNLISTEN</command> + from accepting schema-qualified names (Bruce) + </para> + + <para> + Formerly, these commands accepted <quote>schema.relation</> but + ignored the schema part, which was confusing. + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title>Data Type and Function Changes</title> + <itemizedlist> + + <listitem> + <para> + Support for the SQL/XML standard, including new operators and a + new <type>XML</type> builtin type (Nikolay Samokhvalov, Peter) + </para> + </listitem> + + <listitem> + <para> + Support for enumerated data types (<type>ENUM</type>) (Tom Dunstan) + </para> + + <para> + This is accomplished by creating a new data type with an + <literal>ENUM</> clause, e.g. + <literal>CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy')</>. + </para> + </listitem> + + <listitem> + <para> + Universally Unique Identifier (<type>UUID</>) data type, similar + to that defined by RFC 4122 (Gevik Babakhani, Neil) + </para> + </listitem> + + <listitem> + <para> + Widen the <type>MONEY</type> data type to 64 bits (D'Arcy Cain) + </para> + + <para> + This greatly increases the range of supported <type>MONEY</> + values. + </para> + </listitem> + + <listitem> + <para> + Add new regexp functions <function>regexp_matches()</function>, + <function>regexp_split_to_array()</function>, and + <function>regexp_split_to_table()</function> (Jeremy Drake, Neil) + </para> + + <para> + These functions provide access to the regex groups, + <literal>\(.*\)</> , and allows splitting a string on a POSIX + regular expression. + </para> + </listitem> + + <listitem> + <para> + Add <function>lo_truncate()</function> function for large object + truncation (Kris Jurka) + </para> + </listitem> + + <listitem> + <para> + Implement <function>width_bucket()</function> for the float8 data + type (Neil) + </para> + </listitem> + + <listitem> + <para> + Add <function>pg_stat_clear_snapshot()</function> to discard + statistics snapshots collected during the current transaction + (Tom) + </para> + + <para> + The first request for statistics in a transaction takes a + statistics snapshot that doesn't change during the transaction. + This function allows the snapshot to be discarded and a new + snapshot loaded during the next statistics query. This is + particularly useful for PL/PgSQL functions which are confined to + a single transaction. + </para> + </listitem> + + <listitem> + <para> + Add <literal>isodow</> option to <function>EXTRACT()</> and + <function>date_part()</> (Bruce) + </para> + + <para> + This is the day of the week, with Sunday as seven. + (<literal>dow</> returns Sunday as zero.) + </para> + </listitem> + + <listitem> + <para> + Add <literal>ID</> (ISO day of week) and <literal>IDDD</> (ISO + day of year) format types for <function>to_char()</>, + <function>to_date()</> and <function>to_timestamp()</> (Brendan + Jurd) + </para> + </listitem> + + <listitem> + <para> + Make <function>to_timestamp()</> and <function>to_date()</> + assume <quote>TM</quote> (trim) for potentially variable-width + fields (Bruce) + </para> + + <para> + This matches Oracle behavior. + </para> + </listitem> + + <listitem> + <para> + Fix off-by-one conversion in to_date()/to_timestamp() 'D' fields + (Bruce) + </para> + </listitem> + + <listitem> + <para> + Fix <type>float4</type>/<type>float8</type> to handle + <literal>Infinity</> and <literal>NAN</> (not a number) + consistently (Bruce) + </para> + + <para> + The code formerly was not consistent about distinguishing + <literal>Infinity</> from overflow conditions. + </para> + </listitem> + + <listitem> + <para> + Make <function>setseed()</function> return void, rather than a + useless integer value (Neil) + </para> + </listitem> + + <listitem> + <para> + Add a hash function for <type>NUMERIC</type> (Neil) + </para> + + <para> + This allows hash indexes and hash-based plans to be used with + <type>NUMERIC</type>. + </para> + </listitem> + + <listitem> + <para> + Improve efficiency of + <literal>LIKE</literal>/<literal>ILIKE</literal>, especially for + multi-byte character sets like UTF8 (Andrew, Itagaki Takahiro) + </para> + </listitem> + + <listitem> + <para> + Allow leading and trailing whitespace for <type>BOOLEAN</type> + values (Neil) + </para> + </listitem> + + <listitem> + <para> + Make <function>currtid()</function> functions require + <literal>SELECT</literal> privileges on the target table (Tom) + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title>PL/PgSQL Server-Side Language Changes</title> + <itemizedlist> + + <listitem> + <para> + Add scrollable cursor support by adding directional control to + PL/PgSQL's <command>FETCH</command> (Pavel Stehule) + </para> + </listitem> + + <listitem> + <para> + Add support for <literal>IN</literal> as an alternative to + <literal>FROM</literal> in PL/PgSQL's <command>FETCH</command> + statement, for consistency with the backend's + <command>FETCH</command> command (Pavel Stehule) + </para> + </listitem> + + <listitem> + <para> + Add <command>MOVE</command> to PL/PgSQL (Magnus, Pavel Stehule, + Neil) + </para> + </listitem> + + <listitem> + <para> + Implement <command>RETURN QUERY</command> (Pavel Stehule, Neil) + </para> + + <para> + This adds convenient syntax for PL/PgSQL set-returning functions + that want to return the result of a query, rather than using + <command>RETURN NEXT</command>. <command>RETURN QUERY</command> + is more efficient too. + </para> + </listitem> + + <listitem> + <para> + Allow function parameter names to be qualified with the + function's name(Tom) + </para> + + <para> + For example, <literal>myfunc.myvar</>. This is particularly + useful for specifying variables in a query where the variable + name might match a column name. + </para> + </listitem> + + <listitem> + <para> + Tighten requirements for <literal>FOR</literal> loop + <literal>STEP</> values (Tom) + </para> + + <para> + Prevent non-positive <literal>STEP</> values, and handle + loop overflows. + </para> + + </listitem> + + <listitem> + <para> + Improve accuracy when reporting syntax error locations (Tom) + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title>PL/Perl Server-Side Language Changes</title> + <itemizedlist> + + <listitem> + <para> + Allow type-name arguments to <function>spi_prepare()</function> to + be data type aliases in addition to names in + <literal>pg_type</literal> (Andrew) + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title>PL/Python Server-Side Language Changes</title> + <itemizedlist> + + <listitem> + <para> + Enable PL/PythonU to compile on Python 2.5 (Marko Kreen) + </para> + </listitem> + + <listitem> + <para> + Allow type-name arguments to <function>plpy.prepare()</function> to + be data type aliases in addition to names in + <literal>pg_type</literal> (Andrew) + </para> + </listitem> + + <listitem> + <para> + Support a true boolean type in compatible Python versions + (Python 2.3 and later) (Marko Kreen) + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title>PL/Tcl Server-Side Language Changes</title> + <itemizedlist> + + <listitem> + <para> + Allow type-name arguments to <function>spi_prepare</> to + be data type aliases in addition to names in + <literal>pg_type</literal> (Andrew) + </para> + </listitem> + + <listitem> + <para> + Fix problems with thread-enabled <filename>libtcl</> spawning + multiple threads within the backend (Steve Marshall, Paul Bayer, + Doug Knight) + </para> + + <para> + This caused all sorts of unpleasantness. + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title><link linkend="APP-PSQL"><application>psql</></link> Changes</title> + <itemizedlist> + + <listitem> + <para> + List disabled triggers separately in <literal>\d</literal> output + (Brendan Jurd) + </para> + </listitem> + + <listitem> + <para> + Show aggregate return types in <literal>\da</literal> output + (Greg Sabino Mullane) + </para> + </listitem> + + <listitem> + <para> + Add the function's volatility to the output of + <literal>\df+</literal> (Neil) + </para> + </listitem> + + <listitem> + <para> + In <literal>\d</literal> patterns, always match <literal>$</literal> + literally (Tom) + </para> + </listitem> + + <listitem> + <para> + Add <literal>\prompt</literal> capability (Chad Wagner) + </para> + </listitem> + + <listitem> + <para> + Allow <literal>\pset</literal>, <literal>\t</literal>, and + <literal>\x</literal> to use <literal>on</>/<literal>off</>, + rather than just toggling (Chad Wagner) + </para> + </listitem> + + <listitem> + <para> + Add <literal>\sleep</> capability (Jan) + </para> + </listitem> + + <listitem> + <para> + Enable <literal>\timing</> output for <literal>\copy</> (Andrew) + </para> + </listitem> + + <listitem> + <para> + Improve <literal>\timing</literal> resolution on Windows + (Itagaki Takahiro) + </para> + </listitem> + + <listitem> + <para> + Flush <literal>\o</> output after each backslash command (Tom) + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title><link linkend="APP-PGDUMP"><application>pg_dump</></link> Changes</title> + <itemizedlist> + + <listitem> + <para> + Add <literal>--tablespaces-only</> and <literal>--roles-only</> + options to <application>pg_dumpall</application> (Dave Page) + </para> + </listitem> + + <listitem> + <para> + Add an output file option to + <application>pg_dumpall</application> (Dave Page) + </para> + + <para> + This is primarily useful on Windows, where output redirection of + child <application>pg_dump</application> processes does not work. + </para> + </listitem> + + <listitem> + <para> + Allow <application>pg_dumpall</> to accept an initial-connection + database name rather than the default + <literal>template1</literal> (Dave Page) + </para> + </listitem> + + <listitem> + <para> + In <literal>-n</> and <literal>-t</> switches, always match + <literal>$</literal> literally (Tom) + </para> + </listitem> + + <listitem> + <para> + Improve performance when a database has many thousands of objects (Tom) + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title>Other Client Application Changes</title> + <itemizedlist> + + <listitem> + <para> + In <application>initdb</>, allow the location of the + <filename>pg_xlog</filename> directory location to be specified + (Euler Taveira de Oliveira) + </para> + </listitem> + + <listitem> + <para> + Enable core dump generation in <application>pg_regress</> and + <application>pg_ctl</>, if possible (Andrew) + </para> + </listitem> + + <listitem> + <para> + Allow Control-C to cancel <application>clusterdb</>, + <application>reindexdb</>, and <application>vacuumdb</> (Itagaki + Takahiro, Magnus) + </para> + </listitem> + + <listitem> + <para> + Suppress command tag output for <application>createdb</>, + <application>createuser</>, <application>dropdb</>, + <application>dropuser</> (Peter) + </para> + + <para> + The <literal>--quiet</> option is ignored and will be removed in 8.4. + Progress messages when acting on all databases now go to stdout + instead of stderr because they are not actually errors. + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title><link linkend="libpq"><application>libpq</></link> Changes</title> + <itemizedlist> + + <listitem> + <para> + Interpret the <literal>dbName</> parameter of + <function>PQsetdbLogin()</> as a <literal>conninfo</> string if + it contains an equals sign (Andrew) + </para> + + <para> + This allows use of <literal>conninfo</> strings in client + programs that still use <literal>PQsetdbLogin()</>. + </para> + </listitem> + + <listitem> + <para> + Support a global <acronym>SSL</> configuration file (Victor + Wagner) + </para> + </listitem> + + <listitem> + <para> + Add environment variable <varname>PGSSLKEY</> to control + <acronym>SSL</> hardware keys (Victor Wagner) + </para> + </listitem> + + <listitem> + <para> + Add <function>lo_truncate()</function> for large object + truncation (Kris Jurka) + </para> + </listitem> + + <listitem> + <para> + Add <function>PQconnectionUsedPassword()</function> that returns + true if the server required a password (Joe Conway) + </para> + + <para> + If this returns true and the connection failed a client + application should prompt the user for a password. + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title><link linkend="ecpg"><application>ecpg</></link> Changes</title> + <itemizedlist> + + <listitem> + <para> + Major rewrite to use V3 frontend/backend protocol (Michael) + </para> + + <para> + This adds server-side prepared statements. + </para> + </listitem> + + <listitem> + <para> + Use native threads, instead of pthreads, on Windows (Magnus) + </para> + </listitem> + + <listitem> + <para> + Improve thread-safety of ecpglib (Itagaki Takahiro) + </para> + </listitem> + + <listitem> + <para> + Have ecpg libraries exporting only API symbols (Michael) + Win32 only? XXX + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title><application>Windows</> Port</title> + <itemizedlist> + + <listitem> + <para> + The backend database server can now be compiled with + <productname>Microsoft Visual C++</> (Magnus and others) + </para> + + <para> + Windows executables made with Visual C++ might have better + stability and performance than those made with other tool sets. + Development and debugging tools familiar to Windows developers + will also work. The client-only C++ build scripts have been + removed. + </para> + </listitem> + + <listitem> + <para> + Allow regression tests to be started by an <literal>admin</> + user (Magnus) + </para> + </listitem> + + <listitem> + <para> + Native shared memory implementation for Windows (Magnus) + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title>Source Code Changes</title> + <itemizedlist> + + <listitem> + <para> + Rename macro <literal>DLLIMPORT</> to <literal>PGDLLIMPORT</> to + avoid conflicting with third party includes (like TCL) that + define DLLIMPORT (Magnus) + </para> + </listitem> + + <listitem> + <para> + Allow execution of cursor commands through + <function>SPI_execute</function> (Tom) + </para> + + <para> + The macro <literal>SPI_ERROR_CURSOR</> still exists but will + never be returned. + </para> + </listitem> + + <listitem> + <para> + SPI plan pointers are now <literal>SPIPlanPtr</> instead of + <literal>void *</> (Tom) + </para> + + <para> + This does not break application code, but switching is + recommended to help catch simple programming mistakes. + </para> + </listitem> + + <listitem> + <para> + Add cursor-related functionality in SPI (Pavel Stehule) + </para> + + <para> + Allow access to the cursor-related planning options, and add + <command>FETCH</>/<command>MOVE</> routines. + </para> + </listitem> + + <listitem> + <para> + Add <application>configure</> <literal>--enable-profiling</> + to enable code profiling (works only with <application>gcc</>) + (Korry Douglas and Nikhil S) + </para> + </listitem> + + <listitem> + <para> + Add <application>configure</> <literal>--with-system-tzdata</> + to use the operating system time zone database (Peter) + </para> + </listitem> + + <listitem> + <para> + Create <quote>operator families</quote> improve planning of + queries involving cross-data-type comparisons (Tom) + </para> + </listitem> + + <listitem> + <para> + Support <command>gmake draft</command> when building the + <acronym>SGML</> documentation (Bruce) + </para> + </listitem> + + <listitem> + <para> + Update GIN <function>extractQuery()</> API to allow signalling + that nothing can satisfy the query (Teodor) + </para> + </listitem> + + <listitem> + <para> + Move <literal>NAMEDATALEN</> definition from + <filename>postgres_ext.h</> to <filename>pg_config_manual.h</> + (Peter) + </para> + </listitem> + + <listitem> + <para> + Change server startup log message from <quote>database system is + ready</quote> to <quote>database system is ready to accept + connections</quote> + </para> + </listitem> + + <listitem> + <para> + Provide <function>strlcpy()</function> and + <function>strlcat()</function> on all platforms, and replace + error-prone uses of <function>strncpy()</function>, + <function>strncat()</function>, etc (Peter) + </para> + </listitem> + + <listitem> + <para> + Fix pgstats counting of live and dead tuples to recognize that + committed and aborted transactions have different effects (Tom) + </para> + </listitem> + + <listitem> + <para> + Create hooks to let a loadable plugin monitor (or even replace) the + planner and create plans for hypothetical situations (Gurjeet + Singh, Tom) + </para> + </listitem> + + <listitem> + <para> + Create a function variable <literal>join_search_hook</> to let plugins + override the join search order portion of the planner (Julius + Stroffek) + </para> + </listitem> + + <listitem> + <para> + Add tas() support for Renesas' M32R processor (Kazuhiro Inaoka) + </para> + </listitem> + + <listitem> + <para> + Have <function>quote_identifier()</function> and + <application>pg_dump</application> not quote keywords that are + unreserved according to the grammar (Tom) + </para> + </listitem> + + <listitem> + <para> + Fix <acronym>PGXS</> so extensions can be built against Postgres + installations whose <application>pg_config</> program does not + appear first in the <varname>PATH</> (Tom) + </para> + </listitem> + + <listitem> + <para> + Change the on-disk representation of the <type>NUMERIC</type> + data type so that the <structfield>sign_dscale</> word comes + before the weight (Tom) + </para> + </listitem> + + <listitem> + <para> + Use <acronym>SYSV</> semaphores rather than POSIX on Darwin + >= 6.0, i.e., OS X 10.2 and up (Chris Marcellino) + </para> + </listitem> + + </itemizedlist> + + </sect3> + + <sect3> + <title>Contrib Changes</title> + <itemizedlist> + + <listitem> + <para> + Add <filename>/contrib/pageinspect</filename> module for low-level + page inspection (Simon, Heikki) + </para> + </listitem> + + <listitem> + <para> + Add <filename>/contrib/pg_standby</filename> module for warm standby + operation (Simon) + </para> + </listitem> + + <listitem> + <para> + Add <filename>/contrib/uuid-ossp</filename> module for generating + <type>UUID</> values using the OSSP UUID library (Peter) + </para> + + <para> + Use <application>configure</> + <literal>--with-ossp-uuid</literal> to activate. This takes + advantage of the new <type>UUID</type> builtin type. + </para> + </listitem> + + <listitem> + <para> + Allow <application>pgbench</> to set the fillfactor (Pavan Deolasee) + </para> + </listitem> + + <listitem> + <para> + Add timestamps to <application>pgbench</> <literal>-l</> (Greg + Smith) + </para> + </listitem> + + <listitem> + <para> + Add usage count statistics to + <filename>contrib/pgbuffercache</filename> (Greg Smith) + </para> + </listitem> + + <listitem> + <para> + Add GIN support for <filename>hstore</> (Teodor) + </para> + </listitem> + + <listitem> + <para> + Add GIN support for <filename>pg_trgm</> (Guillaume Smet, Teodor) + </para> + </listitem> + + <listitem> + <para> + Update OS/X startup scripts in + <filename>/contrib/start-scripts</filename> (Mark Cotner, David + Fetter) + </para> + </listitem> + + <listitem> + <para> + Restrict <function>pgrowlocks()</function> and + <function>dblink_get_pkey()</function> to users who have + <literal>SELECT</literal> privilege on the target table (Tom) + </para> + </listitem> + + <listitem> + <para> + Restrict <filename>contrib/pgstattuple</filename> functions to + superusers (Tom) + </para> + </listitem> + + <listitem> + <para> + <filename>contrib/xml2</filename> is deprecated and planned for + removal in 8.4 (Peter) + </para> + + <para> + The new XML support in core Postgres supersedes this module. + </para> + </listitem> + + </itemizedlist> + + </sect3> + </sect2> + </sect1> <sect1 id="release-8-2-5"> <title>Release 8.2.5</title>