Newer
Older
<listitem>
<para>
Remove the <varname>silent_mode</> parameter (Heikki Linnakangas)
Similar behavior can be obtained with <command>pg_ctl start
-l postmaster.log</>.
Remove the <varname>wal_sender_delay</> parameter,
as it is no longer needed (Tom Lane)
</para>
</listitem>
Remove the <varname>custom_variable_classes</> parameter (Tom Lane)
The checking provided by this setting was dubious. Now any
setting can be prefixed by any class name.
</itemizedlist>
</sect3>
<sect3>
<title>Monitoring</title>
<itemizedlist>
<listitem>
<para>
Rename <link
linkend="monitoring-stats-views-table"><structname>pg_stat_activity</></link><structfield>.procpid</>
to <structfield>pid</>, to match other system tables (Magnus Hagander)
</para>
</listitem>
<listitem>
<para>
Create a separate <structfield>pg_stat_activity</> column to
report process state (Scott Mead, Magnus Hagander)
The previous <structfield>query</> and <structfield>query_start</>
values now remain available for an idle session, allowing enhanced
analysis.
Rename <structname>pg_stat_activity</>.<structfield>current_query</> to
<structfield>query</> because it is not cleared when the query
completes (Magnus Hagander)
</para>
</listitem>
<listitem>
<para>
Change all <acronym>SQL</acronym>-level statistics timing values
to be <type>float8</> columns measured in milliseconds (Tom Lane)
This change eliminates the designed-in assumption that the values
are accurate to microseconds and no more (since the <type>float8</>
values can be fractional).
The columns affected are
<structname>pg_stat_user_functions</>.<structfield>total_time</>,
<structname>pg_stat_user_functions</>.<structfield>self_time</>,
<structname>pg_stat_xact_user_functions</>.<structfield>total_time</>,
and
<structname>pg_stat_xact_user_functions</>.<structfield>self_time</>.
The statistics functions underlying these columns now also return
<type>float8</> milliseconds, rather than <type>bigint</>
microseconds.
<filename>contrib/pg_stat_statements</>'
<structfield>total_time</> column is now also measured in
milliseconds.
</para>
</listitem>
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
</itemizedlist>
</sect3>
</sect2>
<sect2>
<title>Changes</title>
<para>
Below you will find a detailed account of the changes between
<productname>PostgreSQL</productname> 9.2 and the previous major
release.
</para>
<sect3>
<title>Server</title>
<sect4>
<title>Performance</title>
<itemizedlist>
<listitem>
<para>
Allow queries to retrieve data only from indexes, avoiding heap
access (Robert Haas, Ibrar Ahmed, Heikki Linnakangas, Tom Lane)
This feature is often called <firstterm>index-only scans</>.
Heap access can be skipped for heap pages containing only tuples that
are visible to all sessions, as reported by the visibility map; so
the benefit applies mainly to mostly-static data. The visibility map
was made crash-safe as a necessary part of implementing this feature.
</para>
</listitem>
<listitem>
<para>
Add the <link linkend="SPGiST">SP-GiST</link> (Space-Partitioned
GiST) index access method (Teodor Sigaev, Oleg Bartunov, Tom
Lane)
</para>
<para>
SP-GiST is comparable to GiST in flexibility, but supports
unbalanced partitioned search structures rather than balanced
trees. For suitable problems, SP-GiST can be faster than GiST in both
index build time and search time.
</para>
</listitem>
<listitem>
<para>
Allow group commit to work effectively under heavy load (Peter
Geoghegan, Simon Riggs, Heikki Linnakangas)
</para>
<para>
Previously, batching of commits became ineffective as the write
workload increased, because of internal lock contention.
</para>
</listitem>
<listitem>
<para>
Allow uncontended locks to be managed using a new
fast-path lock mechanism (Robert Haas)
</para>
</listitem>
<listitem>
<para>
Reduce overhead of creating virtual transaction ID locks (Robert
</para>
</listitem>
<listitem>
<para>
Reduce the overhead of serializable isolation level locks (Dan
Ports)
</para>
</listitem>
<listitem>
<para>
Improve PowerPC and Itanium spinlock performance (Manabu Ori,
Robert Haas, Tom Lane)
</para>
</listitem>
<listitem>
<para>
Reduce overhead for shared invalidation cache messages (Robert
Haas)
</para>
</listitem>
<listitem>
<para>
Move the frequently accessed members of the <structname>PGPROC</>
shared memory array to a separate array (Pavan
Deolasee, Heikki Linnakangas, Robert Haas)
</para>
</listitem>
<listitem>
<para>
Improve <command>COPY</command> performance by adding tuples to
the heap in batches (Heikki Linnakangas)
Improve GiST index performance for geometric data types by producing
better trees with less memory allocation overhead (Alexander Korotkov)
</para>
</listitem>
<listitem>
<para>
Improve GiST index build times (Alexander Korotkov, Heikki
Linnakangas)
</para>
</listitem>
<listitem>
<para>
Allow hint bits to be set sooner for temporary and unlogged tables
(Robert Haas)
</para>
</listitem>
<listitem>
<para>
Allow sorting to be performed by inlined,
non-<acronym>SQL</acronym>-callable comparison functions (Peter
Geoghegan, Robert Haas, Tom Lane)
</para>
</listitem>
<listitem>
<para>
Make the number of CLOG buffers scale based on <link
linkend="guc-shared-buffers"><varname>shared_buffers</></link>
(Robert Haas, Simon Riggs, Tom Lane)
Improve performance of buffer pool scans that occur when tables or
databases are dropped (Jeff Janes, Simon Riggs)
<listitem>
<para>
Improve performance of checkpointer's fsync-request queue
when many tables are being dropped or truncated (Tom Lane)
</para>
</listitem>
Pass the safe number of file descriptors to child processes on Windows
(Heikki Linnakangas)
</para>
<para>
This allows Windows sessions to use more open file descriptors than
before.
</para>
</listitem>
</itemizedlist>
</sect4>
<sect4>
<title>Process Management</title>
<itemizedlist>
<listitem>
<para>
Create a dedicated background process to perform checkpoints (Simon
Formerly the background writer did both dirty-page writing and
checkpointing. Separating this into two processes allows each goal
to be accomplished more predictably.
</para>
</listitem>
<listitem>
<para>
Improve asynchronous commit behavior by waking the walwriter sooner
(Simon Riggs)
<para>
Previously, only <link
linkend="guc-wal-writer-delay"><varname>wal_writer_delay</></link>
triggered <acronym>WAL</acronym> flushing to disk; now filling a
<acronym>WAL</acronym> buffer also triggers <acronym>WAL</acronym>
writes.
</para>
</listitem>
<listitem>
<para>
Allow the bgwriter, walwriter, checkpointer, statistics collector,
log collector, and archiver background processes to sleep more
efficiently during periods of inactivity (Peter Geoghegan, Tom Lane)
This series of changes reduces the frequency of process wake-ups when
there is nothing to do, dramatically reducing power consumption on
idle servers.
</para>
</listitem>
</itemizedlist>
</sect4>
<sect4>
<title>Optimizer</title>
<itemizedlist>
<listitem>
<para>
Allow the planner to generate custom plans for specific parameter
values even when using prepared statements
(Tom Lane)
</para>
In the past, a prepared statement always had a single
<quote>generic</> plan that was used for all parameter values, which
was frequently much inferior to the plans used for non-prepared
statements containing explicit constant values. Now, the planner
attempts to generate custom plans for specific parameter values.
A generic plan will only be used after custom plans have repeatedly
proven to provide no benefit. This change should eliminate the
performance penalties formerly seen from use of prepared statements
(including non-dynamic statements in PL/pgSQL).
</para>
</listitem>
<listitem>
<para>
Improve the planner's ability to use nested loops with inner
index scans (Tom Lane)
The new <quote>parameterized path</> mechanism allows inner
index scans to use values from relations that are more than one join
level up from the scan. This can greatly improve performance in
situations where semantic restrictions (such as outer joins) limit
the allowed join orderings.
</para>
</listitem>
<listitem>
<para>
Improve the planning <acronym>API</acronym> for foreign data wrappers
(Etsuro Fujita, Shigeru Hanada, Tom Lane)
Wrappers can now provide multiple access <quote>paths</> for their
tables, allowing more flexibility in join planning.
</para>
</listitem>
<listitem>
<para>
Recognize self-contradictory restriction clauses for non-table
relations (Tom Lane)
</para>
<para>
This check is only performed when <link
linkend="guc-constraint-exclusion"><varname>constraint_exclusion</></link>
is <literal>on</literal>.
</para>
</listitem>
<listitem>
<para>
Allow <literal>indexed_col op ANY(ARRAY[...])</> conditions to be
used in plain index scans and index-only scans (Tom Lane)
</para>
<para>
Formerly such conditions could only be used in bitmap index scans.
</para>
</listitem>
<listitem>
<para>
Support <function>MIN</>/<function>MAX</> index optimizations on
<type>boolean</type> columns (Marti Raudsepp)
</para>
</listitem>
<listitem>
<para>
Account for set-returning functions in <command>SELECT</> target
lists when setting row count estimates (Tom Lane)
</para>
</listitem>
<listitem>
<para>
Fix planner to handle indexes with duplicated columns more reliably
(Tom Lane)
</para>
</listitem>
<listitem>
<para>
Collect and use element-frequency statistics for arrays (Alexander
Korotkov, Tom Lane)
</para>
<para>
This change improves selectivity estimation for the array
<literal><@</literal>, <literal>&&</literal>, and
<literal>@></literal> operators (array containment and overlaps).
</para>
</listitem>
<listitem>
<para>
Allow statistics to be collected for foreign tables
(Etsuro Fujita)
Improve cost estimates for use of partial indexes (Tom Lane)
</para>
</listitem>
<listitem>
<para>
Improve the planner's ability to use statistics for columns
referenced in subqueries (Tom Lane)
</para>
</listitem>
<listitem>
<para>
Improve statistical estimates for subqueries using
<literal>DISTINCT</> (Tom Lane)
</para>
</listitem>
</itemizedlist>
</sect4>
<sect4>
<title>Authentication</title>
<itemizedlist>
<listitem>
<para>
Do not treat role names and <literal>samerole</> specified in <link
linkend="auth-pg-hba-conf"><filename>pg_hba.conf</filename></link>
as automatically including superusers (Andrew Dunstan)
This makes it easier to use <literal>reject</> lines with group roles.
</para>
</listitem>
<listitem>
<para>
Adjust <filename>pg_hba.conf</filename> processing to handle token
parsing more consistently (Brendan Jurd, Álvaro Herrera)
Disallow empty <filename>pg_hba.conf</filename> files (Tom Lane)
This was done to more quickly detect misconfiguration.
</para>
</listitem>
<listitem>
<para>
Make superuser privilege imply replication privilege (Noah Misch)
This avoids the need to explicitly assign such privileges.
</para>
</listitem>
</itemizedlist>
</sect4>
<sect4>
<title>Monitoring</title>
<itemizedlist>
<listitem>
<para>
Attempt to log the current query string during a backend crash
(Marti Raudsepp)
</para>
</listitem>
<listitem>
<para>
Make logging of autovacuum I/O activity more verbose (Greg
Smith, Noah Misch)
<para>
This logging is triggered by <link
linkend="guc-log-autovacuum-min-duration"><varname>log_autovacuum_min_duration</></link>.
</para>
</listitem>
<listitem>
<para>
Make <acronym>WAL</acronym> replay report failures sooner
(Fujii Masao)
</para>
<para>
There were some cases where failures were only reported once the
server went into master mode.
</para>
</listitem>
<listitem>
<para>
Add <link
linkend="functions-admin-backup"><function>pg_xlog_location_diff()</></link>
to simplify WAL location comparisons (Euler Taveira de Oliveira)
<para>
This is useful for computing replication lag.
</para>
</listitem>
<listitem>
<para>
Support configurable event log application names on Windows
(MauMau, Magnus Hagander)
This allows different instances to use the event log
with different identifiers, by setting the <link
linkend="guc-event-source"><varname>event_source</></link>
server parameter, which is similar to how <link
linkend="guc-syslog-ident"><varname>syslog_ident</></link> works.
</para>
</listitem>
<listitem>
<para>
Change <quote>unexpected EOF</> messages to <literal>DEBUG1</> level,
except when there is an open transaction (Magnus Hagander)
<para>
This change reduces log chatter caused by applications that close
database connections ungracefully.
</para>
</itemizedlist>
</sect4>
<sect4>
<title>Statistical Views</title>
<itemizedlist>
<listitem>
<para>
Track temporary file sizes and file counts in the <link
linkend="pg-stat-database-view"><structname>pg_stat_database</></link>
system view (Tomas Vondra)
</para>
</listitem>
<listitem>
<para>
Add a deadlock counter to the <structname>pg_stat_database</>
system view (Magnus Hagander)
</para>
</listitem>
<listitem>
<para>
Add a server parameter <link
linkend="guc-track-io-timing"><varname>track_io_timing</></link>
to track I/O timings (Ants Aasma, Robert Haas)
</para>
</listitem>
<listitem>
<para>
Report checkpoint timing information in <link
linkend="pg-stat-bgwriter-view"><structname>pg_stat_bgwriter</></link>
</para>
</listitem>
</itemizedlist>
</sect4>
<sect4>
<title>Server Settings</title>
<itemizedlist>
<listitem>
<para>
Silently ignore nonexistent schemas specified in <link
linkend="guc-search-path"><varname>search_path</></link> (Tom Lane)
</para>
<para>
This makes it more convenient to use generic path settings, which
might include some schemas that don't exist in all databases.
</para>
</listitem>
<listitem>
<para>
Allow superusers to set <link
linkend="guc-deadlock-timeout"><varname>deadlock_timeout</></link>
per-session, not just per-cluster (Noah Misch)
<para>
This allows <varname>deadlock_timeout</> to be reduced for
transactions that are likely to be involved in a deadlock, thus
detecting the failure more quickly. Alternatively, increasing the
value can be used to reduce the chances of a session being chosen for
cancellation due to a deadlock.
</para>
</listitem>
<listitem>
<para>
Add a server parameter <link
linkend="guc-temp-file-limit"><varname>temp_file_limit</></link>
to constrain temporary file space usage per session (Mark Kirkwood)
</para>
</listitem>
<listitem>
<para>
Allow a superuser to <command>SET</command> an extension's
superuser-only custom variable before loading the associated
extension (Tom Lane)
</para>
<para>
The system now remembers whether a <command>SET</command> was
performed by a superuser, so that proper privilege checking can be
done when the extension is loaded.
</para>
</listitem>
<listitem>
<para>
Add <link linkend="app-postmaster">postmaster</link> <option>-C</>
option to query configuration parameters (Bruce Momjian)
</para>
This allows <application>pg_ctl</> to better handle cases where
<envar>PGDATA</> or <option>-D</> points to a configuration-only
directory.
</para>
</listitem>
<listitem>
<para>
Replace an empty locale name with the implied value in
<command>CREATE DATABASE</>
(Tom Lane)
</para>
<para>
This prevents cases where
<structname>pg_database</>.<structfield>datcollate</> or
<structfield>datctype</> could be interpreted differently after a
server restart.
</para>
</listitem>
</itemizedlist>
<sect5>
<title><filename>postgresql.conf</filename></title>
<itemizedlist>
<listitem>
<para>
Allow multiple errors in <filename>postgresql.conf</filename>
to be reported, rather than just the first one (Alexey Klyukin,
Tom Lane)
</para>
</listitem>
<listitem>
<para>
Allow a reload of <filename>postgresql.conf</filename> to be
processed by all sessions, even if there are some settings that
are invalid for particular sessions (Alexey Klyukin)
Previously, such not-valid-within-session values would cause all
setting changes to be ignored by that session.
</para>
</listitem>
<listitem>
<para>
Add an <literal>include_if_exists</> facility for configuration
files (Greg Smith)
<para>
This works the same as <literal>include</>, except that an error
is not thrown if the file is missing.
</para>
</listitem>
<listitem>
<para>
Identify the server time zone during <application>initdb</>, and set
<filename>postgresql.conf</filename> entries
<link linkend="guc-timezone"><varname>timezone</></link> and
<link linkend="guc-log-timezone"><varname>log_timezone</></link>
accordingly (Tom Lane)
</para>
<para>
This avoids expensive time zone probes during server start.
</para>
</listitem>
<listitem>
<para>
Fix <link
linkend="view-pg-settings"><structname>pg_settings</></link> to
report <filename>postgresql.conf</filename> line numbers on Windows
(Tom Lane)
</para>
</listitem>
</itemizedlist>
</sect5>
</sect4>
</sect3>
<sect3>
<title>Replication and Recovery</title>
<listitem>
<para>
Allow streaming replication slaves to forward data to other slaves
(<link linkend="cascading-replication"><firstterm>cascading
replication</></link>) (Fujii Masao)
<para>
Previously, only the master server could supply streaming
replication log files to standby servers.
</para>
</listitem>
<listitem>
<para>
Add new <link
linkend="guc-synchronous-commit"><varname>synchronous_commit</></link>
mode <literal>remote_write</> (Fujii Masao, Simon Riggs)
This mode waits for the standby server to write transaction data to
its own operating system, but does not wait for the data to be
flushed to the standby's disk.
</para>
</listitem>
<listitem>
<para>
Add a <link
linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
tool to archive WAL file changes as they are written, rather
than waiting for completed WAL files (Magnus Hagander)
</para>
</listitem>
<listitem>
<para>
Allow <link
linkend="app-pgbasebackup"><application>pg_basebackup</></link>
to make base backups from standby servers (Jun Ishizuka, Fujii Masao)
This feature lets the work of making new base backups be off-loaded
from the primary server.
</para>
</listitem>
<listitem>
<para>
Allow streaming of WAL files while <application>pg_basebackup</>
is performing a backup (Magnus Hagander)
</para>
<para>
This allows passing of WAL files to the standby before they are
discarded on the primary.
</para>
</listitem>
</sect3>
<sect3>
<title>Queries</title>
<itemizedlist>
<listitem>
<para>
Cancel the running query if the client gets disconnected
(Florian Pflug)
</para>
<para>
If the backend detects loss of client connection during a query, it
will now cancel the query rather than attempting to finish it.
Retain column names at run time for row expressions
(Andrew Dunstan, Tom Lane)
This change allows better results when a row value is converted to
<type>hstore</> or <type>json</> type: the fields of the resulting
value will now have the expected names.
</para>
</listitem>
<listitem>
<para>
Improve column labels used for sub-<command>SELECT</> results
(Marti Raudsepp)
</para>
<para>
Previously, the generic label <literal>?column?</> was used.
</para>
</listitem>
<listitem>
<para>
Improve heuristics for determining the types of unknown values
(Tom Lane)
</para>
<para>
The longstanding rule that an unknown constant might have the
same type as the value on the other side of the operator using it
is now applied when considering polymorphic operators, not only
for simple operator matches.
</para>
</listitem>
<listitem>
<para>
Warn about creating casts to or from domain types (Robert Haas)
Such casts have no effect.
</para>
</listitem>
<listitem>
<para>
When a row fails a <literal>CHECK</> or <literal>NOT NULL</>
constraint, show the row's contents as error detail (Jan
Kundrát)
<para>
This should make it easier to identify which row is problematic
when an insert or update is processing many rows.
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>Object Manipulation</title>
<itemizedlist>
<listitem>
<para>
Provide more reliable operation during concurrent
<acronym>DDL</acronym> (Robert Haas, Noah Misch)
</para>
This change adds locking that should eliminate <quote>cache lookup
failed</> errors in many scenarios. Also, it is no longer possible
to add relations to a schema that is being concurrently dropped, a
scenario that formerly led to inconsistent system catalog contents.
<listitem>
<para>
Add <literal>CONCURRENTLY</> option to <link
linkend="SQL-DROPINDEX"><command>DROP INDEX</command></link>
(Simon Riggs)
<para>
This allows index removal without blocking other sessions.
</para>
</listitem>
<listitem>
<para>
Allow foreign data wrappers to have per-column options (Shigeru Hanada)
</para>
</listitem>
<listitem>
<para>
Improve pretty-printing of view definitions (Andrew Dunstan)
</para>
</listitem>
</itemizedlist>
<sect4>
<title>Constraints</title>
<itemizedlist>
<listitem>
<para>
Allow <link linkend="ddl-constraints"><literal>CHECK</></link>
constraints to be declared <literal>NOT VALID</> (Álvaro
Herrera)
Adding a <literal>NOT VALID</> constraint does not cause the table to
be scanned to verify that existing rows meet the constraint.
Subsequently, newly added or updated rows are checked.
Such constraints are ignored by the planner when considering