PostgreSQL 8.2beta1 Documentation | ||||
---|---|---|---|---|
Prev | Fast Backward | Appendix E. Release Notes | Fast Forward | Next |
Release date: 2005-1?-??
Release date: CURRENT AS OF 2006-09-21
This release adds many improvements to commands and database facilities that were requested by users, including:
Improved sort performance with lower memory usage
More efficient locking with better concurency
New FILLFACTOR support for tables and indexes
Many query optimization improvements
More efficient vacuuming
Warm standby server enhancements
Monitoring, logging, and performance tuning additions
Query enhancements including RETURNING values, multi-VALUES, support, and self-joins for DELETE
More control over creating/dropping objects and inheritance
Index creation without blocking INSERT/UPDATE/DELETE
COPY TO support for SELECT statements
Array and aggregate improvements, including SQL:2003 statistical functions
Many /contrib improvements
A dump/restore using pg_dump is required for those wishing to migrate data from any previous release.
Observe the following incompatibilities:
Set escape_string_warning to on by default (Bruce)
This issues a warning if backslash escapes are used in non-escape (non-E'') strings.
Disallow aggregate functions in UPDATE commands (unless within a subquery) (Tom)
The standard disallows this, and it leads to unpredictable results.
Change the row constructor syntax (ROW(...)) so that list elements foo.* will be expanded to a list of their member fields, rather than creating a nested rowtype field as formerly (Tom)
The new behavior is substantially more useful since it allows, for example, triggers to check for data changes with IF row(new.*) IS DISTINCT FROM row(old.*). The old behavior is still available by omitting .*.
Make row comparisons follow SQL standard semantics and allow them to be used in index scans (Tom)
Previously, row = and <> comparisons followed the standard but < <= > >= did not. A row comparison can now be used as an index constraint for a multicolumn index matching the row value.
Have SET CONSTRAINT affect only one constraint (Kris Jurka)
In previous releases, SET CONSTRAINT modified all constraints with a matching name. In this release, the schema search path is used to modify only the first matching constraint. A schema specification is also supported.
Remove rule permission for tables, for security reasons (Tom)
In this release, only a table's owner can create or modify rules for the table. For backwards compatibility, GRANT/REVOKE RULE is still accepted, but it does nothing.
Array comparison improvements (Tom)
Now array dimensions are also compared.
Change array concatenation to match documented behavior (Tom)
This changes the previous behavior where concatenation would adjust the lower array dimensions.
Make command-line options of postmaster and postgres identical (Peter)
This allows the postmaster to pass arguments to each backend without using -o.
Deprecate use of postmaster symlink (Peter)
postmaster and postgres commands now act identically, with the behavior determined by switches. The postmaster symlink is kept for compatibility, but is not really needed.
Change log_duration to output even if the query is not output (Tom)
In prior releases, log_duration only printed if the query appeared earlier in the logs.
Have to_char(time)
and to_char(interval)
treat 'HH' and 'HH12' as 12-hour
intervals.
Most applications should use 'HH24' unless they want a 12-hour display.
Zero unmasked bits in conversion from INET to CIDR (Tom)
Remove australian_timezones configuration variable (Joachim Wieland)
No longer needed now that timezone abbreviations are configurable.
Improve cost estimation for nestloop index scans (Tom)
This may eliminate the need to set unrealistically small values of random_page_cost. If you have been using a very small random_page_cost, please recheck your test cases.
Change libpq PQdsplen()
to
return a useful value (Martijn van Oosterhout)
Change libpq PQgetssl()
to
return a void*, rather than SSL*
(Martijn van Oosterhout)
This allows applications to use the function without SSL headers.
In /contrib/xml2, rename xml_valid()
to
xml_is_well_formed()
(Tom)
xml_valid()
will remain for backward compatibility,
but its behavior will change to do schema checks in future
releases.
Remove /contrib/ora2pg, now at http://www.samse.fr/GPL/ora2pg
Remove contrib modules that have been migrated to pgfoundry: adddepend, dbase, dbmirror, fulltextindex, mac, userlock
Remove abandoned contrib modules: mSQL-interface, ips
Remove QNX and BEOS ports (Bruce)
These ports no longer had active maintainers.
Below you will find a detailed account of the additional changes between PostgreSQL 8.2 and the previous major release.
Improve efficiency of IN (list-of-expressions) clauses (Tom)
Increase default values for shared_buffers and max_fsm_pages (Andrew)
Improve sorting speed and reduce memory usage (Simon, Tom)
Improve subtransaction performance (Alvaro, Itagaki Takahiro, Tom)
Improve COPY performance (Alon Goldshuv, Tom)
Add FILLFACTOR to table and index creation (ITAGAKI Takahiro)
This adds extra free space to each table or index page, allowing improved performance as the database grows. This is particularly valuable to maintain CLUSTERing.
Improve locking performance by breaking locks into sections (Tom)
This allows locking to be more fine-grained, reducing contention.
Reduce locking requirements of sequential scans (Qingqing Zhou)
Reduce locking required for database creation and destruction (Tom)
Allow the planner to reorder outer joins in some circumstances (Tom)
In previous releases, outer joins would always be evaluated in the order specified by the query. This change means that the query optimizer will consider reordering outer joins in some cases, provided that the join order can be changed without altering the meaning of the query. This can make a considerable performance difference for queries involving multiple outer joins.
Improve the optimizer statistics used by LIKE, ILIKE, and regular expression operations (Tom)
Improve planning of joins to inherited tables and UNION ALL views (Tom)
Allow constraint exclusion to be applied to inherited UPDATE and DELETE queries (Tom)
SELECT already honored constraint exclusion.
MIN()
and MAX()
can now use indexes
in more cases (Tom)
Speed up vacuuming of btree indexes (Heikki Linnakangas, Tom)
Improve multicolumn GIST indexing (Oleg, Teodor)
GIST indexes now are clusterable (Teodor)
Remove dead index entries before btree page split (Junji Teramoto)
Allow a forced switch to a new xlog file (Simon, Tom)
This is valuable for keeping continuous archiving servers
in sync with the master. xlog file switching also happens
automatically during pg_stop_backup()
. This
ensures that continuous archiving servers have all xlog
files needed for recovery.
Add WAL informational functions (Simon)
Add functions for interrogating the current xlog insertion
point and determining WAL filenames from the
hex WAL locations displayed by
pg_stop_backup()
and friends.
Allow WAL replay to be restored quicker in case of a crash (Simon)
The server now does periodic checkpoints during WAL recovery, so if there is a crash, future WAL recovery is shortened. This also eliminates the need for continuous archive servers to replay the entire log since the base backup if they crash.
Add archive_timeout to force xlog file switches at a given interval (Simon)
This enforces a maximum delay for continuous archive servers.
Add native LDAP authentication (Magnus Hagander)
This is particularly useful for platforms that do not support PAM, such as Win32.
Add GRANT CONNECT ON DATABASE, to be used in addition to pg_hba.conf (Gevik Babakhani)
This gives SQL-control over database access, and works in combination with the existing pg_hba.conf controls.
Add support for SSL Certificate Revocation List (CRL) files, root.crl (Libor Hohoš)
This was added to libpq as well.
Remove routine autovacuum server log entries (Bruce)
pg_stat_activity now shows autovacuum activity.
Track tables needing vacuum with more accuracy (Alvaro)
This reduces the overhead involved in preventing transaction ID wraparound.
Add last vacuum and analyze timestamp columns to the stats collector (Larry Rosenman)
These values now appear in the pg_stat_*_tables system views, and are used by autovacuum. ?
Improve performance of statistics monitoring, especially stats_command_string (Tom, Bruce)
This release sets stats_command_string to on by default, now that its overhead is minimal. This means pg_stat_activity now will show all active queries by default.
Add a waiting column to pg_stat_activity (Tom)
This allows pg_stat_activity to show the same information as the ps display.
Add GUC variable update_process_title to control whether the ps display is updated for every command, default to on (Bruce)
Allow units to be specified in configuration settings (Peter)
You can now set shared_buffer to 32000kB, for example.
Add support for include directives in postgresql.conf (Joachim Wieland)
Improve logging of protocol-level prepare/bind/execute messages (Bruce, Tom)
Such logging now shows statement names, bind parameter values, and the text of the query being executed.
Add INSERT/UPDATE/DELETE RETURNING (Jonah Harris, Tom)
This allows these commands to return values, such as the computed serial key for a new row. In the UPDATE case, values from the updated version of the row are returned.
Add support for multi-row VALUES clauses as part of INSERT and SELECT statements, per SQL standard (Joe, Tom)
This allows INSERT to insert multiple rows of constants, or queries to generate result sets using constants. For example, INSERT ... VALUES (...), (...), ...., and SELECT * FROM (VALUES (...), (...), ....) AS alias(f1, ...).
Allow UPDATE and DELETE to use an alias for the target table (Atsushi Ogawa)
This allows these statements to support self-joins more conveniently. UPDATE already supported as FROM clause, but DELETE did not.
Allow UPDATE to set multiple columns with a list of values (Susanne Ebrecht)
This is basically as short-hand for assigning the columns and values in pairs. The syntax is UPDATE tab SET (col, ...) = (val, ...).
Allow additional row value comparisons (Tom)
Add <, <=, >, >=.
Add CASCADE option to TRUNCATE (Joachim Wieland)
This allows TRUNCATE to automatically truncate all foreign-key referencing tables.
Support FOR UPDATE and FOR SHARE in the same command (Tom)
Add IS NOT DISTINCT FROM (Pavel Stehule)
This operator is similar to equality (=), but evaluates to true when both left and right operands are NULL, and to false when just one is, rather than yielding NULL in these cases.
Improve the length output used by UNION/INTERSECT/EXCEPT (Tom)
When all columns are of the same defined length, that length is used for output, rather than a generic length.
Allow ILIKE to work for multi-byte encodings (Tom)
Internally, ILIKE now calls lower()
and then uses LIKE. Locale-specific regular
expression operations still do not work in these encodings.
Enable standard_conforming_strings to be turned on (Kevin Grittner)
This allow special backslash escaping in strings to be turned off so PostgreSQL is more standards-compliant. The default is off, but future releases will default this to on.
Add system view pg_prepared_statements to show prepared statements (Joachim Wieland, Neil)
Add system view pg_cursors to show open cursors (Joachim Wieland, Neil)
This, and pg_prepared_statements above, are very useful for pooled connection setups.
Support portal parameters in EXPLAIN and EXECUTE (Tom)
This allows, for example, ? parameters to work in these commands in JDBC.
If SQL-level PREPARE parameters are unspecified, infer their types from the context of the query (Neil)
Protocol-level PREPARE already did this.
Protocol-level unnamed prepared statements are re-planned for each set of BIND values (Tom)
This improves performance because the exact parameter values can be used in the plan.
Allow LIMIT and OFFSET to exceed two billion (Dhanaraj M)
Add TABLESPACE clause to CREATE TABLE AS (Neil)
This allows the tablespace to be specified for the new table.
Add ON COMMIT clause to CREATE TABLE AS (Neil)
This allows temporary tables to be truncated or dropped on transaction commit. The default behavior is for the table to remain until the session ends.
Add INCLUDING CONSTRAINTS to CREATE TABLE LIKE (Greg Stark)
This allows the new table to receive matching constraints.
Allow the creation of placeholder (shell) types (Martijn van Oosterhout)
Shell types create a type reference, without specifying any of the aspects of the type. It is useful for creating types with input/output functions that reference the data type. The syntax is CREATE TYPE typename.
Add new aggregate creation syntax (Tom)
The new syntax is CREATE AGGREGATE aggname (input_type) (parameter_list). This more naturally supports the new multi-parameter aggregate functionality. The previous syntax is still supported.
Aggregate functions now support multiple input parameters (Sergey Koposov, Tom)
Add CREATE/ALTER ROLE PASSWORD NULL, which removes the role's password (Peter)
Add DROP object IF EXISTS for many object types (Andrew)
This allows DROP operations on non-existent objects without generating an error.
Add DROP OWNED to drop all objects owned by a role (Alvaro)
Add REASSIGN OWNED to reassign ownership of all objects owned by a role (Alvaro)
This, and DROP OWNED above, facilitate dropping roles.
Add GRANT ON SEQUENCE syntax (Bruce)
This was added for setting sequence-specific permissions. GRANT ON TABLE for sequences is still supported for backward compatibility.
Add USAGE permission for sequences that allows
only currval()
and nextval()
,
not setval()
(Bruce)
USAGE permission allows more find-grained
control over sequence access. It allows users to increment
a sequence, but prevents them from setting the sequence to
an arbitrary value using setval()
.
Add ALTER TABLE ... [ NO ] INHERIT (Greg Stark)
This allow inheritance to be added and removed dynamically, rather than just at table creation and destruction. This is very valuable for table partitioning using constraint exclusion.
Allow comments on global objects to be stored globally (Kris Jurka)
Previously, global object comments were stored in individual databases, making them ineffective. This adds a new pg_shdescription system catalog.
Add option to allow indexes to be created without blocking concurrent writes to the table (Greg Stark, Tom)
The new syntax is CREATE INDEX CONCURRENTLY. The default behavior is still to block table modification while a index is being created.
Provide advisory locking functionality (Abhijit Menon-Sen, Tom)
This is a new locking API compared to what used to be in /contrib. The /contrib code is now on pgfoundry.
Allow COPY to dump a SELECT query (Zoltan Boszormenyi, Karel Zak)
This allows COPY to dump arbitrary SQL queries. The syntax is COPY (SELECT ...) TO.
Have the COPY command return a command tag that includes the number of rows copied (Volkan YAZICI)
Allow VACUUM to expire rows without being affected by other concurrent VACUUMs (Hannu Krossing, Alvaro, Tom)
Have initdb detect the operating system locale and set the default DateStyle accordingly (Peter)
This makes it more likely that the installed postgresql.conf DateStyle value will be correct.
Avoid extra scan of tables without indexes during VACUUM (Greg Stark)
Reduce progress messages displayed by initdb (Tom)
Allow full timezone names in timestamp values (Joachim Wieland)
For example, '2006-05-24 21:11 America/New_York'::timestamptz.
Create a configuration file of timezone abbreviations (Joachim Wieland)
The file name is controlled by GUC variable timezone_abbreviations.
Add pg_timezone_abbrevs and pg_timezone_names views to show supported timezones (Magnus Hagander)
Add clock_timestamp()
,
statement_timestamp()
, and
transaction_timestamp()
(Bruce)
clock_timestamp()
is the current wall-clock time,
statement_timestamp()
is the time the current
statement arrived at the server, and
transaction_timestamp()
is an alias for
now()
.
Allow to_char()
to print localized month and
day names (Euler Taveira de Oliveira)
Allow to_char(time)
and to_char(interval)
to output AM/PM specifications
(Bruce)
Intervals and times are treated as 24-hour periods, e.g. 25 hours is AM.
Add new function justify_interval()
to adjust
interval units (Mark Dilger)
Interval computation improvements (Michael Glaesemann, Bruce)
Allow arrays to contain NULL elements (Tom)
New operators for array-subset comparisons (@>, <@, &&) (Teodor, Tom)
The old operators were kept for backward compatibility.
Add convenient arithmetic operations on INET/CIDR values (Stephen R. van den Berg)
The new operators are & (and), | (or), ~ (not), + int8, - int8, and inet - inet.
Add new aggregate functions from SQL2003 (Neil)
The new functions are var_pop()
,
var_samp()
, stddev_pop()
, and
stddev_samp()
. var_samp()
and
stddev_samp()
are merely renamings of the
existing aggregates variance()
and
stddev()
. The latter names have been kept
for backward compatibility.
Add SQL2003-standard statistical aggregates (Sergey Koposov)
New functions: regr_intercept()
,
regr_slope()
, regr_r2()
,
corr()
, covar_samp()
,
covar_pop()
, regr_avgx()
,
regr_avgy()
, regr_sxy()
,
regr_sxx()
, regr_syy()
,
regr_count()
Allow domains to be created using other domains (Tom)
Properly enforce DOMAIN check constraints everywhere (Neil, Tom)
For example, the result of a user-defined function that is declared to return a domain type is now checked against the constraints. This closes a significant hole in the domain implementation.
Fix problems with dumping renamed SERIAL columns (Tom)
The fix is to dump a SERIAL column by explicitly specifying its DEFAULT and sequence elements, and reconstructing the SERIAL column on reload using a new ALTER SEQUENCE OWNED BY command. This also allows dropping a SERIAL column specification.
Add a server-side sleep function pg_sleep()
(Joachim Wieland)
Add all comparison operators for the tid (tuple id) data type (Mark Kirkwood, Greg Stark, Tom)
Do not flatten subqueries that contain VOLATILE functions in their target lists (Jaime Casanova) ?
This prevents surprising behavior due to multiple evaluation
of a volatile function (such as random()
or nextval()
). It may cause performance
degradation in the presence of functions that are unnecessarily
marked as volatile.
Add table_name and table_schema as trigger data (Andrew)
Allow FOR statements to return values to scalars as well as records and row types (Pavel Stehule)
Add a BY clause to the FOR loop, to control the iteration increment (Jaime Casanova)
Add STRICT to SELECT INTO (Matt Miller)
STRICT mode throws an exception if more or less than one row is returned by the SELECT, for Oracle PL/SQL compatibility.
Add table_name and table_schema as trigger data (Adam Sjøgren)
relname is kept but now deprecated
Add prepared queries (Dmitry Karasik)
Make $_TD trigger data a global variable (Andrew)
Previously, it was lexical, which caused unexpected sharing violations.
Honor check_function_bodies (Tom)
Add table_name and table_schema as trigger data (Andrew)
Allow returning of composite types and result sets (Sven Suursoho)
Return result-set as list, iterator, or generator (Sven Suursoho)
Return composite-types as dictionary (Sven Suursoho)
Allow functions to return void (Neil)
Add named parameters to the args[] array (Sven Suursoho)
Add new command \password for changing role password with client-side password encryption (Peter)
Allow \c to connect to a new host and port number (David, Volkan YAZICI)
Add tablespace display to \l+ (Philip Yarra)
Improve \df slash command to include the argument names and modes (OUT or INOUT) of the function (David Fetter)
Support binary COPY (Andreas Pflug)
Add option to run the entire session in a single transaction (Simon)
Use options -1 or --single-transaction.
Support retrieving SELECT results in batches using a cursor (Chris Mair)
This is accomplished using \set FETCH_COUNT.
Allow multi-line values to align in the proper column (Martijn van Oosterhout)
Save multi-line statements as a single entry, rather than one line at a time (Sergey E. Koposov)
This makes up-arrow recall of queries easier.
Improve highlighting of error location in query in more cases (Tom)
Make the line counter 64-bit so it can handle files over two billion lines (David Fetter)
Report both the returned data and the command status tag for INSERT/UPDATE/DELETE RETURNING (Tom)
Allow complex selection of objects to be included or excluded by pg_dump (Greg Sabino Mullane)
pg_dump now supports multiple -n (schema) and -t (table) options, and adds -T and -N options to exclude objects. Also adds support for regular expressions for object names in these switches.
Add pg_dump -X no-data-for-failed-tables option to suppress loading data if table creation failed (the table already exists) (Martin Pitt)
Add pg_restore option to run the entire session in a single transaction (Simon)
Use options -1 or --single-transaction.
Add PQencryptPassword()
to encrypt passwords
(Tom)
This allows passwords to be sent encrypted for commands like ALTER USER ... PASSWORD.
Add function PQisthreadsafe()
(Bruce)
This allows applications to query the thread-safety status of the library.
Add PQdescribePrepared()
,
PQdescribePortal()
, and related functions
return information about previously prepared statements
and open cursors (Volkan YAZICI)
Allow LDAP lookups from pg_service.conf (Albe Laurenz)
Allow the .pgpass hostname to match the default socket directory, as well as a blank pghost (Bruce)
Allow SHOW to put its result into a variable (Joachim Wieland)
Add COPY TO STDOUT (Joachim Wieland)
Add regression tests (Joachim Wieland, Michael)
Major source code cleanups (Joachim Wieland, Michael)
Allow MSVC to compile the PostgreSQL server (Magnus, Hiroshi Saito)
Add MSVC support for utility commands and pg_dump (Hiroshi Saito)
Add support for Windows code pages 1253, 1254, 1255, and 1257 (Kris Jurka)
Improve handling of intermittent file system and resource failures (Qingqing Zhou)
Stability fixes (Magnus)
Particularly, prevent the postmaster from stopping if too many connection requests arrive too rapidly.
Add native semaphore implementation (Qingqing Zhou)
Previous implementations mimicked SysV semaphores.
Add GIN (Generalized Inverted iNdex) index access method (Teodor) ?
Remove R-tree indexing (Tom)
Rtree has been re-implemented using GIST.
Reduce libraries linked into the backend needlessly (Martijn van Oosterhout, Tom)
Add a configure flag to allow libedit to be preferred over GNU readline (Bruce)
Use configure --with-libedit-preferred.
Allow installation into directories containing spaces (Peter)
Improve ability to relocate installs in more complex configurations (Tom)
Add support for Solaris x86_64 using the Solaris compiler (Pierre Girard, Theo Schlossnagle, Bruce)
Add DTrace support (Robert Lor)
Add PG_VERSION_NUM for use by third-party applications wanting to test the backend version in C using > and < comparisons (Bruce)
Add XLOG_BLCKSZ as independent from BLCKSZ (Mark Wong)
Add LWLOCK_STATS define to report locking activity (Tom)
Emit warnings for unknown configure options (Martijn van Oosterhout)
Rename existing GUC variable preload_libraries to shared_preload_libraries (Tom)
Add new GUC variable server_version_num (Greg Sabino Mullane)
This is like server_version, but is an integer, e.g. 80200. This allows applications to make version checks more easily.
Add a GUC variable seq_page_cost (Tom)
Re-implement the regression test script as a C program (Magnus, Tom)
Allow loadable modules to allocate shared memory and lightweight locks (Marc Munro)
Add automatic initialization and finalization of dynamically loaded libraries (Ralf Engelschall, Tom)
New functions _PG_init()
and _PG_fini()
are called if the library defines such symbols. Hence we
no longer need to specify an initialization function in
shared_preload_libraries; we can assume that the
library used the _PG_init()
convention instead.
Add PG_MODULE_MAGIC header block to all shared object files (Martijn van Oosterhout)
The magic blocks prevent version mismatches between object files and servers.
Add support for libraries that enhance server-side languages (Korry Douglas)
Such libraries can be used for debugging or performance measurement.
Add shared library support for AIX (Albe Laurenz)
New XML documentation section (Bruce)
Major tsearch2 improvements (Oleg, Teodor)
multibyte encoding support, including UTF8
query rewriting support
improved ranking functions
thesaurus dictionary support
Ispell dictionaries now recognize MySpell format, used by OpenOffice.
GIN support
Add Pgadmin administration functions to adminpack (Dave)
These functions provide additional file system access routines not present in the default PostgreSQL server.
Add sslinfo (Victor Wagner)
Reports information about the current SSL certificate.
Add pgrowlocks (Tatsuo)
This shows row locking information for a specified table.
Add hstore module (Oleg, Teodor)
Add isn module, replacing isbn_issn (Jeremy Kronuz)
This now supports EAN13, UPC, ISBN (books), ISMN (music), and ISSN (serials).
Add index information to pgstattuple (ITAGAKI Takahiro, Satoshi Nagayasu)
Add pg_freespacemap to display free space map information (Mark Kirkwood)
pgcrypto now has all planned functionality (Marko Kreen)
Improvements to cube (Joshua Reich)
New functions are cube(float[])
,
cube(float[], float[])
, and
cube_subset(cube, int4[])
.
Add async query capability to dblink (Kai Londenberg, Joe Conway)
New operators for array-subset comparisons (@>, <@, &&) (Tom)
New uninstall scripts for many contrib packages (David)