1 <!-- doc/src/sgml/release-9.3.sgml -->
2 <!-- See header comment in release.sgml about typical markup -->
4 <sect1 id="release-9-3">
5 <title>Release 9.3</title>
8 <title>Release Date</title>
9 <simpara>2013-XX-XX, CURRENT AS OF 2013-04-20</simpara>
13 <title>Overview</title>
16 ADD HERE Major enhancements include:
19 <!-- This list duplicates items below, but without authors or details-->
22 The above items are explained in more detail in the sections below.
29 <title>Migration to Version 9.3</title>
32 A dump/restore using <link
33 linkend="APP-PG-DUMPALL"><application>pg_dumpall</></link>, or use
34 of <link linkend="pgupgrade"><application>pg_upgrade</></link>, is
35 required for those wishing to migrate data from any previous release.
39 Version 9.3 contains a number of changes that may affect compatibility
40 with previous releases. Observe the following incompatibilities:
44 <title>ADD HERE</title>
51 <title>Changes</title>
54 Below you will find a detailed account of the changes between
55 <productname>PostgreSQL</productname> 9.3 and the previous major
63 <title>Locking</title>
69 Prevent non-key-field row updates from locking foreign key rows
70 (Álvaro Herrera, Noah Misch, Andres Freund, Alexander
71 Shulgin, Marti Raudsepp)
75 This improves concurrency and reduces the probability of deadlocks.
76 UPDATEs on non-key columns use the new SELECT FOR NO KEY UPDATE lock
77 type, and foreign key checks use the new SELECT FOR KEY SHARE lock mode.
83 Add configuration variable lock_timeout to limit lock wait duration
84 (Zoltán Böszörményi)
90 Add cache of local locks (Jeff Janes)
94 This speeds lock release at statement completion in transactions
95 that hold many locks; it is particularly useful for pg_dump.
104 <title>Indexes</title>
110 Add SP-GiST support for range data types (Alexander Korotkov)
116 Allow unlogged GiST indexes (Jeevan Chalke)
122 Improve concurrency of hash indexes (Robert Haas)
131 <title>Optimizer</title>
137 Collect and use histograms for range types (Alexander Korotkov)
143 Reduce optimizer overhead by discarding plans with unneeded cheaper
144 startup costs (Tom Lane)
150 Improve optimizer cost estimation for index access (Tom Lane)
159 <title>General Performance</title>
165 Add COPY FREEZE option to avoid the overhead of later marking
166 tuples as committed (Simon Riggs, Jeff Davis)
172 Improve performance of NUMERIC calculations (Kyotaro Horiguchi)
178 Improve grouping of sessions waiting for commit_delay (Peter
183 This improves the usefulness and behavior of commit_delay.
184 BACKWARD COMPATIBILITY
190 Allow in-memory sorts to use their full memory allocation (Jeff Janes)
194 Users who have set work_mem based on the previous behavior should
195 revisit that setting.
201 Improve performance for transactions creating, rebuilding, or
202 dropping many relations (Jeff Janes, Tomas Vondra)
208 Improve performance of the CREATE TEMPORARY TABLE ... ON COMMIT
209 DELETE ROWS clause by only issuing delete if the temporary table
210 was accessed (Heikki Linnakangas)
216 Have vacuum recheck visibility after it has removed expired tuples
221 This increases the chance of a page being marked as all-visible.
227 Split pgstat file into per-database and global files (Tomas Vondra)
231 This reduces the statistics management read and write overhead.
240 <title>Monitoring</title>
246 Add optional ability to checksum data pages and report corruption
247 (Simon Riggs, Jeff Davis, Greg Smith)
251 The checksum option can be set during initdb.
257 Allow pg_terminate_backend() to terminate other backends with
258 the same role (Dan Farina)
262 Previously, only superusers could terminate other sessions.
268 Allow the statistics collector to operate properly in cases where
269 the system clock goes backwards (Tom Lane)
273 Previously statistics collection would stop until the time again
274 reached the previously-stored latest time.
283 <title>Authentication</title>
289 Improve LDAP error reporting and documentation (Peter Eisentraut)
295 Add support for LDAP authentication to be specified in URL format
302 Change the ssl_ciphers parameter to start with DEFAULT, rather
303 than ALL, then remove insecure ciphers (Magnus Hagander)
307 It is assumed DEFAULT is more appropriate cipher set.
313 Parse/load pg_ident.conf once, not during each connection (Amit
318 This is similar to how pg_hba.conf is processed.
327 <title>Server Settings</title>
333 Dramatically reduce System V shared memory usage (Robert Haas)
337 Instead, on Unix-like systems, mmap() is used for shared memory.
338 This eliminates the requirement of increasing System V shared
339 memory kernel parameters.
345 Allow the postmaster to listen on multiple Unix-domain sockets
350 This renames configuration parameter unix_socket_directory to
351 unix_socket_directories, which accepts a list of directories.
357 Allow a directory of configuration files to be processed (Magnus
358 Hagander, Greg Smith, Selena Deckelmann)
362 The directory is specified as include_dir in server configuration file.
368 Increase the maximum initdb-configured value for shared_buffers
369 to 128MB (Robert Haas)
373 This is the maximum value initdb attempts to set in
374 postgresql.conf; the previous value was 32MB.
380 Require superuser privileges to set commit_delay because it
381 can now potentially delay other sessions (Simon Riggs)
382 BACKWARD COMPATIBILITY
389 Remove the external PID file on postmaster exit (Peter Eisentraut)
395 Have "session id" in log_line_prefix (%c) always output four hex
396 digits after the period (Bruce Momjian) COMPATIBILITY
407 <title>Replication and Recovery</title>
413 Allow a streaming replication standbys to follow a timeline switch (Heikki Linnakangas)
417 This allows streaming standbys to feed from newly-promoted slaves.
418 Previously slaves required access to a WAL archive directory to
425 Add SQL functions pg_backup_in_progress() and pg_backup_start_time() (Gilles Darold)
429 These functions report the status of base backups.
435 Improve performance of streaming log shipping with
436 synchronous_commit disabled (Andres Freund)
442 Allow much faster promotion of a streaming standby to primary (Simon
443 Riggs, Kyotaro Horiguchi)
449 Add the last checkpoint's redo location to pg_controldata's output
454 This information is useful for determining the WAL files needed for
461 Allow tooling like pg_receivexlog to run on computers with different
462 architectures (Heikki Linnakangas)
468 Have pg_basebackup --write-recovery-conf output a minimal
469 recovery.conf (Zoltán Böszörményi, Magnus Hagander)
473 This simplifies setting up a standby server.
479 Allow pg_receivexlog and pg_basebackup -X to handle streaming
480 timeline switches (Heikki Linnakangas)
486 Add wal_receiver_timeout parameter to control the WAL receiver
487 timeout (Amit Kapila)
491 This allows more rapid detection of connection failure. No longer set
492 wal_receiver_status_interval?
498 Rename replication_timeout to wal_sender_timeout (Amit Kapila)
502 BACKWARD COMPATIBILITY
503 This setting controls the WAL sender timeout.
510 <title>Write-Ahead Log (WAL)</title>
516 Store WAL in a continuous stream, rather than skipping the last
517 16MB segment every 4GB (Heikki Linnakangas) BACKWARD COMPATIBLE BREAK
521 Previously, WAL files ending in FF were not used. If you have
522 WAL backup or restore scripts that took that skipping into account,
523 they need to be adjusted.
529 Change the WAL record format to allow splitting the record header
530 across pages (Heikki Linnakangas)
534 The new format is slightly more compact.
545 <title>Queries</title>
551 Implement SQL-standard LATERAL for FROM-clause subqueries and
552 function calls (Tom Lane)
556 This is useful in allowing FROM subqueries and functions to reference
557 output from tables in the FROM clause. The LATERAL keyword is optional
564 Add support for piping COPY and psql \copy to/from an external program (Etsuro
571 Improve query string error location reporting (Tom Lane)
575 Only CREATE SCHEMA ... IF NOT EXISTS? If so, remove it.
584 <title>Object Manipulation</title>
590 Add support to event triggers (Dimitri Fontaine, Robert Haas,
591 Álvaro Herrera)
595 This allows C functions to be called when specific commands are run.
601 Allow a multi-row VALUES clause in rules to reference OLD/NEW (Tom Lane)
607 Add CREATE SCHEMA ... IF NOT EXISTS clause (Fabrízio de
614 Throw an error if expiring tuple is again updated or deleted (Kevin Grittner)
615 DETAILS? BACKWARD INCOMPATIBILITY
621 Have REASSIGN OWNED also change ownership of shared objects (Álvaro
629 <title><link linkend="SQL-CREATETABLE"><command>CREATE TABLE</></link></title>
635 No longer output messages about implicit index and sequence creation (Robert Haas)
639 These messages now appear with DEBUG1-level output.
645 Allow CREATE TABLE IF NOT EXISTS to succeed for a non-existent schema
650 Previously, it threw an error if the schema did not exist.
659 <title>Constraints</title>
665 Change ON UPDATE SET NULL/SET DEFAULT foreign key actions to affect
666 all referenced columns, not just those referenced in the UPDATE
671 Previously only columns referenced in the UPDATE were set to null or DEFAULT.
672 BACKWARD COMPATIBILITY CHANGE
678 Provide clients with constraint violation details as separate fields
683 This allows clients to retrieve table, column, data type, or constraint
684 name error details. Previously such information had to be extracted from
685 error strings. Client language support is required to access these
692 Internally store default foreign key matches (non-FULL, non-PARTIAL) as "simple" (Tom Lane)
696 These were previously stored as "<unspecified>".
697 This changes the value stored in system column
698 pg_constraint.confmatchtype. BACKWARD COMPATIBILITY CHANGE
707 <title><command>ALTER</></title>
713 Add the ALTER TYPE ... IF NOT EXISTS clause when adding enumerated type labels (Andrew
718 This is useful for conditional label creation in transaction blocks.
724 Add ALTER ROLE ALL SET to add settings to all users (Peter Eisentraut)
728 This allows settings to apply to all users in all databases. ALTER
729 DATABASE SET already allowed addition of settings for all users in a
730 single database. postgresql.conf has a similar effect.
736 Add support for ALTER RULE ... RENAME (Ali Dar)
745 <title><link linkend="rules-views"><command>VIEWs</></link></title>
751 Add a materialized view relations (Kevin Grittner)
755 Unlike ordinary views, where the base tables are read on every access,
756 materialized views create physical tables at creation or refresh time.
757 Access to the materialized view reads from these materialized physical
758 tables. There is no facility for incrementally refreshing materialized
759 views or auto-accessing them via base table access.
765 Make simple views auto-updatable (Dean Rasheed)
769 Simple views that reference some or all columns from a single base table
770 are now updatable by default. More complex views can be made updatable
771 using INSTEAD OF triggers or INSTEAD rules.
777 Allow views and rules to handle cases where referenced tables are
778 renamed, or columns are renamed, added, or dropped (Tom Lane)
779 HOW DOES IT HANDLE A DROPPED REFERENCED COLUMN?
785 Add CREATE RECURSIVE VIEW syntax (Peter Eisentraut)
789 Internally this is translated into CREATE VIEW ... WITH RECURSIVE.
795 When converting a table to a view, remove its system columns (Tom Lane)
807 <title>Data Types</title>
813 Increase the maximum length of large objects from 2GB to 4TB (Nozomi
818 This change includes new libpq and server-side 64-bit-enabled functions.
824 Allow text timezone designations, e.g. "America/Chicago" when using the
825 ISO "T" timestamptz format (Bruce Momjian)
838 Add operators and functions to extract values from JSON data strings
845 Allow JSON data strings to be converted into records (Andrew Dunstan)
851 Add functions to convert values, records, and hstore data to JSON (Andrew Dunstan)
863 <title>Functions</title>
869 Add array_remove() and array_replace() functions (Marco Nenciarini, Gabriele Bartolini)
875 Allow concat() and format() to properly expand VARIADIC-labeled
876 arguments (Pavel Stehule)
882 Improve format() to handle field width and left/right alignment
889 Have to_char(), to_date(), and to_timestamp() properly handle
890 negative century designations (CC) (Bruce Momjian)
894 Previously the behavior was either wrong or inconsistent with
895 positive/AD handling, e.g. format mask 'IYYY-IW-DY'.
901 Have to_date() and to_timestamp() return proper results when mixing
902 ISO and Gregorian week/day designations (Bruce Momjian)
908 Cause pg_get_viewdef() to default to wrapping after every SELECT
909 target list and FROM entry (Marko Tiikkaja)
913 This causes view output, like from pg_dump, to be more narrow.
919 Have map_sql_value_to_xml_value() properly expand domains (Pavel
926 Force cached functions to be replanned if the search_path changes (Tom Lane)
930 Previously functions already run in the current session ignored
941 <title>Server-Side Languages</title>
947 Allow SPI functions to access the number of rows processed by COPY (Pavel
955 <title><link linkend="plpgsql">PL/pgSQL</link> Server-Side Language</title>
961 Allow PL/pgSQL to use RETURN with a composite-type expressions (Asif
966 Previously RETURN could only reference composite-type variables.
972 Allow PL/pgSQL to access the number of rows processed by COPY (Pavel
977 The command is GET DIAGNOSTICS x = ROW_COUNT.
983 Allow greater flexibility in where keywords can be used in PL/pgSQL (Tom Lane)
992 <title><link linkend="plpython">PL/Python</link> Server-Side Language</title>
998 Add PL/Python result object string handler (Peter Eisentraut)
1002 This allows plpy.debug(rv) to output something reasonable.
1008 Have PL/Python convert oid values to a proper Python numeric type (Peter Eisentraut)
1014 Handle SPIErrors raised explicitly with PL/Python's RAISE the same as
1015 as internal SPI errors (Oskari Saarenmaa and Jan Urbanski)
1026 <title>Client Applications</title>
1032 Add command-line utility pg_isready to check if the server is ready
1033 to accept connections (Phil Sorber)
1039 Support multiple --table arguments for pg_restore, clusterdb,
1040 reindexdb, and vacuumdb (Josh Kupershmidt)
1044 This is similar to the pg_dump --table support.
1050 Add -d option to pg_dumpall, pg_basebackup, pg_receivexlog to
1051 specify the connection string (Amit Kapila)
1057 Allow pg_ctl --idempotent to a 'success' return code if the requested
1058 start/stop action fails, but the cluster is already in the requested
1059 state (Peter Eisentraut)
1065 Change pg_ctl to return an error code if start fails because the
1066 server is already running (Peter Eisentraut)
1072 Add libpq function PQconninfo() to return connection information
1073 (Zoltán Böszörményi, Magnus Hagander)
1080 <title><link linkend="APP-PSQL"><application>psql</></link></title>
1086 Adjust function cost settings so psql tab completion and pattern
1087 searching is more efficient (Tom Lane)
1093 Improve psql tab completion (Jeff Janes, Peter Eisentraut)
1099 Allow the psql --single-transaction mode to work when reading from
1100 standard input (Fabien Coelho, Robert Haas)
1104 Previously this option only worked when reading from a file.
1110 Remove psql warning when connecting to an older server (Peter Eisentraut)
1114 The warning when connecting to a newer server was retained.
1121 <title>Backslash Commands</title>
1127 Add psql \watch command to repeatedly execute commands (Will
1134 Add psql command \gset to store query results in psql variables
1141 Add SSL information to psql's \conninfo command (Alastair Turner)
1147 Add "Security" label to psql \df+ output (Jon Erdman)
1153 Allow psql \l to accept a database name pattern (Peter Eisentraut)
1159 In psql, do not allow \connect to use defaults if there is no active
1160 connection (Bruce Momjian)
1164 This might be the case if the server had crashed.
1170 Properly reset state if psql's "\g file" command failed (Tom Lane)
1174 Previously failed commands discarded output from subsequent commands.
1183 <title>Output</title>
1189 Add a 'latex-longtable' output format to psql (Bruce Momjian)
1193 Longtable allows tables to span multiple pages.
1199 Add a border=3 output mode to the psql 'latex' format (Bruce Momjian)
1205 In psql tuples-only and expanded modes, no longer output "(No rows)"
1212 In psql, no longer print an empty line for unaligned, expanded
1213 output for zero rows (Peter Eisentraut)
1224 <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title>
1230 Add pg_dump --jobs to dump in parallel when using directory
1231 output format (Joachim Wieland)
1237 Have pg_dump output functions in a predictable order (Joel Jacobson)
1243 Fix tar files emitted by pg_dump and pg_basebackup to be POSIX
1244 conformant (Brian Weaver, Tom Lane)
1250 Add -d/--dbname option to pg_dump, for consistency with other client
1251 commands (Heikki Linnakangas)
1255 The database name could already be supplied last without a flag.
1264 <title><link linkend="APP-INITDB"><application>initdb</></link></title>
1270 Have initdb fsync the newly created data directory (Jeff Davis)
1274 This can be disabled by using --nosync.
1280 Add initdb --sync-only option to sync the data directory to durable
1281 storage (Bruce Momjian)
1285 This is used by pg_upgrade.
1291 Have initdb issue a warning about placing the data directory at the
1292 top of file system mount points (Bruce Momjian)
1303 <title>Source Code</title>
1309 Add an embedded list interface (Andres Freund)
1315 Add infrastructure to better support plug-in background worker
1316 processes (Álvaro Herrera)
1322 Create a centralized timeout API (Zoltán Böszörményi)
1328 Create libpgcommon and move pg_malloc() and other functions there
1329 (Álvaro Herrera, Andres Freund)
1333 This allows libpgport to be used solely for porting code.
1339 Standardize on naming of client-side memory allocation functions (Tom Lane)
1345 Add compiler designations to indicate some ereport() and elog()
1346 calls do not return (Peter Eisentraut, Andres Freund, Tom Lane,
1353 Allow options to be passed to the regression test output comparison
1354 utility via PG_REGRESS_DIFF_OPTS (Peter Eisentraut)
1360 Add isolation tests for CREATE INDEX CONCURRENTLY (Abhijit Menon-Sen)
1366 Remove typedefs for int2/int4 as they are better represented as int16/int32 (Peter Eisentraut)
1372 Fix install-strip on Mac OS X (Peter Eisentraut)
1378 Remove configure flag --disable-shared, as it is no longer used (Bruce Momjian)
1384 Rewrite pgindent in Perl (Andrew Dunstan)
1390 Add emacs macro to match Postgres perltidy formatting (Peter
1397 Run tool to check the keyword list when the backend grammar is changed (Tom Lane)
1403 Centralize flex and bison 'make' rules (Peter Eisentraut)
1407 This is useful for pgxs authors.
1413 Add Assert() functionality to client-side code for frontend code (Andrew Dunstan)
1419 Change many internal many backend functions to return OIDs rather
1420 than void (Dimitri Fontaine)
1424 This is useful for event triggers.
1430 Invent pre-commit/pre-prepare/pre-subcommit events for transaction
1431 callbacks (Tom Lane)
1435 Loadable modules that use transaction callbacks might need modification
1436 to handle these new event types.
1442 Add function pg_identify_object() to dump an object in
1443 machine-readable format (Álvaro Herrera)
1449 Add post-ALTER-object server hooks (KaiGai Kohei)
1455 Implement a generic binary heap and use it for Merge-Append
1456 operations (Abhijit Menon-Sen)
1462 Improve ability to detect official timezone abbreviation changes
1469 Add pkg-config support libpq and ecpg libraries (Peter Eisentraut)
1475 Remove src/tool/backend, now that the content is on the Postgres
1476 wiki (Bruce Momjian)
1482 Split out WAL reading as an independent facility (Heikki
1483 Linnakangas, Andres Freund)
1489 Use a 64-bit integer to represent WAL positions (XLogRecPtr)
1490 instead of two 32-bit integers (Heikki Linnakangas)
1494 Generally, tools that need to read the WAL format will need to
1501 Allow PL/Python to support platform-specific include directories (Peter Eisentraut)
1507 Allow PL/Python on OS X to build against custom versions of Python
1517 <title>Additional Modules</title>
1523 Allow write-enabled foreign data wrappers to support writes
1530 Add a Postgres foreign data wrapper contrib module (Shigeru
1535 This foreign data wrapper allows writes.
1541 Add pg_xlogdump contrib program (Andres Freund)
1547 Add support for indexing of regular-expression searches in
1548 contrib/pg_trgm (Alexander Korotkov)
1554 Improve pg_trgm handling of multibyte characters (Tom Lane)
1560 Add function to report the size of the GIN pending index insertion
1565 The function is pgstatginindex() in pgstattuple.
1571 Have oid2name, pgbench, and vacuumlo set fallback_application_name (Amit Kapila)
1577 Improve output of pg_test_timing (Bruce Momjian)
1583 Improve output of pg_test_fsync (Peter Geoghegan)
1589 Improve dblink option validator (Tom Lane)
1600 <title><link linkend="pgupgrade"><application>pg_upgrade</></link></title>
1606 Allow pg_upgrade --jobs to do parallelism (Bruce Momjian)
1610 This allows parallel schema dump/restore of databases, as well as
1611 parallel copy/link of data files per tablespace.
1617 Have pg_upgrade create unix-domain sockets in the current directory
1618 (Bruce Momjian, Tom Lane)
1622 This reduces the possibility that someone will accidentally connect
1629 Have pg_upgrade --check mode properly detect the location of
1630 non-default socket directories (Bruce Momjian, Tom Lane)
1636 Improve performance of pg_upgrade for databases with many tables (Bruce Momjian)
1642 Increase pg_upgrade logging content by showing executed command
1643 (Álvaro Herrera)
1649 Improve pg_upgrade's status display during copy/link (Bruce Momjian)
1658 <title><link linkend="pgbench"><application>pgbench</></link></title>
1664 Add --foreign-keys option to pgbench (Jeff Janes)
1668 This adds foreign key constraints to tables, for use in foreign
1669 key performance testing.
1675 Allow pgbench to aggregate performance statistics and produce output
1676 every --aggregate-interval specified seconds (Tomas Vondra)
1682 Add pg_bench --sampling-rate option to control the percentage of
1683 transactions logged (Tomas Vondra)
1689 Reduce and improve the status message output of pgbench's
1690 initialization mode (Robert Haas, Peter Eisentraut)
1696 Add pgbench -q mode to print one output line every five seconds (Tomas Vondra)
1700 Output pgbench elapsed and estimated remaining time during
1701 initialization logging (Tomas Vondra)
1707 Allow pgbench to use a larger scale factor (Greg Smith)
1718 <title>Documentation</title>
1724 Allow EPUB-format documentation to be created (Peter Eisentraut)
1730 Update FreeBSD kernel configuration documentation (Brad Davis)
1736 Improve WINDOW function documentation (Bruce Momjian, Tom Lane)
1742 Add instructions for setting up the documentation tool chain on
1743 Mac OS X (Peter Eisentraut)
1749 Improve commit_delay documentation (Peter Geoghegan)