E.142. Release 7.4

Release date: 2003-11-17

E.142.1. Overview

Major changes in this release:

IN / NOT IN subqueries are now much more efficient

In previous releases, IN/NOT IN subqueries were joined to the upper query by sequentially scanning the subquery looking for a match. The 7.4 code uses the same sophisticated techniques used by ordinary joins and so is much faster. An IN will now usually be as fast as or faster than an equivalent EXISTS subquery; this reverses the conventional wisdom that applied to previous releases.

Improved GROUP BY processing by using hash buckets

In previous releases, rows to be grouped had to be sorted first. The 7.4 code can do GROUP BY without sorting, by accumulating results into a hash table with one entry per group. It will still use the sort technique, however, if the hash table is estimated to be too large to fit in sort_mem.

New multikey hash join capability

In previous releases, hash joins could only occur on single keys. This release allows multicolumn hash joins.

Queries using the explicit JOIN syntax are now better optimized

Prior releases evaluated queries using the explicit JOIN syntax only in the order implied by the syntax. 7.4 allows full optimization of these queries, meaning the optimizer considers all possible join orderings and chooses the most efficient. Outer joins, however, must still follow the declared ordering.

Faster and more powerful regular expression code

The entire regular expression module has been replaced with a new version by Henry Spencer, originally written for Tcl. The code greatly improves performance and supports several flavors of regular expressions.

Function-inlining for simple SQL functions

Simple SQL functions can now be inlined by including their SQL in the main query. This improves performance by eliminating per-call overhead. That means simple SQL functions now behave like macros.

Full support for IPv6 connections and IPv6 address data types

Previous releases allowed only IPv4 connections, and the IP data types only supported IPv4 addresses. This release adds full IPv6 support in both of these areas.

Major improvements in SSL performance and reliability

Several people very familiar with the SSL API have overhauled our SSL code to improve SSL key negotiation and error recovery.

Make free space map efficiently reuse empty index pages, and other free space management improvements

In previous releases, B-tree index pages that were left empty because of deleted rows could only be reused by rows with index values similar to the rows originally indexed on that page. In 7.4, VACUUM records empty index pages and allows them to be reused for any future index rows.

SQL-standard information schema

The information schema provides a standardized and stable way to access information about the schema objects defined in a database.

Cursors conform more closely to the SQL standard

The commands FETCH and MOVE have been overhauled to conform more closely to the SQL standard.

Cursors can exist outside transactions

These cursors are also called holdable cursors.

New client-to-server protocol

The new protocol adds error codes, more status information, faster startup, better support for binary data transmission, parameter values separated from SQL commands, prepared statements available at the protocol level, and cleaner recovery from COPY failures. The older protocol is still supported by both server and clients.

libpq and ECPG applications are now fully thread-safe

While previous libpq releases already supported threads, this release improves thread safety by fixing some non-thread-safe code that was used during database connection startup. The configure option --enable-thread-safety must be used to enable this feature.

New version of full-text indexing

A new full-text indexing suite is available in contrib/tsearch2.

New autovacuum tool

The new autovacuum tool in contrib/autovacuum monitors the database statistics tables for INSERT/UPDATE/DELETE activity and automatically vacuums tables when needed.

Array handling has been improved and moved into the server core

Many array limitations have been removed, and arrays behave more like fully-supported data types.

E.142.2. Migration to Version 7.4

A dump/restore using pg_dump is required for those wishing to migrate data from any previous release.

Observe the following incompatibilities:

E.142.3. Changes

Below you will find a detailed account of the changes between release 7.4 and the previous major release.

E.142.3.1. Server Operation Changes

  • Allow IPv6 server connections (Nigel Kukard, Johan Jordaan, Bruce, Tom, Kurt Roeckx, Andrew Dunstan)

  • Fix SSL to handle errors cleanly (Nathan Mueller)

    In prior releases, certain SSL API error reports were not handled correctly. This release fixes those problems.

  • SSL protocol security and performance improvements (Sean Chittenden)

    SSL key renegotiation was happening too frequently, causing poor SSL performance. Also, initial key handling was improved.

  • Print lock information when a deadlock is detected (Tom)

    This allows easier debugging of deadlock situations.

  • Update /tmp socket modification times regularly to avoid their removal (Tom)

    This should help prevent /tmp directory cleaner administration scripts from removing server socket files.

  • Enable PAM for Mac OS X (Aaron Hillegass)

  • Make B-tree indexes fully WAL-safe (Tom)

    In prior releases, under certain rare cases, a server crash could cause B-tree indexes to become corrupt. This release removes those last few rare cases.

  • Allow B-tree index compaction and empty page reuse (Tom)

  • Fix inconsistent index lookups during split of first root page (Tom)

    In prior releases, when a single-page index split into two pages, there was a brief period when another database session could miss seeing an index entry. This release fixes that rare failure case.

  • Improve free space map allocation logic (Tom)

  • Preserve free space information between server restarts (Tom)

    In prior releases, the free space map was not saved when the postmaster was stopped, so newly started servers had no free space information. This release saves the free space map, and reloads it when the server is restarted.

  • Add start time to pg_stat_activity (Neil)

  • New code to detect corrupt disk pages; erase with zero_damaged_pages (Tom)

  • New client/server protocol: faster, no username length limit, allow clean exit from COPY (Tom)

  • Add transaction status, table ID, column ID to client/server protocol (Tom)

  • Add binary I/O to client/server protocol (Tom)

  • Remove autocommit server setting; move to client applications (Tom)

  • New error message wording, error codes, and three levels of error detail (Tom, Joe, Peter)

E.142.3.2. Performance Improvements

  • Add hashing for GROUP BY aggregates (Tom)

  • Make nested-loop joins be smarter about multicolumn indexes (Tom)

  • Allow multikey hash joins (Tom)

  • Improve constant folding (Tom)

  • Add ability to inline simple SQL functions (Tom)

  • Reduce memory usage for queries using complex functions (Tom)

    In prior releases, functions returning allocated memory would not free it until the query completed. This release allows the freeing of function-allocated memory when the function call completes, reducing the total memory used by functions.

  • Improve GEQO optimizer performance (Tom)

    This release fixes several inefficiencies in the way the GEQO optimizer manages potential query paths.

  • Allow IN/NOT IN to be handled via hash tables (Tom)

  • Improve NOT IN (subquery) performance (Tom)

  • Allow most IN subqueries to be processed as joins (Tom)

  • Pattern matching operations can use indexes regardless of locale (Peter)

    There is no way for non-ASCII locales to use the standard indexes for LIKE comparisons. This release adds a way to create a special index for LIKE.

  • Allow the postmaster to preload libraries using preload_libraries (Joe)

    For shared libraries that require a long time to load, this option is available so the library can be preloaded in the postmaster and inherited by all database sessions.

  • Improve optimizer cost computations, particularly for subqueries (Tom)

  • Avoid sort when subquery ORDER BY matches upper query (Tom)

  • Deduce that WHERE a.x = b.y AND b.y = 42 also means a.x = 42 (Tom)

  • Allow hash/merge joins on complex joins (Tom)

  • Allow hash joins for more data types (Tom)

  • Allow join optimization of explicit inner joins, disable with join_collapse_limit (Tom)

  • Add parameter from_collapse_limit to control conversion of subqueries to joins (Tom)

  • Use faster and more powerful regular expression code from Tcl (Henry Spencer, Tom)

  • Use bit-mapped relation sets in the optimizer (Tom)

  • Improve connection startup time (Tom)

    The new client/server protocol requires fewer network packets to start a database session.

  • Improve trigger/constraint performance (Stephan)

  • Improve speed of col IN (const, const, const, ...) (Tom)

  • Fix hash indexes which were broken in rare cases (Tom)

  • Improve hash index concurrency and speed (Tom)

    Prior releases suffered from poor hash index performance, particularly for high concurrency situations. This release fixes that, and the development group is interested in reports comparing B-tree and hash index performance.

  • Align shared buffers on 32-byte boundary for copy speed improvement (Manfred Spraul)

    Certain CPU's perform faster data copies when addresses are 32-byte aligned.

  • Data type numeric reimplemented for better performance (Tom)

    numeric used to be stored in base 100. The new code uses base 10000, for significantly better performance.

E.142.3.3. Server Configuration Changes

  • Rename server parameter server_min_messages to log_min_messages (Bruce)

    This was done so most parameters that control the server logs begin with log_.

  • Rename show_*_stats to log_*_stats (Bruce)

  • Rename show_source_port to log_source_port (Bruce)

  • Rename hostname_lookup to log_hostname (Bruce)

  • Add checkpoint_warning to warn of excessive checkpointing (Bruce)

    In prior releases, it was difficult to determine if checkpoint was happening too frequently. This feature adds a warning to the server logs when excessive checkpointing happens.

  • New read-only server parameters for localization (Tom)

  • Change debug server log messages to output as DEBUG rather than LOG (Bruce)

  • Prevent server log variables from being turned off by non-superusers (Bruce)

    This is a security feature so non-superusers cannot disable logging that was enabled by the administrator.

  • log_min_messages/client_min_messages now controls debug_* output (Bruce)

    This centralizes client debug information so all debug output can be sent to either the client or server logs.

  • Add Mac OS X Rendezvous server support (Chris Campbell)

    This allows Mac OS X hosts to query the network for available PostgreSQL servers.

  • Add ability to print only slow statements using log_min_duration_statement (Christopher)

    This is an often requested debugging feature that allows administrators to see only slow queries in their server logs.

  • Allow pg_hba.conf to accept netmasks in CIDR format (Andrew Dunstan)

    This allows administrators to merge the host IP address and netmask fields into a single CIDR field in pg_hba.conf.

  • New read-only parameter is_superuser (Tom)

  • New parameter log_error_verbosity to control error detail (Tom)

    This works with the new error reporting feature to supply additional error information like hints, file names and line numbers.

  • postgres --describe-config now dumps server config variables (Aizaz Ahmed, Peter)

    This option is useful for administration tools that need to know the configuration variable names and their minimums, maximums, defaults, and descriptions.

  • Add new columns in pg_settings: context, type, source, min_val, max_val (Joe)

  • Make default shared_buffers 1000 and max_connections 100, if possible (Tom)

    Prior versions defaulted to 64 shared buffers so PostgreSQL would start on even very old systems. This release tests the amount of shared memory allowed by the platform and selects more reasonable default values if possible. Of course, users are still encouraged to evaluate their resource load and size shared_buffers accordingly.

  • New pg_hba.conf record type hostnossl to prevent SSL connections (Jon Jensen)

    In prior releases, there was no way to prevent SSL connections if both the client and server supported SSL. This option allows that capability.

  • Remove parameter geqo_random_seed (Tom)

  • Add server parameter regex_flavor to control regular expression processing (Tom)

  • Make pg_ctl better handle nonstandard ports (Greg)

E.142.3.4. Query Changes

  • New SQL-standard information schema (Peter)

  • Add read-only transactions (Peter)

  • Print key name and value in foreign-key violation messages (Dmitry Tkach)

  • Allow users to see their own queries in pg_stat_activity (Kevin Brown)

    In prior releases, only the superuser could see query strings using pg_stat_activity. Now ordinary users can see their own query strings.

  • Fix aggregates in subqueries to match SQL standard (Tom)

    The SQL standard says that an aggregate function appearing within a nested subquery belongs to the outer query if its argument contains only outer-query variables. Prior PostgreSQL releases did not handle this fine point correctly.

  • Add option to prevent auto-addition of tables referenced in query (Nigel J. Andrews)

    By default, tables mentioned in the query are automatically added to the FROM clause if they are not already there. This is compatible with historic POSTGRES behavior but is contrary to the SQL standard. This option allows selecting standard-compatible behavior.

  • Allow UPDATE ... SET col = DEFAULT (Rod)

    This allows UPDATE to set a column to its declared default value.

  • Allow expressions to be used in LIMIT/OFFSET (Tom)

    In prior releases, LIMIT/OFFSET could only use constants, not expressions.

  • Implement CREATE TABLE AS EXECUTE (Neil, Peter)

E.142.3.5. Object Manipulation Changes

  • Make CREATE SEQUENCE grammar more conforming to SQL:2003 (Neil)

  • Add statement-level triggers (Neil)

    While this allows a trigger to fire at the end of a statement, it does not allow the trigger to access all rows modified by the statement. This capability is planned for a future release.

  • Add check constraints for domains (Rod)

    This greatly increases the usefulness of domains by allowing them to use check constraints.

  • Add ALTER DOMAIN (Rod)

    This allows manipulation of existing domains.

  • Fix several zero-column table bugs (Tom)

    PostgreSQL supports zero-column tables. This fixes various bugs that occur when using such tables.

  • Have ALTER TABLE ... ADD PRIMARY KEY add not-null constraint (Rod)

    In prior releases, ALTER TABLE ... ADD PRIMARY would add a unique index, but not a not-null constraint. That is fixed in this release.

  • Add ALTER TABLE ... WITHOUT OIDS (Rod)

    This allows control over whether new and updated rows will have an OID column. This is most useful for saving storage space.

  • Add ALTER SEQUENCE to modify minimum, maximum, increment, cache, cycle values (Rod)

  • Add ALTER TABLE ... CLUSTER ON (Alvaro Herrera)

    This command is used by pg_dump to record the cluster column for each table previously clustered. This information is used by database-wide cluster to cluster all previously clustered tables.

  • Improve automatic type casting for domains (Rod, Tom)

  • Allow dollar signs in identifiers, except as first character (Tom)

  • Disallow dollar signs in operator names, so x=$1 works (Tom)

  • Allow copying table schema using LIKE subtable, also SQL:2003 feature INCLUDING DEFAULTS (Rod)

  • Add WITH GRANT OPTION clause to GRANT (Peter)

    This enabled GRANT to give other users the ability to grant privileges on a object.

E.142.3.6. Utility Command Changes

  • Add ON COMMIT clause to CREATE TABLE for temporary tables (Gavin)

    This adds the ability for a table to be dropped or all rows deleted on transaction commit.

  • Allow cursors outside transactions using WITH HOLD (Neil)

    In previous releases, cursors were removed at the end of the transaction that created them. Cursors can now be created with the WITH HOLD option, which allows them to continue to be accessed after the creating transaction has committed.

  • FETCH 0 and MOVE 0 now do nothing (Bruce)

    In previous releases, FETCH 0 fetched all remaining rows, and MOVE 0 moved to the end of the cursor.

  • Cause FETCH and MOVE to return the number of rows fetched/moved, or zero if at the beginning/end of cursor, per SQL standard (Bruce)

    In prior releases, the row count returned by FETCH and MOVE did not accurately reflect the number of rows processed.

  • Properly handle SCROLL with cursors, or report an error (Neil)

    Allowing random access (both forward and backward scrolling) to some kinds of queries cannot be done without some additional work. If SCROLL is specified when the cursor is created, this additional work will be performed. Furthermore, if the cursor has been created with NO SCROLL, no random access is allowed.

  • Implement SQL-compatible options FIRST, LAST, ABSOLUTE n, RELATIVE n for FETCH and MOVE (Tom)

  • Allow EXPLAIN on DECLARE CURSOR (Tom)

  • Allow CLUSTER to use index marked as pre-clustered by default (Alvaro Herrera)

  • Allow CLUSTER to cluster all tables (Alvaro Herrera)

    This allows all previously clustered tables in a database to be reclustered with a single command.

  • Prevent CLUSTER on partial indexes (Tom)

  • Allow DOS and Mac line-endings in COPY files (Bruce)

  • Disallow literal carriage return as a data value, backslash-carriage-return and \r are still allowed (Bruce)

  • COPY changes (binary, \.) (Tom)

  • Recover from COPY failure cleanly (Tom)

  • Prevent possible memory leaks in COPY (Tom)

  • Make TRUNCATE transaction-safe (Rod)

    TRUNCATE can now be used inside a transaction. If the transaction aborts, the changes made by the TRUNCATE are automatically rolled back.

  • Allow prepare/bind of utility commands like FETCH and EXPLAIN (Tom)

  • Add EXPLAIN EXECUTE (Neil)

  • Improve VACUUM performance on indexes by reducing WAL traffic (Tom)

  • Functional indexes have been generalized into indexes on expressions (Tom)

    In prior releases, functional indexes only supported a simple function applied to one or more column names. This release allows any type of scalar expression.

  • Have SHOW TRANSACTION ISOLATION match input to SET TRANSACTION ISOLATION (Tom)

  • Have COMMENT ON DATABASE on nonlocal database generate a warning, rather than an error (Rod)

    Database comments are stored in database-local tables so comments on a database have to be stored in each database.

  • Improve reliability of LISTEN/NOTIFY (Tom)

  • Allow REINDEX to reliably reindex nonshared system catalog indexes (Tom)

    This allows system tables to be reindexed without the requirement of a standalone session, which was necessary in previous releases. The only tables that now require a standalone session for reindexing are the global system tables pg_database, pg_shadow, and pg_group.

E.142.3.7. Data Type and Function Changes

  • New server parameter extra_float_digits to control precision display of floating-point numbers (Pedro Ferreira, Tom)

    This controls output precision which was causing regression testing problems.

  • Allow +1300 as a numeric time-zone specifier, for FJST (Tom)

  • Remove rarely used functions oidrand, oidsrand, and userfntest functions (Neil)

  • Add md5() function to main server, already in contrib/pgcrypto (Joe)

    An MD5 function was frequently requested. For more complex encryption capabilities, use contrib/pgcrypto.

  • Increase date range of timestamp (John Cochran)

  • Change EXTRACT(EPOCH FROM timestamp) so timestamp without time zone is assumed to be in local time, not GMT (Tom)

  • Trap division by zero in case the operating system doesn't prevent it (Tom)

  • Change the numeric data type internally to base 10000 (Tom)

  • New hostmask() function (Greg Wickham)

  • Fixes for to_char() and to_timestamp() (Karel)

  • Allow functions that can take any argument data type and return any data type, using anyelement and anyarray (Joe)

    This allows the creation of functions that can work with any data type.

  • Arrays can now be specified as ARRAY[1,2,3], ARRAY[['a','b'],['c','d']], or ARRAY[ARRAY[ARRAY[2]]] (Joe)

  • Allow proper comparisons for arrays, including nt seog variables from being turned off by non-superusers (Bruce)

    This is a security feature so non-superusers cannot disable logging that was enabled by the administrator.

  • log_min_messages/client_min_messages now controls debug_* output (Bruce)

    This centralizes client debug information so all debug output can be sent to either the client or server logs.

  • Add Mac OS X Rendezvous server support (Chris Campbell)

    This allows Mac OS X hosts to query the network for available PostgreSQL servers.

  • Add ability to print only slow statements using log_min_duration_statement (Christopher)

    This is an often requested debugging feature that allows administrators to see only slow queries in their server logs.

  • Allow pg_hba.conf to accept netmasks in CIDR format (Andrew Dunstan)

    This allows administrators to merge the host IP address and netmask fields into a single CIDR field in pg_hba.conf.

  • New read-only parameter is_superuser (Tom)

  • New parameter log_error_verbosity to control error detail (Tom)

    This works with the new error reporting feature to supply additional error information like hints, file names and line numbers.

  • postgres --describe-config now dumps server config variables (Aizaz Ahmed, Peter)

    This option is useful for administration tools that need to know the configuration variable names and their minimums, maximums, defaults, and descriptions.

  • Add new columns in pg_settings: context, type, source, min_val, max_val (Joe)

  • Make default shared_buffers 1000 and max_connections 100, if possible (Tom)

    Prior versions defaulted to 64 shared buffers so PostgreSQL would start on even very old systems. This release tests the amount of shared memory allowed by the platform and selects more reasonable default values if possible. Of course, users are still encouraged to evaluate their resource load and size shared_buffers accordingly.

  • New pg_hba.conf record type hostnossl to prevent SSL connections (Jon Jensen)

    In prior releases, there was no way to prevent SSL connections if both the client and server supported SSL. This option allows that capability.

  • Remove parameter geqo_random_seed (Tom)

  • Add server parameter regex_flavor to control regular expression processing (Tom)

  • Make pg_ctl better handle nonstandard ports (Greg)

E.142.3.4. Query Changes

  • New SQL-standard information schema (Peter)

  • Add read-only transactions (Peter)

  • Print key name and value in foreign-key violation messages (Dmitry Tkach)

  • Allow users to see their own queries in pg_stat_activity (Kevin Brown)

    In prior releases, only the superuser could see query strings using pg_stat_activity. Now ordinary users can see their own query strings.

  • Fix aggregates in subqueries to match SQL standard (Tom)

    The SQL standard says that an aggregate function appearing within a nested subquery belongs to the outer query if its argument contains only outer-query variables. Prior PostgreSQL releases did not handle this fine point correctly.

  • Add option to prevent auto-addition of tables referenced in query (Nigel J. Andrews)

    By default, tables mentioned in the query are automatically added to the FROM clause if they are not already there. This is compatible with historic POSTGRES behavior but is contrary to the SQL standard. This option allows selecting standard-compatible behavior.

  • Allow UPDATE ... SET col = DEFAULT (Rod)

    This allows UPDATE to set a column to its declared default value.

  • Allow expressions to be used in LIMIT/OFFSET (Tom)

    In prior releases, LIMIT/OFFSET could only use constants, not expressions.

  • Implement CREATE TABLE AS EXECUTE (Neil, Peter)

E.142.3.5. Object Manipulation Changes

  • Make CREATE SEQUENCE grammar more conforming to SQL:2003 (Neil)

  • Add statement-level triggers (Neil)

    While this allows a trigger to fire at the end of a statement, it does not allow the trigger to access all rows modified by the statement. This capability is planned for a future release.

  • Add check constraints for domains (Rod)

    This greatly increases the usefulness of domains by allowing them to use check constraints.

  • Add ALTER DOMAIN (Rod)

    This allows manipulation of existing domains.

  • Fix several zero-column table bugs (Tom)

    PostgreSQL supports zero-column tables. This fixes various bugs that occur when using such tables.

  • Have ALTER TABLE ... ADD PRIMARY KEY add not-null constraint (Rod)

    In prior releases, ALTER TABLE ... ADD PRIMARY would add a unique index, but not a not-null constraint. That is fixed in this release.

  • Add ALTER TABLE ... WITHOUT OIDS (Rod)

    This allows control over whether new and updated rows will have an OID column. This is most useful for saving storage space.

  • Add ALTER SEQUENCE to modify minimum, maximum, increment, cache, cycle values (Rod)

  • Add ALTER TABLE ... CLUSTER ON (Alvaro Herrera)

    This command is used by pg_dump to record the cluster column for each table previously clustered. This information is used by database-wide cluster to cluster all previously clustered tables.

  • Improve automatic type casting for domains (Rod, Tom)

  • Allow dollar signs in identifiers, except as first character (Tom)

  • Disallow dollar signs in operator names, so x=$1 works (Tom)

  • Allow copying table schema using LIKE subtable, also SQL:2003 feature INCLUDING DEFAULTS (Rod)

  • Add WITH GRANT OPTION clause to GRANT (Peter)

    This enabled GRANT to give other users the ability to grant privileges on a object.

E.142.3.6. Utility Command Changes

  • Add ON COMMIT clause to CREATE TABLE for temporary tables (Gavin)

    This adds the ability for a table to be dropped or all rows deleted on transaction commit.

  • Allow cursors outside transactions using WITH HOLD (Neil)

    In previous releases, cursors were removed at the end of the transaction that created them. Cursors can now be created with the WITH HOLD option, which allows them to continue to be accessed after the creating transaction has committed.

  • FETCH 0 and MOVE 0 now do nothing (Bruce)

    In previous releases, FETCH 0 fetched all remaining rows, and MOVE 0 moved to the end of the cursor.

  • Cause FETCH and MOVE to return the number of rows fetched/moved, or zero if at the beginning/end of cursor, per SQL standard (Bruce)

    In prior releases, the row count returned by FETCH and MOVE did not accurately reflect the number of rows processed.

  • Properly handle SCROLL with cursors, or report an error (Neil)

    Allowing random access (both forward and backward scrolling) to some kinds of queries cannot be done without some additional work. If SCROLL is specified when the cursor is created, this additional work will be performed. Furthermore, if the cursor has been created with NO SCROLL, no random access is allowed.

  • Implement SQL-compatible options FIRST, LAST, ABSOLUTE n, RELATIVE n for FETCH and MOVE (Tom)

  • Allow EXPLAIN on DECLARE CURSOR (Tom)

  • Allow CLUSTER to use index marked as pre-clustered by default (Alvaro Herrera)

  • Allow CLUSTER to cluster all tables (Alvaro Herrera)

    This allows all previously clustered tables in a database to be reclustered with a single command.

  • Prevent CLUSTER on partial indexes (Tom)

  • Allow DOS and Mac line-endings in COPY files (Bruce)

  • Disallow literal carriage return as a data value, backslash-carriage-return and \r are still allowed (Bruce)

  • COPY changes (binary, \.) (Tom)

  • Recover from COPY failure cleanly (Tom)

  • Prevent possible memory leaks in COPY (Tom)

  • Make TRUNCATE transaction-safe (Rod)

    TRUNCATE can now be used inside a transaction. If the transaction aborts, the changes made by the TRUNCATE are automatically rolled back.

  • Allow prepare/bind of utility commands like FETCH and EXPLAIN (Tom)

  • Add EXPLAIN EXECUTE (Neil)

  • Improve VACUUM performance on indexes by reducing WAL traffic (Tom)

  • Functional indexes have been generalized into indexes on expressions (Tom)

    In prior releases, functional indexes only supported a simple function applied to one or more column names. This release allows any type of scalar expression.

  • Have SHOW TRANSACTION ISOLATION match input to SET TRANSACTION ISOLATION (Tom)

  • Have COMMENT ON DATABASE on nonlocal database generate a warning, rather than an error (Rod)

    Database comments are stored in database-local tables so comments on a database have to be stored in each database.

  • Improve reliability of LISTEN/NOTIFY (Tom)

  • Allow REINDEX to reliably reindex nonshared system catalog indexes (Tom)

    This allows system tables to be reindexed without the requirement of a standalone session, which was necessary in previous releases. The only tables that now require a standalone session for reindexing are the global system tables pg_database, pg_shadow, and pg_group.

E.142.3.7. Data Type and Function Changes

  • New server parameter extra_float_digits to control precision display of floating-point numbers (Pedro Ferreira, Tom)

    This controls output precision which was causing regression testing problems.

  • Allow +1300 as a numeric time-zone specifier, for FJST (Tom)

  • Remove rarely used functions oidrand, oidsrand, and userfntest functions (Neil)

  • Add md5() function to main server, already in contrib/pgcrypto (Joe)

    An MD5 function was frequently requested. For more complex encryption capabilities, use contrib/pgcrypto.

  • Increase date range of timestamp (John Cochran)

  • Change EXTRACT(EPOCH FROM timestamp) so timestamp without time zone is assumed to be in local time, not GMT (Tom)

  • Trap division by zero in case the operating system doesn't prevent it (Tom)

  • Change the numeric data type internally to base 10000 (Tom)

  • New hostmask() function (Greg Wickham)

  • Fixes for to_char() and to_timestamp() (Karel)

  • Allow functions that can take any argument data type and return any data type, using anyelement and anyarray (Joe)

    This allows the creation of functions that can work with any data type.

  • Arrays can now be specified as ARRAY[1,2,3], ARRAY[['a','b'],['c','d']], or ARRAY[ARRAY[ARRAY[2]]] (Joe)

  • Allow proper comparisons for arrays, including nt seog variables from being turned off by non-superusers (Bruce)

    This is a security feature so non-superusers cannot disable logging that was enabled by the administrator.

  • log_min_messages/client_min_messages now controls debug_* output (Bruce)

    This centralizes client debug information so all debug output can be sent to either the client or server logs.

  • Add Mac OS X Rendezvous server support (Chris Campbell)

    This allows Mac OS X hosts to query the network for available PostgreSQL servers.

  • Add ability to print only slow statements using log_min_duration_statement (Christopher)

    This is an often requested debugging feature that allows administrators to see only slow queries in their server logs.

  • Allow pg_hba.conf to accept netmasks in CIDR format (Andrew Dunstan)

    This allows administrators to merge the host IP address and netmask fields into a single CIDR field in pg_hba.conf.

  • New read-only parameter is_superuser (Tom)

  • New parameter log_error_verbosity to control error detail (Tom)

    This works with the new error reporting feature to supply additional error information like hints, file names and line numbers.

  • postgres --describe-config now dumps server config variables (Aizaz Ahmed, Peter)

    This option is useful for administration tools that need to know the configuration variable names and their minimums, maximums, defaults, and descriptions.

  • Add new columns in pg_settings: context, type, source, min_val, max_val (Joe)

  • Make default shared_buffers 1000 and max_connections 100, if possible (Tom)

    Prior versions defaulted to 64 shared buffers so PostgreSQL would start on even very old systems. This release tests the amount of shared memory allowed by the platform and selects more reasonable default values if possible. Of course, users are still encouraged to evaluate their resource load