- This was accomplished by eliminating global locks and using a
- clock sweep algorithm to find free buffers. This increases
- scalability on multi-CPU systems.
-
+ Access to the shared buffer cache was identified as a
+ significant scalability problem, particularly on multi-CPU
+ systems. In this release, the way that locking is done in the
+ buffer manager has been overhauled to reduce lock contention
+ and improve scalability. The buffer manager has also been
+ changed to use a clock sweep
replacement
+ policy.
+
In previous releases, only a single index could be used to do
lookups on a table. With this feature, if a query has
- WHERE tab.col1 = 4 and tab.col2 = 9>, and there is no
- multicolumn index on col1 and col2, but there is an index on
- col1 and another on col2, it is possible to search both indexes
- and combine the results in memory, then do heap fetches for only
- the rows matching both the col1 and col2
- restrictions. This is very useful in environments that have a
- lot of unstructured queries where it is impossible to create
- indexes that match all possible access conditions. Bitmap scans
- are useful even with a single index, as they reduce the amount
- of random access needed; a bitmap index scan is efficient for
- retrieving fairly large fractions of the complete table, whereas
- plain index scans are not.
+ WHERE tab.col1 = 4 and tab.col2 = 9>, and there is
+ no multicolumn index on col1> and col2>,
+ but there is an index on col1> and another on
+ col2>, it is possible to search both indexes and
+ combine the results in memory, then do heap fetches for only
+ the rows matching both the col1> and
+ col2> restrictions. This is very useful in
+ environments that have a lot of unstructured queries where it
+ is impossible to create indexes that match all possible access
+ conditions. Bitmap scans are useful even with a single index,
+ as they reduce the amount of random access needed; a bitmap
+ index scan is efficient for retrieving fairly large fractions
+ of the complete table, whereas plain index scans are not.
Move /contrib/pg_autovacuum> into the main server
- (Alvaro Herrera )
+ (Alvaro)
-
Migration to version 8.1
+
Migration to 8.1
A dump/restore using
pg_dump is required
default_with_oids> is now false by default (Neil)
- With this option set to false, user-created tables no longer have
- the usually-invisible OID column unless WITH OIDS>
- is specified in CREATE TABLE>. Though OIDs have
- existed in all releases of
-
PostgreSQL , their use is limited
+ With this option set to false, user-created tables no longer
+ have an OID column unless WITH OIDS> is specified in
+ CREATE TABLE>. Though OIDs have existed in all
+ releases of
PostgreSQL>, their use is limited
because they are only four bytes long and the counter is shared
across all installed databases. The preferred way of uniquely
- identifying rows is via sequences and SERIAL>, which
- have been supported since
PostgreSQL
- 6.4.
+ identifying rows is via sequences and the SERIAL> type,
+ which have been supported since
PostgreSQL> 6.4.
syntax is formed by writing an E> immediately preceding the
single quote that starts the string, e.g. E'hi\n'>. While
this release does not change the handling of backslashes in strings, it
- does add new GUC variable s to help users migrate applications
+ does add new configuration parameter s to help users migrate applications
for future releases:
- standard_conforming_strings> - does this release
+ standard_conforming_strings> — does this release
treat backslashes literally in ordinary strings?
- escape_string_warning> - warn about backslashes in
+ escape_string_warning> — warn about backslashes in
ordinary (non-E) strings
The standard_conforming_strings> value is read-only.
Applications can retrieve the value to know how backslashes are
processed. (Presence of the parameter can also be taken as an
- indication that E''> string syntax is supported.) In a
- future release, standard_conforming_strings> will be true,
- meaning backslashes will be treated literally in non-E strings. To
- prepare for this change, use E''> strings in places that
- need special backslash processing, and turn on
- escape_string_warning> to find additional strings that need
- to be converted to use E''>. Also, use two single-quotes
- (''>) to embed a literal single-quote in a string, rather
- than the PostgreSQL-supported syntax of backslash single-quote
- (\'>). The former is standards-conforming and does not
- require the use of the E''> string syntax. You can also use
- the $$> string syntax, which does not treat backslashes
+ indication that E''> string syntax is supported.)
+ In a future release, standard_conforming_strings>
+ will be true, meaning backslashes will be treated literally in
+ non-E strings. To prepare for this change, use E''>
+ strings in places that need special backslash processing, and
+ turn on escape_string_warning> to find additional
+ strings that need to be converted to use E''>.
+ Also, use two single-quotes (''>) to embed a literal
+ single-quote in a string, rather than the
+
PostgreSQL -supported syntax of
+ backslash single-quote (\'>). The former is
+ standards-conforming and does not require the use of the
+ E''> string syntax. You can also use the
+ $$> string syntax, which does not treat backslashes
specially.
- In psql, treat unquoted \{digit}+> sequences as octal
- (Bruce)
+ In
psql , treat unquoted
+ \{digit}+> sequences as octal (Bruce)
In previous releases, \{digit}+> sequences were
Additional Changes
- Below you will find a detailed account of the additional changes
- between release 8.1 and the previous major release.
+ Below you will find a detailed account of the additional changes
+ between
PostgreSQL 8.1 and the
+ previous major release.
- Improve rtree index capabilities and performance (Neil)
+ Improve GiST and rtree index performance (Neil)
Allow non-consecutive index columns to be used in a multi-column
- index
- (Tom)
+ index (Tom)
For example, this allows an index on columns a,b,c to be used in
- Add GUC full_page_writes> to control writing full
- pages to WAL
- (Bruce)
+ Add configuration parameter full_page_writes> to
+ control writing full pages to WAL (Bruce)
To prevent partial disk writes from corrupting the database,
- Add constraint_exclusion to restrict child table lookups based
- on table constraints (Simon)
+ Add constraint_exclusion configuration
+ parameter to restrict child table lookups based on table
+ constraints (Simon)
This allows for a type of table partitioning. If child tables
Use O_DIRECT> if available when using
- O_SYNC> for wal_sync_method (Itagaki Takahiro)
+ O_SYNC> for wal_sync_method
+ (Itagaki Takahiro)
O_DIRECT> causes disk writes to bypass the kernel
-
-
+
Server Changes
-
+
Prevent problems due to transaction ID (XID) wraparound (Tom)
- Add temp_buffers> GUC variable to allow users to
- determine the size of the local buffer area for temporary table
- access (Tom)
+ Add temp_buffers> configuration parameter to allow
+ users to determine the size of the local buffer area for
+ temporary table access (Tom)
- Add GUC krb_server_hostname> so the server hostname
- can be specified as part of service principal (Todd Kover)
+ Add configuration parameter krb_server_hostname> so
+ that the server hostname can be specified as part of service
+ principal (Todd Kover)
If not set, any service principal matching an entry in the
Add WAL logging for GIST indexes (Teodor, Oleg)
- GIST indexes are now safe for crash and point-in-time recovery
+ GIST indexes are now safe for crash and point-in-time recovery.
- Add GUC variables to control TCP/IP keep-alive times for idle,
- interval, and count (Oliver Jowett)
+ Add configuration parameters to control TCP/IP keep-alive
+ times for idle, interval, and count (Oliver Jowett)
- Allow more than two gigabyes of shared memory and per-backend
+ Allow more than two gigabyt es of shared memory and per-backend
work memory on 64-bit machines (Koichi Suzuki)
- Add temporary views (Koju Iijima)
+ Add temporary views (Koju Iijima, Neil )
Add USING> clause to allow additional tables to be
- specified to DELETE> (Euler Taveira de Oliveira)
+ specified to DELETE> (Euler Taveira de Oliveira, Neil )
In prior releases, there was no clear method for specifying
additional tables to be used for joins in a DELETE>
- statement. UPDATE> already has a <command >FROM>
+ statement. UPDATE> already has a <literal >FROM>
clause for this purpose.
UPDATE/SHARE> (Hans-Juergen Schoenig)
- While SET> statement_timeout> allows a query
- taking over a certain amount of time to be cancelled, the
- NOWAIT> option allows a query to be canceled as soon a s a
- SELECT ... FOR UPDATE/SHARE> command cannot immediately
- acquire a row lock.
+ While the statement_timeout> configuration
+ parameter allows a query taking more than a certain amount of
+ time to be cancelled, the NOWAIT> option allow s a
+ query to be canceled as soon as a SELECT ... FOR
+ UPDATE/SHARE> command cannot immediately acquire a row lock.
-
- Add ALTER TABLE ENABLE/DISABLE TRIGGER to disable triggers
- (Satoshi Nagayasu)
+ Add ALTER TABLE ENABLE/DISABLE TRIGGER to
+ disable triggers (Satoshi Nagayasu)
Properly process carriage returns and line feeds in
- COPY CSV> mode (Andrew Dunstan )
+ COPY CSV> mode (Andrew)
In release 8.0, carriage returns and line feeds in CSV
- Make initdb create a new standard database calle d
- postgres>, and convert utilities to use
- postgres> rather than template1> for
+ Make
initdb create a new standard
+ database called postgres>, and convert utilities to
+ use postgres> rather than template1> for
standard lookups (Dave)
- In prior releases, template1> was used both as a default
- connection for utilities like createuser, and as a template for
+ In prior releases, template1> was used both as a
+ default connection for utilities like
+
createuser , and as a template for
new databases. This caused CREATE DATABASE> to
sometimes fail, because a new database cannot be created if
anyone else is in the template database. With this change, the
- default connection database is now postgres>, meaning
- it is much less likely someone will be using
+ default connection database is now postgres>,
+ meaning it is much less likely someone will be using
template1> during CREATE DATABASE>.
- Create new reindexdb command-line utility by moving
- /contrib/reindexdb> into the server (Euler Taveira
- de Oliveira)
+ Create new
reindexdb command-line
+ utility by moving /contrib/reindexdb> into the
+ server (Euler Taveira de Oliveira)
- Add GREATEST()> and LEAST()> functions
- (Pavel Stehule)
+ Add GREATEST()> and LEAST()> variadic
+ functions (Pavel Stehule)
These functions take a variable number of arguments and return
-
Add pg_rotate_logfile()> to force rotation of the
+
The original names still work.
Allow direct conversion between EUC_JP> and
- SJIS> to improve performance (Atsushi
- Ogawa)
+ SJIS> to improve performance (Atsushi Ogawa)
Reduce memory usage of PL/PgSQL functions (Neil)
- Each function now has its own memory context that can be freed
- when the function exits.
+ The parsetree of each function is now stored in a separate
+ memory context. This allows the memory to be easily reclaimed
+ when it is no longer needed.
rather than at runtime (Neil)
- Previously, syntax errors were reported only when the function
- was executed.
+ Previously, most syntax errors were reported only when the
+ function was executed.
Add support for an optional INTO> clause to
- PL/PgSQL's EXECUTE> command (Pavel Stehule)
+ PL/PgSQL's EXECUTE> command (Pavel Stehule, Neil )
Define SQLSTATE> and SQLERRM> to return
the SQLSTATE> and error message of the current
- exception (Pavel Stehule)
+ exception (Pavel Stehule, Neil )
These variables are only accessible inside exception blocks.
Allow the parameters to the RAISE> statement to be
- expressions (Pavel Stehule)
+ expressions (Pavel Stehule, Neil )
- Add a loop CONTINUE> statement (Pavel Stehule)
+ Add a loop CONTINUE> statement (Pavel Stehule, Neil )
- Allow one-row-at-a-time retrieval of query results (Abhijit)
+ Allow one-row-at-a-time retrieval of query results (Abhijit Menon-Sen )
This allows functions to use spi_query()> and
- Allow strict> mode to be enabled (Andrew)
+ Allow Perl's strict> mode to be enabled (Andrew)
-
-
+
+
- Add psql \set ON_ERROR_ROLLBACK> to allow statements
- in a transaction to error without affecting the rest of the
+ Add \set ON_ERROR_ROLLBACK> to allow statements in
+ a transaction to error without affecting the rest of the
transaction (Greg Sabino Mullane)
- Add support for \x> hex strings in psql variables
- (Bruce)
+ Add support for \x> hex strings in
+
psql> variables (Bruce)
Octal escapes were already supported.
- Add psql support for troff -ms> output format (Roger
+ Add support for troff -ms> output format (Roger
Leigh)
- Allow psql's history file location to be controlled by
+ Allow the history file location to be controlled by
HISTFILE> (Andreas Seltenreich)
- Prevent psql \x> (expanded mode) from affecting
+ Prevent \x> (expanded mode) from affecting
backslash-command displays (Neil)
- Add -L> option to psql to log sessions (Lorne Sunley)
+ Add
-L> option to psql to
+ log sessions (Lorne Sunley)
This option was added because some operating systems do not have
- Make psql \d> show tablespaces of indexes (Qingqing
+ Make \d> show the tablespaces of indexes (Qingqing
Zhou)
- Allow psql help (\h>) to make a best guess on the
- proper help information (Greg Sabino Mullane)
+ Allow
psql help (
\h>) to
+ make a best guess on the proper help information (Greg Sabino
+ Mullane)
This allows the user to just add \h> to the front of
- Add psql \pset numericlocale> to allow numbers to be
+ Add \pset numericlocale> to allow numbers to be
output in a locale-aware format (Eugen Nedelcu)
Allow
pg_dump> to dump a consistent snapshot of
- large objects
- (Tom)
+ large objects (Tom)
-
libpq Changes
Add a PGPASSFILE> environment variable to specify the
- password file's filename (Andrew Dunstan )
+ password file's filename (Andrew)
Add spinlock support for the Itanium processor using Intel
- compiler (Vikram
- Kalsi)
+ compiler (Vikram Kalsi)
- Add support for wal_fsync_writethrough for Darwin (Chris
- Campbell)
+ Add support for fsync_writethrough on
+ Darwin (Chris Campbell)
- Allow
pg_config> to be compiled using MSVC (Andrew
- Dunstan)
+ Allow
pg_config> to be compiled using MSVC (Andrew)
This is required to build DBD::Pg using
MSVC>.
Kerberos 4 had security vulnerabilities and is no longer being
- maintained by the authors .
+ maintained.
- Allow libpq to be built thread-safe on Windows (Dave Page)
+ Allow
libpq to be built thread-safe
+ on Windows (Dave Page)
- i mplementation of OpenPGP symmetric-key and public-key encryption
+ I mplementation of OpenPGP symmetric-key and public-key encryption
Both RSA and Elgamal public-key algorithms are supported.
- Take build parameters (OpenSSL, zlib) from ./ configure> result
+ Take build parameters (OpenSSL, zlib) from configure> result
No need to edit the Makefile> anymore.