Skip to content
Snippets Groups Projects
release-9.2.sgml 75.3 KiB
Newer Older
<!-- doc/src/sgml/release-9.2.sgml -->
<!-- See header comment in release.sgml about typical markup -->

 <sect1 id="release-9-2">
  <title>Release 9.2</title>

  <note>
   <title>Release Date</title>
   <simpara>2012-??-??</simpara>
   <simpara>CURRENT AS OF 2012-08-21</simpara>
  </note>

  <sect2>
   <title>Overview</title>

   <para>
    NARRATIVE HERE. Major enhancements include:
   </para>

   <itemizedlist>
    <listitem><para>MAJOR LIST HERE</para></listitem>
    <!-- This list duplicates items below, but without authors or details-->

   </itemizedlist>

   <para>
    The above items are explained in more detail in the sections below.
   </para>

  </sect2>

  <sect2>

  <title>Migration to Version 9.2</title>

   <para>
    A dump/restore using <application>pg_dump</application>, or use of
    <application>pg_upgrade</application>, is required for those wishing
    to migrate data from any previous release.
   </para>

   <para>
    Version 9.2 contains a number of changes that may affect compatibility
    with previous releases.  Observe the following incompatibilities:
   </para>

   <sect3>
    <title>System Catalogs</title>
        Remove the <structfield>spclocation</> field from <link
        linkend="catalog-pg-tablespace"><structname>pg_tablespace</></link>
        (Magnus Hagander)
        This field was duplicative of the symbolic links that actually define
        tablespace locations, and thus risked errors of omission when moving
        a tablespace.  This change allows tablespace directories to be moved
        while the server is down, by manually adjusting the symbolic links.
        To replace this field, we have added <link
        linkend="functions-info-catalog-table"><function>pg_tablespace_location()</></link>
        to allow querying of the symbolic links.
        Move <type>tsvector</> most-common-element statistics to new
        <link linkend="view-pg-stats"><structname>pg_stats</></link> columns
        (Alexander Korotkov)
        Consult <structfield>most_common_elems</>
        and <structfield>most_common_elem_freqs</> for the data formerly
        available in <structfield>most_common_vals</>
        and <structfield>most_common_freqs</> for a <type>tsvector</> column.
    </itemizedlist>

   </sect3>

   <sect3>
    <title>Functions</title>

    <itemizedlist>

        Remove <link linkend="hstore">hstore</link>'s <literal>=&gt;</>
        operator (Robert Haas)
        Users should now use <function>hstore(text, text)</>.  Since
        <productname>PostgreSQL</productname> 9.0, a warning message has been
        emitted when an operator named <literal>=&gt;</> is created because
        the <acronym>SQL</acronym> standard reserves that token for
        another use.
        Ensure that <link
        linkend="functions-xml-processing"><function>xpath()</></link>
        escapes special characters in string values (Florian Pflug)
        Without this it is possible to output invalid <acronym>XML</acronym>.
Robert Haas's avatar
Robert Haas committed
      <listitem>
       <para>
        Make <link
        linkend="functions-admin-dbobject"><function>pg_relation_size()</></link>
        and friends return NULL if the object does not exist (Phil Sorber)
Robert Haas's avatar
Robert Haas committed
       </para>

       <para>
        This prevents queries that call these functions from returning
        errors immediately after a concurrent <command>DROP</>.
Robert Haas's avatar
Robert Haas committed
       </para>
      </listitem>

        linkend="functions-datetime-extract"><function>EXTRACT</></link> of
        a non-timezone-aware value measure the epoch from local midnight,
        not <acronym>UTC</acronym> midnight (Tom Lane)
       </para>
       <para>
        Having these computations depend on <acronym>UTC</acronym>
        was inconsistent.  The old behavior is available by casting the
        value to timestamp with time zone.
       </para>
      </listitem>
      <listitem>
       <para>
        Properly parse time strings with trailing <literal>yesterday</>,
        <literal>today</>, and <literal>tomorrow</> (Dean Rasheed)
       </para>
        Previously, <literal>SELECT '04:00:00 yesterday'::timestamp</literal>
        returned yesterday's date at midnight.
      <listitem>
       <para>
        Fix <link
        linkend="functions-formatting"><function>to_date()</></link> and
        <function>to_timestamp()</> to wrap incomplete dates toward 2020
        (Bruce Momjian)
       </para>
        Previously, supplied years and year masks of less than four digits
        wrapped inconsistently.
       </para>
      </listitem>


   <sect3>
    <title>Object Modification</title>

    <itemizedlist>

      <listitem>
       <para>
        Prevent  <link linkend="SQL-ALTERDOMAIN"><command>ALTER
        DOMAIN</command></link> from working on non-domain types (Peter
        Eisentraut)
       </para>
       <para>
        Owner and schema changes were previously possible on non-domain
        types.
       </para>
      </listitem>
        No longer forcibly lowercase procedural language names (Robert Haas)
        While unquoted language identifiers are still lowercased, strings
        and quoted identifiers are no longer forcibly down-cased.
        Thus for example <literal>CREATE FUNCTION ... LANGUAGE 'C'</>
        will no longer work; it must be spelled <literal>'c'</>, or better
        omit the quotes.
      <listitem>
       <para>
        Change system-generated names of foreign key enforcement triggers
        (Tom Lane)
       </para>

       <para>
        This change ensures that the triggers fire in the correct order in
        some corner cases involving self-referential foreign key constraints.
       </para>
      </listitem>

    </itemizedlist>

   </sect3>

   <sect3>
    <title>Command-Line Tools</title>

    <itemizedlist>

      <listitem>
       <para>
        Provide consistent backquote, variable
        expansion, and quoted substring behavior in <link
        linkend="APP-PSQL"><application>psql</></link> meta-command
        arguments (Tom Lane)
       </para>
        Previously, such references were treated oddly when not separated by
        whitespace from adjacent text.  For example <literal>'FOO'BAR</> was
        output as <literal>FOO BAR</> (unexpected insertion of a space) and
        <literal>FOO'BAR'BAZ</> was output unchanged (not removing the quotes
        as most would expect).
      <listitem>
       <para>
        No longer treat <link
        linkend="APP-CLUSTERDB"><application>clusterdb</></link>
        table names as double-quoted; no longer treat <link
        linkend="APP-REINDEXDB"><application>reindexdb</></link> table
        and index names as double-quoted (Bruce Momjian)
       </para>
        Users must now include double-quotes in the command arguments if
        quoting is wanted.
        <link linkend="APP-CREATEUSER"><application>createuser</></link>
        no longer prompts for option settings by default (Peter Eisentraut)
        Use <option>--interactive</> to obtain the old behavior.
        Disable prompting for the user name in <link
        linkend="APP-DROPUSER"><application>dropuser</></link> unless
        <option>--interactive</> is specified (Peter Eisentraut)

   </sect3>

   <sect3>
    <title>Server Settings</title>

    <itemizedlist>
        Add server parameters for specifying the <link
        linkend="guc-ssl-ca-file">locations of server-side
        <acronym>SSL</acronym> files</link> (Peter Eisentraut)
        This allows changing the names and locations of the files that were
        previously hard-coded as <filename>server.crt</>,
        <filename>server.key</>, <filename>root.crt</>, and
        <filename>root.crl</> in the data directory.
        <emphasis>The server will no longer examine <filename>root.crt</> or
        <filename>root.crl</> by default</emphasis>; to load these files, the
        associated parameters must be set to non-default values.
        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)
      <listitem>
       <para>
        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.
       </para>
      </listitem>
    </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)
        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)
      <listitem>
       <para>
        Change all <acronym>SQL</acronym>-level statistics timing values
        to be <type>float8</> columns measured in milliseconds (Tom Lane)
        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</>.
      <listitem>
       <para>
        Change <application>pg_stat_statements</>'
        <structfield>total_time</> column to be measured in milliseconds
        (Tom Lane)
       </para>
      </listitem>
    </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.
        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.
        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.
        Allow uncontended locks to be managed using a new
        fast-path lock mechanism (Robert Haas)
        Reduce overhead of creating virtual transaction id locks (Robert
        Reduce the overhead of serializable isolation level locks (Dan
        Ports)
        Improve PowerPC and Itanium spinlock performance (Manabu Ori,
        Robert Haas, Tom Lane)
        Reduce overhead for shared invalidation cache messages (Robert
        Haas)
        Move the frequently accessed members of the <structname>PGPROC</>
        shared memory array to a separate array (Pavan
        Deolasee, Heikki Linnakangas, Robert Haas)
        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)
        Improve GiST index build times (Alexander Korotkov, Heikki
        Linnakangas)
        Allow hint bits to be set sooner for temporary and unlogged tables
        Allow sorting to be performed by inlined,
        non-<acronym>SQL</acronym>-callable comparison functions (Peter
        Geoghegan, Robert Haas, Tom Lane)
        Take fewer <acronym>MVCC</acronym> snapshots
        (Robert Haas)
        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)
        Improve performance of checkpointer's fsync-request queue
        when many tables are being dropped or truncated (Tom Lane)
        Pass the safe number of file descriptors to child processes on Windows
        (Heikki Linnakangas)
        This allows Windows sessions to use more open file descriptors.
     </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.
        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>
        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.
     </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
        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).
        Improve the planner's ability to use nested loops with inner
        index scans (Tom Lane)
        The new <quote>parameterized path</> mechanism allows inner
        indexscans 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.
        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.
        Recognize self-contradictory restriction clauses for non-table
        relations (Tom Lane)
       </para>

       <para>
        This is only enabled when <link
        linkend="guc-constraint-exclusion"><varname>constraint_exclusion</></link>
        is <literal>on</literal>.
        Allow <literal>indexed_col op ANY(ARRAY[...])</> conditions to be
        used in plain indexscans and index-only scans (Tom Lane)
       </para>

       <para>
        Formerly such conditions could only be used in bitmap index scans.
      <listitem>
       <para>
        Support <function>MIN</>/<function>MAX</> index optimizations on
        boolean columns (Marti Raudsepp)
      <listitem>
       <para>
        Account for set-returning functions in <command>SELECT</> target
        lists when setting rowcount estimates (Tom Lane)
       </para>
      </listitem>

        Fix planner to handle indexes with duplicated columns more reliably
        (Tom Lane)
        Collect and use element-frequency statistics for arrays (Alexander
        Korotkov, Tom Lane)
       </para>

       <para>
        This change improves selectivity estimation for the array
        <literal>&lt;@</literal>, <literal>&amp;&amp;</literal>, and
        <literal>@&gt;</literal> (containment and overlaps) array operators.
        Allow statistics to be collected for foreign tables
        (Etsuro Fujita)
        Improve cost estimates for use of partial indexes (Tom Lane)
        Improve the planner's ability to use statistics for columns
        referenced in subqueries (Tom Lane)
        Improve statistical estimates for subqueries using
        <literal>DISTINCT</> (Tom Lane)
     </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.
        Adjust <filename>pg_hba.conf</filename> processing to handle token
        parsing more consistently (Brendan Jurd, &Aacute;lvaro Herrera)
        Disallow empty <filename>pg_hba.conf</filename> files (Tom Lane)
        This was done to more quickly detect misconfiguration.
        Make superuser privilege imply replication privilege (Noah Misch)
        This avoids the need to explicitly assign such privileges.
     </itemizedlist>

    </sect4>

    <sect4>
     <title>Monitoring</title>

     <itemizedlist>

      <listitem>
       <para>
        Attempt to log the current query string during a backend crash
        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>
        Make <acronym>WAL</acronym> replay report failures sooner
       <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>
        Support configurable eventlog application names on Windows
        (MauMau, Magnus Hagander)
       <para>
        This allows different instances to use the eventlog
        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>
        Change <quote>unexpected EOF</> messages to <literal>DEBUG1</> level,
        except when there is an open transaction (Magnus Hagander)
     </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)
        Add a server parameter <link
        linkend="guc-track-io-timing"><varname>track_io_timing</></link>
        to track I/O timings (Ants Aasma, Robert Haas)
      <listitem>
       <para>
        Report checkpoint timing information in <link
        linkend="pg-stat-bgwriter-view"><structname>pg_stat_bgwriter</></link>
        (Greg Smith, Peter Geoghegan)
     </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>
      </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.
        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)
        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.
       </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.