1 <!-- doc/src/sgml/release-9.1.sgml -->
2 <!-- See header comment in release.sgml about typical markup -->
4 <sect1 id="release-9-1-8">
5 <title>Release 9.1.8</title>
8 <title>Release Date</title>
9 <simpara>2013-02-07</simpara>
13 This release contains a variety of fixes from 9.1.7.
14 For information about new features in the 9.1 major release, see
15 <xref linkend="release-9-1">.
19 <title>Migration to Version 9.1.8</title>
22 A dump/restore is not required for those running 9.1.X.
26 However, if you are upgrading from a version earlier than 9.1.6,
27 see the release notes for 9.1.6.
33 <title>Changes</title>
39 Fix multiple problems in detection of when a consistent database
40 state has been reached during WAL replay (Fujii Masao, Heikki
41 Linnakangas, Simon Riggs, Andres Freund)
47 Update minimum recovery point when truncating a relation file (Heikki
52 Once data has been discarded, it's no longer safe to stop recovery at
53 an earlier point in the timeline.
59 Fix recycling of WAL segments after changing recovery target timeline
66 Fix missing cancellations in hot standby mode (Noah Misch, Simon Riggs)
70 The need to cancel conflicting hot-standby queries would sometimes be
71 missed, allowing those queries to see inconsistent data.
77 Prevent recovery pause feature from pausing before users can connect
84 Fix SQL grammar to allow subscripting or field selection from a
85 sub-SELECT result (Tom Lane)
91 Fix performance problems with autovacuum truncation in busy workloads
96 Truncation of empty pages at the end of a table requires exclusive
97 lock, but autovacuum was coded to fail (and release the table lock)
98 when there are conflicting lock requests. Under load, it is easily
99 possible that truncation would never occur, resulting in table bloat.
100 Fix by performing a partial truncation, releasing the lock, then
101 attempting to re-acquire the lock and continue. This fix also greatly
102 reduces the average time before autovacuum releases the lock after a
103 conflicting request arrives.
109 Protect against race conditions when scanning
110 <structname>pg_tablespace</> (Stephen Frost, Tom Lane)
114 <command>CREATE DATABASE</> and <command>DROP DATABASE</> could
115 misbehave if there were concurrent updates of
116 <structname>pg_tablespace</> entries.
122 Prevent <command>DROP OWNED</> from trying to drop whole databases or
123 tablespaces (Álvaro Herrera)
127 For safety, ownership of these objects must be reassigned, not dropped.
134 linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link>
135 implementation (Andres Freund)
139 The main consequence of this mistake is that lowering <link
140 linkend="guc-vacuum-freeze-min-age"><varname>vacuum_freeze_min_age</></link>
141 would cause full-table vacuuming scans to occur much more frequently
148 Prevent misbehavior when a <symbol>RowExpr</> or <symbol>XmlExpr</>
149 is parse-analyzed twice (Andres Freund, Tom Lane)
153 This mistake could be user-visible in contexts such as
154 <literal>CREATE TABLE LIKE INCLUDING INDEXES</>.
160 Improve defenses against integer overflow in hashtable sizing
161 calculations (Jeff Davis)
167 Fix failure to ignore leftover temporary tables after a server crash
174 Reject out-of-range dates in <function>to_date()</> (Hitoshi Harada)
180 Fix <function>pg_extension_config_dump()</> to handle
181 extension-update cases properly (Tom Lane)
185 This function will now replace any existing entry for the target
186 table, making it usable in extension update scripts.
192 Fix PL/Python's handling of functions used as triggers on multiple
193 tables (Andres Freund)
199 Ensure that non-ASCII prompt strings are translated to the correct
200 code page on Windows (Alexander Law, Noah Misch)
204 This bug affected <application>psql</> and some other client programs.
210 Fix possible crash in <application>psql</>'s <command>\?</> command
211 when not connected to a database (Meng Qingzhong)
217 Fix possible error if a relation file is removed while
218 <application>pg_basebackup</> is running (Heikki Linnakangas)
224 Make <application>pg_dump</> exclude data of unlogged tables when
225 running on a hot-standby server (Magnus Hagander)
229 This would fail anyway because the data is not available on the standby
230 server, so it seems most convenient to assume
231 <option>--no-unlogged-table-data</> automatically.
237 Fix <application>pg_upgrade</> to deal with invalid indexes safely
244 Fix one-byte buffer overrun in <application>libpq</>'s
245 <function>PQprintTuples</> (Xi Wang)
249 This ancient function is not used anywhere by
250 <productname>PostgreSQL</> itself, but it might still be used by some
257 Make <application>ecpglib</> use translated messages properly
264 Properly install <application>ecpg_compat</> and
265 <application>pgtypes</> libraries on MSVC (Jiang Guiqing)
271 Include our version of <function>isinf()</> in
272 <application>libecpg</> if it's not provided by the system
279 Rearrange configure's tests for supplied functions so it is not
280 fooled by bogus exports from libedit/libreadline (Christoph Berg)
286 Ensure Windows build number increases over time (Magnus Hagander)
292 Make <application>pgxs</> build executables with the right
293 <literal>.exe</> suffix when cross-compiling for Windows
300 Add new timezone abbreviation <literal>FET</> (Tom Lane)
304 This is now used in some eastern-European time zones.
313 <sect1 id="release-9-1-7">
314 <title>Release 9.1.7</title>
317 <title>Release Date</title>
318 <simpara>2012-12-06</simpara>
322 This release contains a variety of fixes from 9.1.6.
323 For information about new features in the 9.1 major release, see
324 <xref linkend="release-9-1">.
328 <title>Migration to Version 9.1.7</title>
331 A dump/restore is not required for those running 9.1.X.
335 However, if you are upgrading from a version earlier than 9.1.6,
336 see the release notes for 9.1.6.
342 <title>Changes</title>
348 Fix multiple bugs associated with <command>CREATE INDEX
349 CONCURRENTLY</> (Andres Freund, Tom Lane)
353 Fix <command>CREATE INDEX CONCURRENTLY</> to use
354 in-place updates when changing the state of an index's
355 <structname>pg_index</> row. This prevents race conditions that could
356 cause concurrent sessions to miss updating the target index, thus
357 resulting in corrupt concurrently-created indexes.
361 Also, fix various other operations to ensure that they ignore
362 invalid indexes resulting from a failed <command>CREATE INDEX
363 CONCURRENTLY</> command. The most important of these is
364 <command>VACUUM</>, because an auto-vacuum could easily be launched
365 on the table before corrective action can be taken to fix or remove
372 Fix buffer locking during WAL replay (Tom Lane)
376 The WAL replay code was insufficiently careful about locking buffers
377 when replaying WAL records that affect more than one page. This could
378 result in hot standby queries transiently seeing inconsistent states,
379 resulting in wrong answers or unexpected failures.
385 Fix an error in WAL generation logic for GIN indexes (Tom Lane)
389 This could result in index corruption, if a torn-page failure occurred.
395 Properly remove startup process's virtual XID lock when promoting a
396 hot standby server to normal running (Simon Riggs)
400 This oversight could prevent subsequent execution of certain
401 operations such as <command>CREATE INDEX CONCURRENTLY</>.
407 Avoid bogus <quote>out-of-sequence timeline ID</> errors in standby
408 mode (Heikki Linnakangas)
414 Prevent the postmaster from launching new child processes after it's
415 received a shutdown signal (Tom Lane)
419 This mistake could result in shutdown taking longer than it should, or
420 even never completing at all without additional user action.
426 Avoid corruption of internal hash tables when out of memory
433 Prevent file descriptors for dropped tables from being held open past
434 transaction end (Tom Lane)
438 This should reduce problems with long-since-dropped tables continuing
439 to occupy disk space.
445 Prevent database-wide crash and restart when a new child process is
446 unable to create a pipe for its latch (Tom Lane)
450 Although the new process must fail, there is no good reason to force a
451 database-wide restart, so avoid that. This improves robustness when
452 the kernel is nearly out of file descriptors.
458 Fix planning of non-strict equivalence clauses above outer joins
463 The planner could derive incorrect constraints from a clause equating
464 a non-strict construct to something else, for example
465 <literal>WHERE COALESCE(foo, 0) = 0</>
466 when <literal>foo</> is coming from the nullable side of an outer join.
472 Fix <command>SELECT DISTINCT</> with index-optimized
473 <function>MIN</>/<function>MAX</> on an inheritance tree (Tom Lane)
477 The planner would fail with <quote>failed to re-find MinMaxAggInfo
478 record</> given this combination of factors.
484 Improve planner's ability to prove exclusion constraints from
485 equivalence classes (Tom Lane)
491 Fix partial-row matching in hashed subplans to handle cross-type cases
496 This affects multicolumn <literal>NOT IN</> subplans, such as
497 <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</>
498 when for instance <literal>b</> and <literal>y</> are <type>int4</>
499 and <type>int8</> respectively. This mistake led to wrong answers
500 or crashes depending on the specific datatypes involved.
506 Acquire buffer lock when re-fetching the old tuple for an
507 <literal>AFTER ROW UPDATE/DELETE</> trigger (Andres Freund)
511 In very unusual circumstances, this oversight could result in passing
512 incorrect data to a trigger <literal>WHEN</> condition, or to the
513 precheck logic for a foreign-key enforcement trigger. That could
514 result in a crash, or in an incorrect decision about whether to
521 Fix <command>ALTER COLUMN TYPE</> to handle inherited check
522 constraints properly (Pavan Deolasee)
526 This worked correctly in pre-8.4 releases, and now works correctly
533 Fix <command>ALTER EXTENSION SET SCHEMA</>'s failure to move some
534 subsidiary objects into the new schema (Álvaro Herrera, Dimitri
541 Fix <command>REASSIGN OWNED</> to handle grants on tablespaces
542 (Álvaro Herrera)
548 Ignore incorrect <structname>pg_attribute</> entries for system
549 columns for views (Tom Lane)
553 Views do not have any system columns. However, we forgot to
554 remove such entries when converting a table to a view. That's fixed
555 properly for 9.3 and later, but in previous branches we need to defend
556 against existing mis-converted views.
562 Fix rule printing to dump <literal>INSERT INTO <replaceable>table</>
563 DEFAULT VALUES</literal> correctly (Tom Lane)
569 Guard against stack overflow when there are too many
570 <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> clauses
571 in a query (Tom Lane)
577 Prevent platform-dependent failures when dividing the minimum possible
578 integer value by -1 (Xi Wang, Tom Lane)
584 Fix possible access past end of string in date parsing
591 Fix failure to advance XID epoch if XID wraparound happens during a
592 checkpoint and <varname>wal_level</> is <literal>hot_standby</>
593 (Tom Lane, Andres Freund)
597 While this mistake had no particular impact on
598 <productname>PostgreSQL</productname> itself, it was bad for
599 applications that rely on <function>txid_current()</> and related
600 functions: the TXID value would appear to go backwards.
607 <structname>pg_stat_replication</>.<structfield>sync_state</> at a
608 page boundary (Kyotaro Horiguchi)
614 Produce an understandable error message if the length of the path name
615 for a Unix-domain socket exceeds the platform-specific limit
616 (Tom Lane, Andrew Dunstan)
620 Formerly, this would result in something quite unhelpful, such as
621 <quote>Non-recoverable failure in name resolution</>.
627 Fix memory leaks when sending composite column values to the client
634 Make <application>pg_ctl</> more robust about reading the
635 <filename>postmaster.pid</> file (Heikki Linnakangas)
639 Fix race conditions and possible file descriptor leakage.
645 Fix possible crash in <application>psql</> if incorrectly-encoded data
646 is presented and the <varname>client_encoding</> setting is a
647 client-only encoding, such as SJIS (Jiang Guiqing)
653 Make <application>pg_dump</> dump <literal>SEQUENCE SET</> items in
654 the data not pre-data section of the archive (Tom Lane)
658 This change fixes dumping of sequences that are marked as extension
659 configuration tables.
665 Fix bugs in the <filename>restore.sql</> script emitted by
666 <application>pg_dump</> in <literal>tar</> output format (Tom Lane)
670 The script would fail outright on tables whose names include
671 upper-case characters. Also, make the script capable of restoring
672 data in <option>--inserts</> mode as well as the regular COPY mode.
678 Fix <application>pg_restore</> to accept POSIX-conformant
679 <literal>tar</> files (Brian Weaver, Tom Lane)
683 The original coding of <application>pg_dump</>'s <literal>tar</>
684 output mode produced files that are not fully conformant with the
685 POSIX standard. This has been corrected for version 9.3. This
686 patch updates previous branches so that they will accept both the
687 incorrect and the corrected formats, in hopes of avoiding
688 compatibility problems when 9.3 comes out.
694 Fix <literal>tar</> files emitted by <application>pg_basebackup</> to
695 be POSIX conformant (Brian Weaver, Tom Lane)
701 Fix <application>pg_resetxlog</> to locate <filename>postmaster.pid</>
702 correctly when given a relative path to the data directory (Tom Lane)
706 This mistake could lead to <application>pg_resetxlog</> not noticing
707 that there is an active postmaster using the data directory.
713 Fix <application>libpq</>'s <function>lo_import()</> and
714 <function>lo_export()</> functions to report file I/O errors properly
721 Fix <application>ecpg</>'s processing of nested structure pointer
722 variables (Muhammad Usama)
728 Fix <application>ecpg</>'s <function>ecpg_get_data</> function to
729 handle arrays properly (Michael Meskes)
735 Make <filename>contrib/pageinspect</>'s btree page inspection
736 functions take buffer locks while examining pages (Tom Lane)
742 Ensure that <literal>make install</> for an extension creates the
743 <filename>extension</> installation directory (Cédric Villemain)
747 Previously, this step was missed if <varname>MODULEDIR</> was set in
748 the extension's Makefile.
754 Fix <application>pgxs</> support for building loadable modules on AIX
759 Building modules outside the original source tree didn't work on AIX.
765 Update time zone data files to <application>tzdata</> release 2012j
766 for DST law changes in Cuba, Israel, Jordan, Libya, Palestine, Western
767 Samoa, and portions of Brazil.
776 <sect1 id="release-9-1-6">
777 <title>Release 9.1.6</title>
780 <title>Release Date</title>
781 <simpara>2012-09-24</simpara>
785 This release contains a variety of fixes from 9.1.5.
786 For information about new features in the 9.1 major release, see
787 <xref linkend="release-9-1">.
791 <title>Migration to Version 9.1.6</title>
794 A dump/restore is not required for those running 9.1.X.
798 However, you may need to perform <command>REINDEX</> operations to
799 recover from the effects of the data corruption bug described in the
800 first changelog item below.
804 Also, if you are upgrading from a version earlier than 9.1.4,
805 see the release notes for 9.1.4.
811 <title>Changes</title>
817 Fix persistence marking of shared buffers during WAL replay
822 This mistake can result in buffers not being written out during
823 checkpoints, resulting in data corruption if the server later crashes
824 without ever having written those buffers. Corruption can occur on
825 any server following crash recovery, but it is significantly more
826 likely to occur on standby slave servers since those perform much
827 more WAL replay. There is a low probability of corruption of btree
828 and GIN indexes. There is a much higher probability of corruption of
829 table <quote>visibility maps</>. Fortunately, visibility maps are
830 non-critical data in 9.1, so the worst consequence of such corruption
831 in 9.1 installations is transient inefficiency of vacuuming. Table
832 data proper cannot be corrupted by this bug.
836 While no index corruption due to this bug is known to have occurred
837 in the field, as a precautionary measure it is recommended that
838 production installations <command>REINDEX</> all btree and GIN
839 indexes at a convenient time after upgrading to 9.1.6.
843 Also, if you intend to do an in-place upgrade to 9.2.X, before doing
844 so it is recommended to perform a <command>VACUUM</> of all tables
846 linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link>
847 set to zero. This will ensure that any lingering wrong data in the
848 visibility maps is corrected before 9.2.X can depend on it. <link
849 linkend="guc-vacuum-cost-delay"><varname>vacuum_cost_delay</></link>
850 can be adjusted to reduce the performance impact of vacuuming, while
851 causing it to take longer to finish.
857 Fix planner's assignment of executor parameters, and fix executor's
858 rescan logic for CTE plan nodes (Tom Lane)
862 These errors could result in wrong answers from queries that scan the
863 same <literal>WITH</> subquery multiple times.
869 Fix misbehavior when <link
870 linkend="guc-default-transaction-isolation"><varname>default_transaction_isolation</></link>
871 is set to <literal>serializable</> (Kevin Grittner, Tom Lane, Heikki
876 Symptoms include crashes at process start on Windows, and crashes in
877 hot standby operation.
883 Improve selectivity estimation for text search queries involving
884 prefixes, i.e. <replaceable>word</><literal>:*</> patterns (Tom Lane)
893 Improve page-splitting decisions in GiST indexes (Alexander Korotkov,
894 Robert Haas, Tom Lane)
898 Multi-column GiST indexes might suffer unexpected bloat due to this
905 Fix cascading privilege revoke to stop if privileges are still held
910 If we revoke a grant option from some role <replaceable>X</>, but
911 <replaceable>X</> still holds that option via a grant from someone
912 else, we should not recursively revoke the corresponding privilege
913 from role(s) <replaceable>Y</> that <replaceable>X</> had granted it
920 Disallow extensions from containing the schema they are assigned to
925 This situation creates circular dependencies that confuse
926 <application>pg_dump</> and probably other things. It's confusing
927 for humans too, so disallow it.
933 Improve error messages for Hot Standby misconfiguration errors
940 Make <application>configure</> probe for <function>mbstowcs_l</> (Tom
945 This fixes build failures on some versions of AIX.
951 Fix handling of <literal>SIGFPE</> when PL/Perl is in use (Andres Freund)
955 Perl resets the process's <literal>SIGFPE</> handler to
956 <literal>SIG_IGN</>, which could result in crashes later on. Restore
957 the normal Postgres signal handler after initializing PL/Perl.
963 Prevent PL/Perl from crashing if a recursive PL/Perl function is
964 redefined while being executed (Tom Lane)
970 Work around possible misoptimization in PL/Perl (Tom Lane)
974 Some Linux distributions contain an incorrect version of
975 <filename>pthread.h</> that results in incorrect compiled code in
976 PL/Perl, leading to crashes if a PL/Perl function calls another one
977 that throws an error.
983 Fix bugs in <filename>contrib/pg_trgm</>'s <literal>LIKE</> pattern
984 analysis code (Fujii Masao)
988 <literal>LIKE</> queries using a trigram index could produce wrong
989 results if the pattern contained <literal>LIKE</> escape characters.
995 Fix <application>pg_upgrade</>'s handling of line endings on Windows
1000 Previously, <application>pg_upgrade</> might add or remove carriage
1001 returns in places such as function bodies.
1007 On Windows, make <application>pg_upgrade</> use backslash path
1008 separators in the scripts it emits (Andrew Dunstan)
1014 Remove unnecessary dependency on <application>pg_config</> from
1015 <application>pg_upgrade</> (Peter Eisentraut)
1021 Update time zone data files to <application>tzdata</> release 2012f
1022 for DST law changes in Fiji
1031 <sect1 id="release-9-1-5">
1032 <title>Release 9.1.5</title>
1035 <title>Release Date</title>
1036 <simpara>2012-08-17</simpara>
1040 This release contains a variety of fixes from 9.1.4.
1041 For information about new features in the 9.1 major release, see
1042 <xref linkend="release-9-1">.
1046 <title>Migration to Version 9.1.5</title>
1049 A dump/restore is not required for those running 9.1.X.
1053 However, if you are upgrading from a version earlier than 9.1.4,
1054 see the release notes for 9.1.4.
1060 <title>Changes</title>
1066 Prevent access to external files/URLs via XML entity references
1067 (Noah Misch, Tom Lane)
1071 <function>xml_parse()</> would attempt to fetch external files or
1072 URLs as needed to resolve DTD and entity references in an XML value,
1073 thus allowing unprivileged database users to attempt to fetch data
1074 with the privileges of the database server. While the external data
1075 wouldn't get returned directly to the user, portions of it could be
1076 exposed in error messages if the data didn't parse as valid XML; and
1077 in any case the mere ability to check existence of a file might be
1078 useful to an attacker. (CVE-2012-3489)
1084 Prevent access to external files/URLs via <filename>contrib/xml2</>'s
1085 <function>xslt_process()</> (Peter Eisentraut)
1089 <application>libxslt</> offers the ability to read and write both
1090 files and URLs through stylesheet commands, thus allowing
1091 unprivileged database users to both read and write data with the
1092 privileges of the database server. Disable that through proper use
1093 of <application>libxslt</>'s security options. (CVE-2012-3488)
1097 Also, remove <function>xslt_process()</>'s ability to fetch documents
1098 and stylesheets from external files/URLs. While this was a
1099 documented <quote>feature</>, it was long regarded as a bad idea.
1100 The fix for CVE-2012-3489 broke that capability, and rather than
1101 expend effort on trying to fix it, we're just going to summarily
1108 Prevent too-early recycling of btree index pages (Noah Misch)
1112 When we allowed read-only transactions to skip assigning XIDs, we
1113 introduced the possibility that a deleted btree page could be
1114 recycled while a read-only transaction was still in flight to it.
1115 This would result in incorrect index search results. The probability
1116 of such an error occurring in the field seems very low because of the
1117 timing requirements, but nonetheless it should be fixed.
1123 Fix crash-safety bug with newly-created-or-reset sequences (Tom Lane)
1127 If <command>ALTER SEQUENCE</> was executed on a freshly created or
1128 reset sequence, and then precisely one <function>nextval()</> call
1129 was made on it, and then the server crashed, WAL replay would restore
1130 the sequence to a state in which it appeared that no
1131 <function>nextval()</> had been done, thus allowing the first
1132 sequence value to be returned again by the next
1133 <function>nextval()</> call. In particular this could manifest for
1134 <type>serial</> columns, since creation of a serial column's sequence
1135 includes an <command>ALTER SEQUENCE OWNED BY</> step.
1141 Fix race condition in <literal>enum</>-type value comparisons (Robert
1146 Comparisons could fail when encountering an enum value added since
1147 the current query started.
1153 Fix <function>txid_current()</> to report the correct epoch when not
1154 in hot standby (Heikki Linnakangas)
1158 This fixes a regression introduced in the previous minor release.
1164 Prevent selection of unsuitable replication connections as
1165 the synchronous standby (Fujii Masao)
1169 The master might improperly choose pseudo-servers such as
1170 <application>pg_receivexlog</> or <application>pg_basebackup</>
1171 as the synchronous standby, and then wait indefinitely for them.
1177 Fix bug in startup of Hot Standby when a master transaction has many
1178 subtransactions (Andres Freund)
1182 This mistake led to failures reported as <quote>out-of-order XID
1183 insertion in KnownAssignedXids</>.
1189 Ensure the <filename>backup_label</> file is fsync'd after
1190 <function>pg_start_backup()</> (Dave Kerr)
1196 Fix timeout handling in walsender processes (Tom Lane)
1200 WAL sender background processes neglected to establish a
1201 <systemitem>SIGALRM</> handler, meaning they would wait forever in
1202 some corner cases where a timeout ought to happen.
1208 Wake walsenders after each background flush by walwriter (Andres
1209 Freund, Simon Riggs)
1213 This greatly reduces replication delay when the workload contains
1214 only asynchronously-committed transactions.
1220 Fix <literal>LISTEN</>/<literal>NOTIFY</> to cope better with I/O
1221 problems, such as out of disk space (Tom Lane)
1225 After a write failure, all subsequent attempts to send more
1226 <literal>NOTIFY</> messages would fail with messages like
1227 <quote>Could not read from file "pg_notify/<replaceable>nnnn</>" at
1228 offset <replaceable>nnnnn</>: Success</quote>.
1234 Only allow autovacuum to be auto-canceled by a directly blocked
1239 The original coding could allow inconsistent behavior in some cases;
1240 in particular, an autovacuum could get canceled after less than
1241 <literal>deadlock_timeout</> grace period.
1247 Improve logging of autovacuum cancels (Robert Haas)
1253 Fix log collector so that <literal>log_truncate_on_rotation</> works
1254 during the very first log rotation after server start (Tom Lane)
1260 Fix <literal>WITH</> attached to a nested set operation
1261 (<literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>)
1268 Ensure that a whole-row reference to a subquery doesn't include any
1269 extra <literal>GROUP BY</> or <literal>ORDER BY</> columns (Tom Lane)
1275 Fix dependencies generated during <literal>ALTER TABLE ... ADD
1276 CONSTRAINT USING INDEX</> (Tom Lane)
1280 This command left behind a redundant <structname>pg_depend</> entry
1281 for the index, which could confuse later operations, notably
1282 <literal>ALTER TABLE ... ALTER COLUMN TYPE</> on one of the indexed
1289 Fix <command>REASSIGN OWNED</> to work on extensions (Alvaro Herrera)
1295 Disallow copying whole-row references in <literal>CHECK</>
1296 constraints and index definitions during <command>CREATE TABLE</>
1301 This situation can arise in <command>CREATE TABLE</> with
1302 <literal>LIKE</> or <literal>INHERITS</>. The copied whole-row
1303 variable was incorrectly labeled with the row type of the original
1304 table not the new one. Rejecting the case seems reasonable for
1305 <literal>LIKE</>, since the row types might well diverge later. For
1306 <literal>INHERITS</> we should ideally allow it, with an implicit
1307 coercion to the parent table's row type; but that will require more
1308 work than seems safe to back-patch.
1314 Fix memory leak in <literal>ARRAY(SELECT ...)</> subqueries (Heikki
1315 Linnakangas, Tom Lane)
1321 Fix planner to pass correct collation to operator selectivity
1322 estimators (Tom Lane)
1326 This was not previously required by any core selectivity estimation
1327 function, but third-party code might need it.
1333 Fix extraction of common prefixes from regular expressions (Tom Lane)
1337 The code could get confused by quantified parenthesized
1338 subexpressions, such as <literal>^(foo)?bar</>. This would lead to
1339 incorrect index optimization of searches for such patterns.
1345 Fix bugs with parsing signed
1346 <replaceable>hh</><literal>:</><replaceable>mm</> and
1347 <replaceable>hh</><literal>:</><replaceable>mm</><literal>:</><replaceable>ss</>
1348 fields in <type>interval</> constants (Amit Kapila, Tom Lane)
1354 Fix <application>pg_dump</> to better handle views containing partial
1355 <literal>GROUP BY</> lists (Tom Lane)
1359 A view that lists only a primary key column in <literal>GROUP BY</>,
1360 but uses other table columns as if they were grouped, gets marked as
1361 depending on the primary key. Improper handling of such primary key
1362 dependencies in <application>pg_dump</> resulted in poorly-ordered
1363 dumps, which at best would be inefficient to restore and at worst
1364 could result in outright failure of a parallel
1365 <application>pg_restore</> run.
1371 In PL/Perl, avoid setting UTF8 flag when in SQL_ASCII encoding
1372 (Alex Hunsaker, Kyotaro Horiguchi, Alvaro Herrera)
1378 Use Postgres' encoding conversion functions, not Python's, when
1379 converting a Python Unicode string to the server encoding in
1380 PL/Python (Jan Urbanski)
1384 This avoids some corner-case problems, notably that Python doesn't
1385 support all the encodings Postgres does. A notable functional change
1386 is that if the server encoding is SQL_ASCII, you will get the UTF-8
1387 representation of the string; formerly, any non-ASCII characters in
1388 the string would result in an error.
1394 Fix mapping of PostgreSQL encodings to Python encodings in PL/Python
1401 Report errors properly in <filename>contrib/xml2</>'s
1402 <function>xslt_process()</> (Tom Lane)
1408 Update time zone data files to <application>tzdata</> release 2012e
1409 for DST law changes in Morocco and Tokelau
1418 <sect1 id="release-9-1-4">
1419 <title>Release 9.1.4</title>
1422 <title>Release Date</title>
1423 <simpara>2012-06-04</simpara>
1427 This release contains a variety of fixes from 9.1.3.
1428 For information about new features in the 9.1 major release, see
1429 <xref linkend="release-9-1">.
1433 <title>Migration to Version 9.1.4</title>
1436 A dump/restore is not required for those running 9.1.X.
1440 However, if you use the <type>citext</> data type, and you upgraded
1441 from a previous major release by running <application>pg_upgrade</>,
1442 you should run <literal>CREATE EXTENSION citext FROM unpackaged</>
1443 to avoid collation-related failures in <type>citext</> operations.
1444 The same is necessary if you restore a dump from a pre-9.1 database
1445 that contains an instance of the <type>citext</> data type.
1446 If you've already run the <command>CREATE EXTENSION</> command before
1447 upgrading to 9.1.4, you will instead need to do manual catalog updates
1448 as explained in the third changelog item below.
1452 Also, if you are upgrading from a version earlier than 9.1.2,
1453 see the release notes for 9.1.2.
1459 <title>Changes</title>
1465 Fix incorrect password transformation in
1466 <filename>contrib/pgcrypto</>'s DES <function>crypt()</> function
1471 If a password string contained the byte value <literal>0x80</>, the
1472 remainder of the password was ignored, causing the password to be much
1473 weaker than it appeared. With this fix, the rest of the string is
1474 properly included in the DES hash. Any stored password values that are
1475 affected by this bug will thus no longer match, so the stored values may
1476 need to be updated. (CVE-2012-2143)
1482 Ignore <literal>SECURITY DEFINER</> and <literal>SET</> attributes for
1483 a procedural language's call handler (Tom Lane)
1487 Applying such attributes to a call handler could crash the server.
1494 Make <filename>contrib/citext</>'s upgrade script fix collations of
1495 <type>citext</> arrays and domains over <type>citext</>
1500 Release 9.1.2 provided a fix for collations of <type>citext</> columns
1501 and indexes in databases upgraded or reloaded from pre-9.1
1502 installations, but that fix was incomplete: it neglected to handle arrays
1503 and domains over <type>citext</>. This release extends the module's
1504 upgrade script to handle these cases. As before, if you have already
1505 run the upgrade script, you'll need to run the collation update
1506 commands by hand instead. See the 9.1.2 release notes for more
1507 information about doing this.
1513 Allow numeric timezone offsets in <type>timestamp</> input to be up to
1514 16 hours away from UTC (Tom Lane)
1518 Some historical time zones have offsets larger than 15 hours, the
1519 previous limit. This could result in dumped data values being rejected
1526 Fix timestamp conversion to cope when the given time is exactly the
1527 last DST transition time for the current timezone (Tom Lane)
1531 This oversight has been there a long time, but was not noticed
1532 previously because most DST-using zones are presumed to have an
1533 indefinite sequence of future DST transitions.
1539 Fix <type>text</> to <type>name</> and <type>char</> to <type>name</>
1540 casts to perform string truncation correctly in multibyte encodings
1547 Fix memory copying bug in <function>to_tsquery()</> (Heikki Linnakangas)
1553 Ensure <function>txid_current()</> reports the correct epoch when
1554 executed in hot standby (Simon Riggs)
1560 Fix planner's handling of outer PlaceHolderVars within subqueries (Tom
1565 This bug concerns sub-SELECTs that reference variables coming from the
1566 nullable side of an outer join of the surrounding query.
1567 In 9.1, queries affected by this bug would fail with <quote>ERROR:
1568 Upper-level PlaceHolderVar found where not expected</>. But in 9.0 and
1569 8.4, you'd silently get possibly-wrong answers, since the value
1570 transmitted into the subquery wouldn't go to null when it should.
1576 Fix planning of <literal>UNION ALL</> subqueries with output columns
1577 that are not simple variables (Tom Lane)
1581 Planning of such cases got noticeably worse in 9.1 as a result of a
1582 misguided fix for <quote>MergeAppend child's targetlist doesn't match
1583 MergeAppend</> errors. Revert that fix and do it another way.
1589 Fix slow session startup when <structname>pg_attribute</> is very large
1594 If <structname>pg_attribute</> exceeds one-fourth of
1595 <varname>shared_buffers</>, cache rebuilding code that is sometimes
1596 needed during session start would trigger the synchronized-scan logic,
1597 causing it to take many times longer than normal. The problem was
1598 particularly acute if many new sessions were starting at once.
1604 Ensure sequential scans check for query cancel reasonably often (Merlin
1609 A scan encountering many consecutive pages that contain no live tuples
1610 would not respond to interrupts meanwhile.
1616 Ensure the Windows implementation of <function>PGSemaphoreLock()</>
1617 clears <varname>ImmediateInterruptOK</> before returning (Tom Lane)
1621 This oversight meant that a query-cancel interrupt received later
1622 in the same query could be accepted at an unsafe time, with
1623 unpredictable but not good consequences.
1629 Show whole-row variables safely when printing views or rules
1630 (Abbas Butt, Tom Lane)
1634 Corner cases involving ambiguous names (that is, the name could be
1635 either a table or column name of the query) were printed in an
1636 ambiguous way, risking that the view or rule would be interpreted
1637 differently after dump and reload. Avoid the ambiguous case by
1638 attaching a no-op cast.
1644 Fix <command>COPY FROM</> to properly handle null marker strings that
1645 correspond to invalid encoding (Tom Lane)
1649 A null marker string such as <literal>E'\\0'</> should work, and did
1650 work in the past, but the case got broken in 8.4.
1656 Fix <command>EXPLAIN VERBOSE</> for writable CTEs containing
1657 <literal>RETURNING</> clauses (Tom Lane)
1663 Fix <command>PREPARE TRANSACTION</> to work correctly in the presence
1664 of advisory locks (Tom Lane)
1668 Historically, <command>PREPARE TRANSACTION</> has simply ignored any
1669 session-level advisory locks the session holds, but this case was
1670 accidentally broken in 9.1.
1676 Fix truncation of unlogged tables (Robert Haas)
1682 Ignore missing schemas during non-interactive assignments of
1683 <varname>search_path</> (Tom Lane)
1687 This re-aligns 9.1's behavior with that of older branches. Previously
1688 9.1 would throw an error for nonexistent schemas mentioned in
1689 <varname>search_path</> settings obtained from places such as
1690 <command>ALTER DATABASE SET</>.
1696 Fix bugs with temporary or transient tables used in extension scripts
1701 This includes cases such as a rewriting <command>ALTER TABLE</> within
1702 an extension update script, since that uses a transient table behind
1709 Ensure autovacuum worker processes perform stack depth checking
1710 properly (Heikki Linnakangas)
1714 Previously, infinite recursion in a function invoked by
1715 auto-<command>ANALYZE</> could crash worker processes.
1721 Fix logging collector to not lose log coherency under high load (Andrew
1726 The collector previously could fail to reassemble large messages if it
1733 Fix logging collector to ensure it will restart file rotation
1734 after receiving <systemitem>SIGHUP</> (Tom Lane)
1740 Fix <quote>too many LWLocks taken</> failure in GiST indexes (Heikki
1747 Fix WAL replay logic for GIN indexes to not fail if the index was
1748 subsequently dropped (Tom Lane)
1754 Correctly detect SSI conflicts of prepared transactions after a crash
1761 Avoid synchronous replication delay when committing a transaction that
1762 only modified temporary tables (Heikki Linnakangas)
1766 In such a case the transaction's commit record need not be flushed to
1767 standby servers, but some of the code didn't know that and waited for
1768 it to happen anyway.
1774 Fix error handling in <application>pg_basebackup</>
1775 (Thomas Ogrisegg, Fujii Masao)
1781 Fix <application>walsender</> to not go into a busy loop if connection
1782 is terminated (Fujii Masao)
1788 Fix memory leak in PL/pgSQL's <command>RETURN NEXT</> command (Joe
1795 Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target
1796 is the function's first variable (Tom Lane)
1802 Ensure that PL/Perl package-qualifies the <varname>_TD</> variable
1807 This bug caused trigger invocations to fail when they are nested
1808 within a function invocation that changes the current package.
1814 Fix PL/Python functions returning composite types to accept a string
1815 for their result value (Jan Urbanski)
1819 This case was accidentally broken by the 9.1 additions to allow a
1820 composite result value to be supplied in other formats, such as
1827 Fix potential access off the end of memory in <application>psql</>'s
1828 expanded display (<command>\x</>) mode (Peter Eisentraut)
1834 Fix several performance problems in <application>pg_dump</> when
1835 the database contains many objects (Jeff Janes, Tom Lane)
1839 <application>pg_dump</> could get very slow if the database contained
1840 many schemas, or if many objects are in dependency loops, or if there
1841 are many owned sequences.
1847 Fix memory and file descriptor leaks in <application>pg_restore</>
1848 when reading a directory-format archive (Peter Eisentraut)
1854 Fix <application>pg_upgrade</> for the case that a database stored in a
1855 non-default tablespace contains a table in the cluster's default
1856 tablespace (Bruce Momjian)
1862 In <application>ecpg</>, fix rare memory leaks and possible overwrite
1863 of one byte after the <structname>sqlca_t</> structure (Peter Eisentraut)
1869 Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak
1870 temporary database connections upon error (Tom Lane)
1876 Fix <filename>contrib/dblink</> to report the correct connection name in
1877 error messages (Kyotaro Horiguchi)
1883 Fix <filename>contrib/vacuumlo</> to use multiple transactions when
1884 dropping many large objects (Tim Lewis, Robert Haas, Tom Lane)
1888 This change avoids exceeding <varname>max_locks_per_transaction</> when
1889 many objects need to be dropped. The behavior can be adjusted with the
1890 new <literal>-l</> (limit) option.
1896 Update time zone data files to <application>tzdata</> release 2012c
1897 for DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland
1898 Islands, Gaza, Haiti, Hebron, Morocco, Syria, and Tokelau Islands;
1899 also historical corrections for Canada.
1908 <sect1 id="release-9-1-3">
1909 <title>Release 9.1.3</title>
1912 <title>Release Date</title>
1913 <simpara>2012-02-27</simpara>
1917 This release contains a variety of fixes from 9.1.2.
1918 For information about new features in the 9.1 major release, see
1919 <xref linkend="release-9-1">.
1923 <title>Migration to Version 9.1.3</title>
1926 A dump/restore is not required for those running 9.1.X.
1930 However, if you are upgrading from a version earlier than 9.1.2,
1931 see the release notes for 9.1.2.
1937 <title>Changes</title>
1943 Require execute permission on the trigger function for
1944 <command>CREATE TRIGGER</> (Robert Haas)
1948 This missing check could allow another user to execute a trigger
1949 function with forged input data, by installing it on a table he owns.
1950 This is only of significance for trigger functions marked
1951 <literal>SECURITY DEFINER</>, since otherwise trigger functions run
1952 as the table owner anyway. (CVE-2012-0866)
1958 Remove arbitrary limitation on length of common name in SSL
1959 certificates (Heikki Linnakangas)
1963 Both <application>libpq</> and the server truncated the common name
1964 extracted from an SSL certificate at 32 bytes. Normally this would
1965 cause nothing worse than an unexpected verification failure, but there
1966 are some rather-implausible scenarios in which it might allow one
1967 certificate holder to impersonate another. The victim would have to
1968 have a common name exactly 32 bytes long, and the attacker would have
1969 to persuade a trusted CA to issue a certificate in which the common
1970 name has that string as a prefix. Impersonating a server would also
1971 require some additional exploit to redirect client connections.
1978 Convert newlines to spaces in names written in <application>pg_dump</>
1979 comments (Robert Haas)
1983 <application>pg_dump</> was incautious about sanitizing object names
1984 that are emitted within SQL comments in its output script. A name
1985 containing a newline would at least render the script syntactically
1986 incorrect. Maliciously crafted object names could present a SQL
1987 injection risk when the script is reloaded. (CVE-2012-0868)
1993 Fix btree index corruption from insertions concurrent with vacuuming
1998 An index page split caused by an insertion could sometimes cause a
1999 concurrently-running <command>VACUUM</> to miss removing index entries
2000 that it should remove. After the corresponding table rows are removed,
2001 the dangling index entries would cause errors (such as <quote>could not
2002 read block N in file ...</>) or worse, silently wrong query results
2003 after unrelated rows are re-inserted at the now-free table locations.
2004 This bug has been present since release 8.2, but occurs so infrequently
2005 that it was not diagnosed until now. If you have reason to suspect
2006 that it has happened in your database, reindexing the affected index
2013 Fix transient zeroing of shared buffers during WAL replay (Tom Lane)
2017 The replay logic would sometimes zero and refill a shared buffer, so
2018 that the contents were transiently invalid. In hot standby mode this
2019 can result in a query that's executing in parallel seeing garbage data.
2020 Various symptoms could result from that, but the most common one seems
2021 to be <quote>invalid memory alloc request size</>.
2027 Fix handling of data-modifying <literal>WITH</> subplans in
2028 <literal>READ COMMITTED</> rechecking (Tom Lane)
2032 A <literal>WITH</> clause containing
2033 <command>INSERT</>/<command>UPDATE</>/<command>DELETE</> would crash
2034 if the parent <command>UPDATE</> or <command>DELETE</> command needed
2035 to be re-evaluated at one or more rows due to concurrent updates
2036 in <literal>READ COMMITTED</> mode.
2042 Fix corner case in SSI transaction cleanup
2047 When finishing up a read-write serializable transaction,
2048 a crash could occur if all remaining active serializable transactions
2055 Fix postmaster to attempt restart after a hot-standby crash (Tom Lane)
2059 A logic error caused the postmaster to terminate, rather than attempt
2060 to restart the cluster, if any backend process crashed while operating
2061 in hot standby mode.
2067 Fix <command>CLUSTER</>/<command>VACUUM FULL</> handling of toast
2068 values owned by recently-updated rows (Tom Lane)
2072 This oversight could lead to <quote>duplicate key value violates unique
2073 constraint</> errors being reported against the toast table's index
2074 during one of these commands.
2080 Update per-column permissions, not only per-table permissions, when
2081 changing table owner (Tom Lane)
2085 Failure to do this meant that any previously granted column permissions
2086 were still shown as having been granted by the old owner. This meant
2087 that neither the new owner nor a superuser could revoke the
2088 now-untraceable-to-table-owner permissions.
2094 Support foreign data wrappers and foreign servers in
2095 <command>REASSIGN OWNED</> (Alvaro Herrera)
2099 This command failed with <quote>unexpected classid</> errors if
2100 it needed to change the ownership of any such objects.
2106 Allow non-existent values for some settings in <command>ALTER
2107 USER/DATABASE SET</> (Heikki Linnakangas)
2111 Allow <varname>default_text_search_config</>,
2112 <varname>default_tablespace</>, and <varname>temp_tablespaces</> to be
2113 set to names that are not known. This is because they might be known
2114 in another database where the setting is intended to be used, or for the
2115 tablespace cases because the tablespace might not be created yet. The
2116 same issue was previously recognized for <varname>search_path</>, and
2117 these settings now act like that one.
2123 Fix <quote>unsupported node type</> error caused by <literal>COLLATE</>
2124 in an <command>INSERT</> expression (Tom Lane)
2130 Avoid crashing when we have problems deleting table files post-commit
2135 Dropping a table should lead to deleting the underlying disk files only
2136 after the transaction commits. In event of failure then (for instance,
2137 because of wrong file permissions) the code is supposed to just emit a
2138 warning message and go on, since it's too late to abort the
2139 transaction. This logic got broken as of release 8.4, causing such
2140 situations to result in a PANIC and an unrestartable database.
2146 Recover from errors occurring during WAL replay of <command>DROP
2147 TABLESPACE</> (Tom Lane)
2151 Replay will attempt to remove the tablespace's directories, but there
2152 are various reasons why this might fail (for example, incorrect
2153 ownership or permissions on those directories). Formerly the replay
2154 code would panic, rendering the database unrestartable without manual
2155 intervention. It seems better to log the problem and continue, since
2156 the only consequence of failure to remove the directories is some
2163 Fix race condition in logging AccessExclusiveLocks for hot standby
2168 Sometimes a lock would be logged as being held by <quote>transaction
2169 zero</>. This is at least known to produce assertion failures on
2170 slave servers, and might be the cause of more serious problems.
2176 Track the OID counter correctly during WAL replay, even when it wraps
2181 Previously the OID counter would remain stuck at a high value until the
2182 system exited replay mode. The practical consequences of that are
2183 usually nil, but there are scenarios wherein a standby server that's
2184 been promoted to master might take a long time to advance the OID
2185 counter to a reasonable value once values are needed.
2191 Prevent emitting misleading <quote>consistent recovery state reached</>
2192 log message at the beginning of crash recovery (Heikki Linnakangas)
2198 Fix initial value of
2199 <structname>pg_stat_replication</>.<structfield>replay_location</>
2204 Previously, the value shown would be wrong until at least one WAL
2205 record had been replayed.
2211 Fix regular expression back-references with <literal>*</> attached
2216 Rather than enforcing an exact string match, the code would effectively
2217 accept any string that satisfies the pattern sub-expression referenced
2218 by the back-reference symbol.
2222 A similar problem still afflicts back-references that are embedded in a
2223 larger quantified expression, rather than being the immediate subject
2224 of the quantifier. This will be addressed in a future
2225 <productname>PostgreSQL</> release.
2231 Fix recently-introduced memory leak in processing of
2232 <type>inet</>/<type>cidr</> values (Heikki Linnakangas)
2236 A patch in the December 2011 releases of <productname>PostgreSQL</>
2237 caused memory leakage in these operations, which could be significant
2238 in scenarios such as building a btree index on such a column.
2244 Fix planner's ability to push down index-expression restrictions
2245 through <literal>UNION ALL</> (Tom Lane)
2249 This type of optimization was inadvertently disabled by a fix for
2250 another problem in 9.1.2.
2256 Fix planning of <literal>WITH</> clauses referenced in
2257 <command>UPDATE</>/<command>DELETE</> on an inherited table
2262 This bug led to <quote>could not find plan for CTE</> failures.
2268 Fix GIN cost estimation to handle <literal>column IN (...)</>
2269 index conditions (Marti Raudsepp)
2273 This oversight would usually lead to crashes if such a condition could
2274 be used with a GIN index.
2280 Prevent assertion failure when exiting a session with an open, failed
2281 transaction (Tom Lane)
2285 This bug has no impact on normal builds with asserts not enabled.
2291 Fix dangling pointer after <command>CREATE TABLE AS</>/<command>SELECT
2292 INTO</> in a SQL-language function (Tom Lane)
2296 In most cases this only led to an assertion failure in assert-enabled
2297 builds, but worse consequences seem possible.
2303 Avoid double close of file handle in syslogger on Windows (MauMau)
2307 Ordinarily this error was invisible, but it would cause an exception
2308 when running on a debug version of Windows.
2314 Fix I/O-conversion-related memory leaks in plpgsql
2315 (Andres Freund, Jan Urbanski, Tom Lane)
2319 Certain operations would leak memory until the end of the current
2326 Work around bug in perl's SvPVutf8() function (Andrew Dunstan)
2330 This function crashes when handed a typeglob or certain read-only
2331 objects such as <literal>$^V</>. Make plperl avoid passing those to
2338 In <application>pg_dump</>, don't dump contents of an extension's
2339 configuration tables if the extension itself is not being dumped
2346 Improve <application>pg_dump</>'s handling of inherited table columns
2351 <application>pg_dump</> mishandled situations where a child column has
2352 a different default expression than its parent column. If the default
2353 is textually identical to the parent's default, but not actually the
2354 same (for instance, because of schema search path differences) it would
2355 not be recognized as different, so that after dump and restore the
2356 child would be allowed to inherit the parent's default. Child columns
2357 that are <literal>NOT NULL</> where their parent is not could also be
2358 restored subtly incorrectly.
2364 Fix <application>pg_restore</>'s direct-to-database mode for
2365 INSERT-style table data (Tom Lane)
2369 Direct-to-database restores from archive files made with
2370 <option>--inserts</> or <option>--column-inserts</> options fail when
2371 using <application>pg_restore</> from a release dated September or
2372 December 2011, as a result of an oversight in a fix for another
2373 problem. The archive file itself is not at fault, and text-mode
2380 Teach <application>pg_upgrade</> to handle renaming of
2381 <application>plpython</>'s shared library (Bruce Momjian)
2385 Upgrading a pre-9.1 database that included plpython would fail because
2392 Allow <application>pg_upgrade</> to process tables containing
2393 <type>regclass</> columns (Bruce Momjian)
2397 Since <application>pg_upgrade</> now takes care to preserve
2398 <structname>pg_class</> OIDs, there was no longer any reason for this
2405 Make <application>libpq</> ignore <literal>ENOTDIR</> errors
2406 when looking for an SSL client certificate file
2411 This allows SSL connections to be established, though without a
2412 certificate, even when the user's home directory is set to something
2413 like <literal>/dev/null</>.
2419 Fix some more field alignment issues in <application>ecpg</>'s SQLDA area
2420 (Zoltan Boszormenyi)
2426 Allow <literal>AT</> option in <application>ecpg</>
2427 <literal>DEALLOCATE</> statements (Michael Meskes)
2431 The infrastructure to support this has been there for awhile, but
2432 through an oversight there was still an error check rejecting the case.
2438 Do not use the variable name when defining a varchar structure in ecpg
2445 Fix <filename>contrib/auto_explain</>'s JSON output mode to produce
2446 valid JSON (Andrew Dunstan)
2450 The output used brackets at the top level, when it should have used
2457 Fix error in <filename>contrib/intarray</>'s <literal>int[] &
2458 int[]</> operator (Guillaume Lelarge)
2462 If the smallest integer the two input arrays have in common is 1,
2463 and there are smaller values in either array, then 1 would be
2464 incorrectly omitted from the result.
2470 Fix error detection in <filename>contrib/pgcrypto</>'s
2471 <function>encrypt_iv()</> and <function>decrypt_iv()</>
2476 These functions failed to report certain types of invalid-input errors,
2477 and would instead return random garbage values for incorrect input.
2483 Fix one-byte buffer overrun in <filename>contrib/test_parser</>
2488 The code would try to read one more byte than it should, which would
2489 crash in corner cases.
2490 Since <filename>contrib/test_parser</> is only example code, this is
2491 not a security issue in itself, but bad example code is still bad.
2497 Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if
2498 available (Martin Pitt)
2502 This function replaces our previous use of the <literal>SWPB</>
2503 instruction, which is deprecated and not available on ARMv6 and later.
2504 Reports suggest that the old code doesn't fail in an obvious way on
2505 recent ARM boards, but simply doesn't interlock concurrent accesses,
2506 leading to bizarre failures in multiprocess operation.
2512 Use <option>-fexcess-precision=standard</> option when building with
2513 gcc versions that accept it (Andrew Dunstan)
2517 This prevents assorted scenarios wherein recent versions of gcc will
2518 produce creative results.
2524 Allow use of threaded Python on FreeBSD (Chris Rees)
2528 Our configure script previously believed that this combination wouldn't
2529 work; but FreeBSD fixed the problem, so remove that error check.
2535 Allow MinGW builds to use standardly-named OpenSSL libraries
2545 <sect1 id="release-9-1-2">
2546 <title>Release 9.1.2</title>
2549 <title>Release Date</title>
2550 <simpara>2011-12-05</simpara>
2554 This release contains a variety of fixes from 9.1.1.
2555 For information about new features in the 9.1 major release, see
2556 <xref linkend="release-9-1">.
2560 <title>Migration to Version 9.1.2</title>
2563 A dump/restore is not required for those running 9.1.X.
2567 However, a longstanding error was discovered in the definition of the
2568 <literal>information_schema.referential_constraints</> view. If you
2569 rely on correct results from that view, you should replace its
2570 definition as explained in the first changelog item below.
2574 Also, if you use the <type>citext</> data type, and you upgraded
2575 from a previous major release by running <application>pg_upgrade</>,
2576 you should run <literal>CREATE EXTENSION citext FROM unpackaged</>
2577 to avoid collation-related failures in <type>citext</> operations.
2578 The same is necessary if you restore a dump from a pre-9.1 database
2579 that contains an instance of the <type>citext</> data type.
2580 If you've already run the <command>CREATE EXTENSION</> command before
2581 upgrading to 9.1.2, you will instead need to do manual catalog updates
2582 as explained in the second changelog item.
2588 <title>Changes</title>
2594 Fix bugs in <literal>information_schema.referential_constraints</> view
2599 This view was being insufficiently careful about matching the
2600 foreign-key constraint to the depended-on primary or unique key
2601 constraint. That could result in failure to show a foreign key
2602 constraint at all, or showing it multiple times, or claiming that it
2603 depends on a different constraint than the one it really does.
2607 Since the view definition is installed by <application>initdb</>,
2608 merely upgrading will not fix the problem. If you need to fix this
2609 in an existing installation, you can (as a superuser) drop the
2610 <literal>information_schema</> schema then re-create it by sourcing
2611 <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>.
2612 (Run <literal>pg_config --sharedir</> if you're uncertain where
2613 <replaceable>SHAREDIR</> is.) This must be repeated in each database
2620 Make <filename>contrib/citext</>'s upgrade script fix collations of
2621 <type>citext</> columns and indexes (Tom Lane)
2625 Existing <type>citext</> columns and indexes aren't correctly marked as
2626 being of a collatable data type during <application>pg_upgrade</> from
2627 a pre-9.1 server, or when a pre-9.1 dump containing the <type>citext</>
2628 type is loaded into a 9.1 server.
2629 That leads to operations on these columns failing with errors
2630 such as <quote>could not determine which collation to use for string
2631 comparison</>. This change allows them to be fixed by the same
2632 script that upgrades the <type>citext</> module into a proper 9.1
2633 extension during <literal>CREATE EXTENSION citext FROM unpackaged</>.
2637 If you have a previously-upgraded database that is suffering from this
2638 problem, and you already ran the <command>CREATE EXTENSION</> command,
2639 you can manually run (as superuser) the <command>UPDATE</> commands
2641 <filename><replaceable>SHAREDIR</>/extension/citext--unpackaged--1.0.sql</filename>.
2642 (Run <literal>pg_config --sharedir</> if you're uncertain where
2643 <replaceable>SHAREDIR</> is.)
2644 There is no harm in doing this again if unsure.
2650 Fix possible crash during <command>UPDATE</> or <command>DELETE</> that
2651 joins to the output of a scalar-returning function (Tom Lane)
2655 A crash could only occur if the target row had been concurrently
2656 updated, so this problem surfaced only intermittently.
2662 Fix incorrect replay of WAL records for GIN index updates
2667 This could result in transiently failing to find index entries after
2668 a crash, or on a hot-standby server. The problem would be repaired
2669 by the next <command>VACUUM</> of the index, however.
2675 Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS
2676 SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</>
2681 If a table has been modified by <command>ALTER TABLE ADD COLUMN</>,
2682 attempts to copy its data verbatim to another table could produce
2683 corrupt results in certain corner cases.
2684 The problem can only manifest in this precise form in 8.4 and later,
2685 but we patched earlier versions as well in case there are other code
2686 paths that could trigger the same bug.
2692 Fix possible failures during hot standby startup (Simon Riggs)
2698 Start hot standby faster when initial snapshot is incomplete
2705 Fix race condition during toast table access from stale syscache entries
2710 The typical symptom was transient errors like <quote>missing chunk
2711 number 0 for toast value NNNNN in pg_toast_2619</>, where the cited
2712 toast table would always belong to a system catalog.
2718 Track dependencies of functions on items used in parameter default
2719 expressions (Tom Lane)
2723 Previously, a referenced object could be dropped without having dropped
2724 or modified the function, leading to misbehavior when the function was
2725 used. Note that merely installing this update will not fix the missing
2726 dependency entries; to do that, you'd need to <command>CREATE OR
2727 REPLACE</> each such function afterwards. If you have functions whose
2728 defaults depend on non-built-in objects, doing so is recommended.
2734 Fix incorrect management of placeholder variables in nestloop joins
2739 This bug is known to lead to <quote>variable not found in subplan target
2740 list</> planner errors, and could possibly result in wrong query output
2741 when outer joins are involved.
2747 Fix window functions that sort by expressions involving aggregates
2752 Previously these could fail with <quote>could not find pathkey item to
2753 sort</> planner errors.
2759 Fix <quote>MergeAppend child's targetlist doesn't match MergeAppend</>
2760 planner errors (Tom Lane)
2766 Fix index matching for operators with both collatable and noncollatable
2771 In 9.1.0, an indexable operator that has a non-collatable left-hand
2772 input type and a collatable right-hand input type would not be
2773 recognized as matching the left-hand column's index. An example is
2774 the <type>hstore</> <literal>?</> <type>text</> operator.
2780 Allow inlining of set-returning SQL functions with multiple OUT
2781 parameters (Tom Lane)
2787 Don't trust deferred-unique indexes for join removal (Tom Lane and Marti
2792 A deferred uniqueness constraint might not hold intra-transaction,
2793 so assuming that it does could give incorrect query results.
2799 Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte
2800 header, and add a new macro, <function>DatumGetInetPP()</>, that does
2801 not (Heikki Linnakangas)
2805 This change affects no core code, but might prevent crashes in add-on
2806 code that expects <function>DatumGetInetP()</> to produce an unpacked
2807 datum as per usual convention.
2813 Improve locale support in <type>money</> type's input and output
2818 Aside from not supporting all standard
2819 <link linkend="guc-lc-monetary"><varname>lc_monetary</></link>
2820 formatting options, the input and output functions were inconsistent,
2821 meaning there were locales in which dumped <type>money</> values could
2829 linkend="guc-transform-null-equals"><varname>transform_null_equals</></link>
2830 affect <literal>CASE foo WHEN NULL ...</> constructs
2831 (Heikki Linnakangas)
2835 <varname>transform_null_equals</> is only supposed to affect
2836 <literal>foo = NULL</> expressions written directly by the user, not
2837 equality checks generated internally by this form of <literal>CASE</>.
2843 Change foreign-key trigger creation order to better support
2844 self-referential foreign keys (Tom Lane)
2848 For a cascading foreign key that references its own table, a row update
2849 will fire both the <literal>ON UPDATE</> trigger and the
2850 <literal>CHECK</> trigger as one event. The <literal>ON UPDATE</>
2851 trigger must execute first, else the <literal>CHECK</> will check a
2852 non-final state of the row and possibly throw an inappropriate error.
2853 However, the firing order of these triggers is determined by their
2854 names, which generally sort in creation order since the triggers have
2855 auto-generated names following the convention
2856 <quote>RI_ConstraintTrigger_NNNN</>. A proper fix would require
2857 modifying that convention, which we will do in 9.2, but it seems risky
2858 to change it in existing releases. So this patch just changes the
2859 creation order of the triggers. Users encountering this type of error
2860 should drop and re-create the foreign key constraint to get its
2861 triggers into the right order.
2867 Fix <literal>IF EXISTS</> to work correctly in <command>DROP OPERATOR
2868 FAMILY</> (Robert Haas)
2874 Disallow dropping of an extension from within its own script
2879 This prevents odd behavior in case of incorrect management of extension
2886 Don't mark auto-generated types as extension members (Robert Haas)
2890 Relation rowtypes and automatically-generated array types do not need to
2891 have their own extension membership entries in <structname>pg_depend</>,
2892 and creating such entries complicates matters for extension upgrades.
2898 Cope with invalid pre-existing <varname>search_path</> settings during
2899 <command>CREATE EXTENSION</> (Tom Lane)
2905 Avoid floating-point underflow while tracking buffer allocation rate
2910 While harmless in itself, on certain platforms this would result in
2911 annoying kernel log messages.
2917 Prevent autovacuum transactions from running in serializable mode
2922 Autovacuum formerly used the cluster-wide default transaction isolation
2923 level, but there is no need for it to use anything higher than READ
2924 COMMITTED, and using SERIALIZABLE could result in unnecessary delays
2925 for other processes.
2931 Ensure walsender processes respond promptly to <systemitem>SIGTERM</>
2938 Exclude <filename>postmaster.opts</> from base backups
2945 Preserve configuration file name and line number values when starting
2946 child processes under Windows (Tom Lane)
2950 Formerly, these would not be displayed correctly in the
2951 <structname>pg_settings</> view.
2957 Fix incorrect field alignment in <application>ecpg</>'s SQLDA area
2958 (Zoltan Boszormenyi)
2964 Preserve blank lines within commands in <application>psql</>'s command
2965 history (Robert Haas)
2969 The former behavior could cause problems if an empty line was removed
2970 from within a string literal, for example.
2976 Avoid platform-specific infinite loop in <application>pg_dump</>
2983 Fix compression of plain-text output format in <application>pg_dump</>
2984 (Adrian Klaver and Tom Lane)
2988 <application>pg_dump</> has historically understood <literal>-Z</> with
2989 no <literal>-F</> switch to mean that it should emit a gzip-compressed
2990 version of its plain text output. Restore that behavior.
2996 Fix <application>pg_dump</> to dump user-defined casts between
2997 auto-generated types, such as table rowtypes (Tom Lane)
3003 Fix missed quoting of foreign server names in <application>pg_dump</>
3010 Assorted fixes for <application>pg_upgrade</> (Bruce Momjian)
3014 Handle exclusion constraints correctly, avoid failures on Windows,
3015 don't complain about mismatched toast table names in 8.4 databases.
3021 In PL/pgSQL, allow foreign tables to define row types
3022 (Alexander Soudakov)
3028 Fix up conversions of PL/Perl functions' results
3029 (Alex Hunsaker and Tom Lane)
3033 Restore the pre-9.1 behavior that PL/Perl functions returning
3034 <type>void</> ignore the result value of their last Perl statement;
3035 9.1.0 would throw an error if that statement returned a reference.
3036 Also, make sure it works to return a string value for a composite type,
3037 so long as the string meets the type's input format.
3038 In addition, throw errors for attempts to return Perl arrays or hashes
3039 when the function's declared result type is not an array or composite
3040 type, respectively. (Pre-9.1 versions rather uselessly returned
3041 strings like <literal>ARRAY(0x221a9a0)</> or
3042 <literal>HASH(0x221aa90)</> in such cases.)
3048 Ensure PL/Perl strings are always correctly UTF8-encoded
3049 (Amit Khandekar and Alex Hunsaker)
3055 Use the preferred version of <application>xsubpp</> to build PL/Perl,
3056 not necessarily the operating system's main copy
3057 (David Wheeler and Alex Hunsaker)
3063 Correctly propagate SQLSTATE in PL/Python exceptions
3064 (Mika Eloranta and Jan Urbanski)
3070 Do not install PL/Python extension files for Python major versions
3071 other than the one built against (Peter Eisentraut)
3077 Change all the <filename>contrib</> extension script files to report
3078 a useful error message if they are fed to <application>psql</>
3079 (Andrew Dunstan and Tom Lane)
3083 This should help teach people about the new method of using
3084 <command>CREATE EXTENSION</> to load these files. In most cases,
3085 sourcing the scripts directly would fail anyway, but with
3086 harder-to-interpret messages.
3092 Fix incorrect coding in <filename>contrib/dict_int</> and
3093 <filename>contrib/dict_xsyn</> (Tom Lane)
3097 Some functions incorrectly assumed that memory returned by
3098 <function>palloc()</> is guaranteed zeroed.
3104 Remove <filename>contrib/sepgsql</> tests from the regular regression
3105 test mechanism (Tom Lane)
3109 Since these tests require root privileges for setup, they're impractical
3110 to run automatically. Switch over to a manual approach instead, and
3111 provide a testing script to help with that.
3117 Fix assorted errors in <filename>contrib/unaccent</>'s configuration
3118 file parsing (Tom Lane)
3124 Honor query cancel interrupts promptly in <function>pgstatindex()</>
3131 Fix incorrect quoting of log file name in Mac OS X start script
3138 Revert unintentional enabling of <literal>WAL_DEBUG</> (Robert Haas)
3142 Fortunately, as debugging tools go, this one is pretty cheap;
3143 but it's not intended to be enabled by default, so revert.
3149 Ensure VPATH builds properly install all server header files
3156 Shorten file names reported in verbose error messages (Peter Eisentraut)
3160 Regular builds have always reported just the name of the C file
3161 containing the error message call, but VPATH builds formerly
3162 reported an absolute path name.
3168 Fix interpretation of Windows timezone names for Central America
3173 Map <quote>Central America Standard Time</> to <literal>CST6</>, not
3174 <literal>CST6CDT</>, because DST is generally not observed anywhere in
3181 Update time zone data files to <application>tzdata</> release 2011n
3182 for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa;
3183 also historical corrections for Alaska and British East Africa.
3192 <sect1 id="release-9-1-1">
3193 <title>Release 9.1.1</title>
3196 <title>Release Date</title>
3197 <simpara>2011-09-26</simpara>
3201 This release contains a small number of fixes from 9.1.0.
3202 For information about new features in the 9.1 major release, see
3203 <xref linkend="release-9-1">.
3207 <title>Migration to Version 9.1.1</title>
3210 A dump/restore is not required for those running 9.1.X.
3216 <title>Changes</title>
3222 Make <function>pg_options_to_table</> return NULL for an option with no
3227 Previously such cases would result in a server crash.
3233 Fix memory leak at end of a GiST index scan (Tom Lane)
3237 Commands that perform many separate GiST index scans, such as
3238 verification of a new GiST-based exclusion constraint on a table
3239 already containing many rows, could transiently require large amounts of
3240 memory due to this leak.
3246 Fix explicit reference to <literal>pg_temp</> schema in <command>CREATE
3247 TEMPORARY TABLE</> (Robert Haas)
3251 This used to be allowed, but failed in 9.1.0.
3260 <sect1 id="release-9-1">
3261 <title>Release 9.1</title>
3264 <title>Release Date</title>
3265 <simpara>2011-09-12</simpara>
3269 <title>Overview</title>
3272 This release shows <productname>PostgreSQL</> moving beyond the
3273 traditional relational-database feature set with new, ground-breaking
3274 functionality that is unique to <productname>PostgreSQL</>.
3275 The streaming replication feature introduced in release 9.0 is
3276 significantly enhanced by adding a synchronous-replication option,
3277 streaming backups, and monitoring improvements.
3278 Major enhancements include:
3283 <!-- This list duplicates items below, but without authors or details-->
3287 Allow <link linkend="synchronous-replication">synchronous
3294 Add support for <link linkend="SQL-CREATEFOREIGNTABLE">foreign
3301 Add per-column <link
3302 linkend="collation">collation</link> support
3308 Add <link linkend="extend-extensions">extensions</link> which
3309 simplify packaging of additions to <productname>PostgreSQL</>
3316 linkend="xact-serializable">serializable isolation level</link>
3322 Support unlogged tables using the <literal>UNLOGGED</>
3323 option in <link linkend="SQL-CREATETABLE"><command>CREATE
3330 Allow data-modification commands
3331 (<command>INSERT</>/<command>UPDATE</>/<command>DELETE</>) in
3332 <link linkend="queries-with"><literal>WITH</></link> clauses
3338 Add nearest-neighbor (order-by-operator) searching to <link
3339 linkend="GiST"><acronym>GiST</> indexes</link>
3345 Add a <link linkend="SQL-SECURITY-LABEL"><command>SECURITY
3346 LABEL</></link> command and support for
3347 <link linkend="sepgsql"><acronym>SELinux</> permissions control</link>
3353 Update the <link linkend="plpython">PL/Python</link> server-side
3361 The above items are explained in more detail in the sections below.
3368 <title>Migration to Version 9.1</title>
3371 A dump/restore using <application>pg_dump</application>,
3372 or use of <application>pg_upgrade</application>, is required
3373 for those wishing to migrate data from any previous
3378 Version 9.1 contains a number of changes that may affect compatibility
3379 with previous releases. Observe the following incompatibilities:
3383 <title>Strings</title>
3389 Change the default value of <link
3390 linkend="guc-standard-conforming-strings"><varname>standard_conforming_strings</></link>
3395 By default, backslashes are now ordinary characters in string literals,
3396 not escape characters. This change removes a long-standing
3397 incompatibility with the SQL standard. <link
3398 linkend="guc-escape-string-warning"><varname>escape_string_warning</></link>
3399 has produced warnings about this usage for years. <literal>E''</>
3400 strings are the proper way to embed backslash escapes in strings and are
3401 unaffected by this change.
3406 This change can break applications that are not expecting it and
3407 do their own string escaping according to the old rules. The
3408 consequences could be as severe as introducing SQL-injection security
3409 holes. Be sure to test applications that are exposed to untrusted
3410 input, to ensure that they correctly handle single quotes and
3411 backslashes in text strings.
3421 <title>Casting</title>
3427 Disallow function-style and attribute-style data type casts for
3428 composite types (Tom Lane)
3432 For example, disallow
3433 <literal><replaceable>composite_value</>.text</literal> and
3434 <literal>text(<replaceable>composite_value</>)</literal>.
3435 Unintentional uses of this syntax have frequently resulted in bug
3436 reports; although it was not a bug, it seems better to go back to
3437 rejecting such expressions.
3438 The <literal>CAST</> and <literal>::</> syntaxes are still available
3439 for use when a cast of an entire composite value is actually intended.
3445 Tighten casting checks for domains based on arrays (Tom Lane)
3449 When a domain is based on an array type, it is allowed to <quote>look
3450 through</> the domain type to access the array elements, including
3451 subscripting the domain value to fetch or assign an element.
3452 Assignment to an element of such a domain value, for instance via
3453 <literal>UPDATE ... SET domaincol[5] = ...</>, will now result in
3454 rechecking the domain type's constraints, whereas before the checks
3464 <title>Arrays</title>
3471 linkend="array-functions-table"><function>string_to_array()</></link>
3472 to return an empty array for a zero-length string (Pavel
3477 Previously this returned a null value.
3484 linkend="array-functions-table"><function>string_to_array()</></link>
3485 so a <literal>NULL</> separator splits the string into characters
3490 Previously this returned a null value.
3499 <title>Object Modification</title>
3505 Fix improper checks for before/after triggers (Tom Lane)
3509 Triggers can now be fired in three cases: <literal>BEFORE</>,
3510 <literal>AFTER</>, or <literal>INSTEAD OF</> some action.
3511 Trigger function authors should verify that their logic behaves
3512 sanely in all three cases.
3518 Require superuser or <literal>CREATEROLE</> permissions in order to
3519 set comments on roles (Tom Lane)
3528 <title>Server Settings</title>
3535 linkend="functions-recovery-info-table"><function>pg_last_xlog_receive_location()</></link>
3536 so it never moves backwards (Fujii Masao)
3540 Previously, the value of <function>pg_last_xlog_receive_location()</>
3541 could move backward when streaming replication is restarted.
3547 Have logging of replication connections honor <link
3548 linkend="guc-log-connections"><varname>log_connections</></link>
3553 Previously, replication connections were always logged.
3562 <title><link linkend="plpgsql">PL/pgSQL</link> Server-Side Language</title>
3568 Change PL/pgSQL's <literal>RAISE</> command without parameters
3569 to be catchable by the attached exception block (Piyush Newe)
3573 Previously <literal>RAISE</> in a code block was always scoped to
3574 an attached exception block, so it was uncatchable at the same
3581 Adjust PL/pgSQL's error line numbering code to be consistent
3582 with other PLs (Pavel Stehule)
3586 Previously, PL/pgSQL would ignore (not count) an empty line at the
3587 start of the function body. Since this was inconsistent with all
3588 other languages, the special case was removed.
3594 Make PL/pgSQL complain about conflicting IN and OUT parameter names
3599 Formerly, the collision was not detected, and the name would just
3600 silently refer to only the OUT parameter.
3606 Type modifiers of PL/pgSQL variables are now visible to the SQL parser
3611 A type modifier (such as a varchar length limit) attached to a PL/pgSQL
3612 variable was formerly enforced during assignments, but was ignored for
3613 all other purposes. Such variables will now behave more like table
3614 columns declared with the same modifier. This is not expected to make
3615 any visible difference in most cases, but it could result in subtle
3616 changes for some SQL commands issued by PL/pgSQL functions.
3625 <title>Contrib</title>
3631 All contrib modules are now installed with <link
3632 linkend="SQL-CREATEEXTENSION"><command>CREATE EXTENSION</></link>
3633 rather than by manually invoking their SQL scripts
3634 (Dimitri Fontaine, Tom Lane)
3638 To update an existing database containing the 9.0 version of a contrib
3639 module, use <literal>CREATE EXTENSION ... FROM unpackaged</literal>
3640 to wrap the existing contrib module's objects into an extension. When
3641 updating from a pre-9.0 version, drop the contrib module's objects
3642 using its old uninstall script, then use <literal>CREATE EXTENSION</>.
3651 <title>Other Incompatibilities</title>
3658 linkend="monitoring-stats-funcs-table"><function>pg_stat_reset()</></link>
3659 reset all database-level statistics (Tomas Vondra)
3663 Some <structname>pg_stat_database</> counters were not being reset.
3670 linkend="infoschema-triggers"><structname>information_schema.triggers</></link>
3671 column names to match the new SQL-standard names (Dean Rasheed)
3677 Treat <application>ECPG</> cursor names as case-insensitive
3678 (Zoltan Boszormenyi)
3688 <title>Changes</title>
3691 Below you will find a detailed account of the changes between
3692 <productname>PostgreSQL</productname> 9.1 and the previous major
3697 <title>Server</title>
3700 <title>Performance</title>
3706 Support unlogged tables using the <literal>UNLOGGED</>
3707 option in <link linkend="SQL-CREATETABLE"><command>CREATE
3708 TABLE</></link> (Robert Haas)
3712 Such tables provide better update performance than regular tables,
3713 but are not crash-safe: their contents are automatically cleared in
3714 case of a server crash. Their contents do not propagate to
3715 replication slaves, either.
3721 Allow <literal>FULL OUTER JOIN</literal> to be implemented as a
3722 hash join, and allow either side of a <literal>LEFT OUTER JOIN</>
3723 or <literal>RIGHT OUTER JOIN</> to be hashed (Tom Lane)
3727 Previously <literal>FULL OUTER JOIN</literal> could only be
3728 implemented as a merge join, and <literal>LEFT OUTER JOIN</literal>
3729 and <literal>RIGHT OUTER JOIN</literal> could hash only the nullable
3730 side of the join. These changes provide additional query optimization
3737 Merge duplicate fsync requests (Robert Haas, Greg Smith)
3741 This greatly improves performance under heavy write loads.
3747 Improve performance of <link
3748 linkend="guc-commit-siblings"><varname>commit_siblings</></link>
3753 This allows the use of <varname>commit_siblings</varname> with
3760 Reduce the memory requirement for large ispell dictionaries
3761 (Pavel Stehule, Tom Lane)
3767 Avoid leaving data files open after <quote>blind writes</>
3772 This fixes scenarios in which backends might hold files open long
3773 after they were deleted, preventing the kernel from reclaiming
3783 <title>Optimizer</title>
3789 Allow inheritance table scans to return meaningfully-sorted
3790 results (Greg Stark, Hans-Jurgen Schonig, Robert Haas, Tom Lane)
3794 This allows better optimization of queries that use <literal>ORDER
3795 BY</>, <literal>LIMIT</>, or <literal>MIN</>/<literal>MAX</> with
3802 Improve GIN index scan cost estimation (Teodor Sigaev)
3808 Improve cost estimation for aggregates and window functions (Tom Lane)
3817 <title>Authentication</title>
3823 Support host names and host suffixes
3824 (e.g. <literal>.example.com</>) in <link
3825 linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link>
3830 Previously only host <acronym>IP</> addresses and <acronym>CIDR</>
3831 values were supported.
3837 Support the key word <literal>all</> in the host column of <link
3838 linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link>
3843 Previously people used <literal>0.0.0.0/0</> or <literal>::/0</>
3850 Reject <literal>local</> lines in <link
3851 linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link>
3852 on platforms that don't support Unix-socket connections
3857 Formerly, such lines were silently ignored, which could be surprising.
3858 This makes the behavior more like other unsupported cases.
3864 Allow <link linkend="gssapi-auth"><acronym>GSSAPI</></link>
3865 to be used to authenticate to servers via <link
3866 linkend="sspi-auth"><acronym>SSPI</></link> (Christian Ullrich)
3870 Specifically this allows Unix-based <acronym>GSSAPI</> clients
3871 to do <acronym>SSPI</> authentication with Windows servers.
3877 <link linkend="auth-ident"><literal>ident</literal></link>
3878 authentication over local sockets is now known as
3879 <link linkend="auth-peer"><literal>peer</literal></link>
3884 The old term is still accepted for backward compatibility, but since
3885 the two methods are fundamentally different, it seemed better to adopt
3886 different names for them.
3892 Rewrite <link linkend="auth-peer"><acronym>peer</></link>
3893 authentication to avoid use of credential control messages (Tom Lane)
3897 This change makes the peer authentication code simpler and
3898 better-performing. However, it requires the platform to provide the
3899 <function>getpeereid</> function or an equivalent socket operation.
3900 So far as is known, the only platform for which peer authentication
3901 worked before and now will not is pre-5.0 NetBSD.
3910 <title>Monitoring</title>
3916 Add details to the logging of restartpoints and checkpoints,
3917 which is controlled by <link
3918 linkend="guc-log-checkpoints"><varname>log_checkpoints</></link>
3919 (Fujii Masao, Greg Smith)
3923 New details include <acronym>WAL</> file and sync activity.
3930 linkend="guc-log-file-mode"><varname>log_file_mode</></link>
3931 which controls the permissions on log files created by the
3932 logging collector (Martin Pihlak)
3938 Reduce the default maximum line length for <application>syslog</>
3939 logging to 900 bytes plus prefixes (Noah Misch)
3943 This avoids truncation of long log lines on syslog implementations
3944 that have a 1KB length limit, rather than the more common 2KB.
3953 <title>Statistical Views</title>
3959 Add <structfield>client_hostname</structfield> column to <link
3960 linkend="monitoring-stats-views-table"><structname>pg_stat_activity</></link>
3965 Previously only the client address was reported.
3972 linkend="monitoring-stats-views-table"><structname>pg_stat_xact_*</></link>
3973 statistics functions and views (Joel Jacobson)
3977 These are like the database-wide statistics counter views, but
3978 reflect counts for only the current transaction.
3984 Add time of last reset in database-level and background writer
3985 statistics views (Tomas Vondra)
3991 Add columns showing the number of vacuum and analyze operations
3993 linkend="monitoring-stats-views-table"><structname>pg_stat_*_tables</></link>
3994 views (Magnus Hagander)
4000 Add <structfield>buffers_backend_fsync</> column to <link
4001 linkend="monitoring-stats-views-table"><structname>pg_stat_bgwriter</></link>
4006 This new column counts the number of times a backend fsyncs a
4016 <title>Server Settings</title>
4022 Provide auto-tuning of <link
4023 linkend="guc-wal-buffers"><varname>wal_buffers</></link> (Greg
4028 By default, the value of <varname>wal_buffers</> is now chosen
4029 automatically based on the value of <varname>shared_buffers</>.
4035 Increase the maximum values for
4036 <link linkend="guc-deadlock-timeout"><varname>deadlock_timeout</varname></link>,
4037 <link linkend="guc-log-min-duration-statement"><varname>log_min_duration_statement</varname></link>, and
4038 <link linkend="guc-log-autovacuum-min-duration"><varname>log_autovacuum_min_duration</varname></link>
4043 The maximum value for each of these parameters was previously
4044 only about 35 minutes. Much larger values are now allowed.
4055 <title>Replication and Recovery</title>
4058 <title>Streaming Replication and Continuous Archiving</title>
4064 Allow <link linkend="synchronous-replication">synchronous
4065 replication</link> (Simon Riggs, Fujii Masao)
4069 This allows the primary server to wait for a standby to write a
4070 transaction's information to disk before acknowledging the commit.
4071 One standby at a time can take the role of the synchronous standby,
4072 as controlled by the
4073 <link linkend="guc-synchronous-standby-names"><varname>synchronous_standby_names</varname></link>
4074 setting. Synchronous replication can be enabled or disabled on a
4075 per-transaction basis using the
4076 <link linkend="guc-synchronous-commit"><varname>synchronous_commit</></link>
4083 Add protocol support for sending file system backups to standby servers
4084 using the streaming replication network connection (Magnus Hagander,
4089 This avoids the requirement of manually transferring a file
4090 system backup when setting up a standby server.
4097 <varname>replication_timeout</>
4098 setting (Fujii Masao, Heikki Linnakangas)
4102 Replication connections that are idle for more than the
4103 <varname>replication_timeout</> interval will be terminated
4104 automatically. Formerly, a failed connection was typically not
4105 detected until the TCP timeout elapsed, which is inconveniently
4106 long in many situations.
4112 Add command-line tool <link
4113 linkend="app-pgbasebackup"><application>pg_basebackup</></link>
4114 for creating a new standby server or database backup (Magnus
4121 Add a <link linkend="SQL-CREATEROLE">replication permission</link>
4122 for roles (Magnus Hagander)
4126 This is a read-only permission used for streaming replication.
4127 It allows a non-superuser role to be used for replication connections.
4128 Previously only superusers could initiate replication
4129 connections; superusers still have this permission by default.
4138 <title>Replication Monitoring</title>
4144 Add system view <link
4145 linkend="monitoring-stats-views-table"><structname>pg_stat_replication</></link>
4146 which displays activity of <acronym>WAL</> sender processes (Itagaki
4147 Takahiro, Simon Riggs)
4151 This reports the status of all connected standby servers.
4157 Add monitoring function <link
4158 linkend="functions-recovery-info-table"><function>pg_last_xact_replay_timestamp()</></link>
4163 This returns the time at which the primary generated the most
4164 recent commit or abort record applied on the standby.
4173 <title>Hot Standby</title>
4179 Add configuration parameter <link
4180 linkend="guc-hot-standby-feedback"><varname>hot_standby_feedback</></link>
4181 to enable standbys to postpone cleanup of old row versions on the
4182 primary (Simon Riggs)
4186 This helps avoid canceling long-running queries on the standby.
4193 linkend="monitoring-stats-views-table"><structname>pg_stat_database_conflicts</></link>
4194 system view to show queries that have been canceled and the
4195 reason (Magnus Hagander)
4199 Cancellations can occur because of dropped tablespaces, lock
4200 timeouts, old snapshots, pinned buffers, and deadlocks.
4206 Add a <structfield>conflicts</> count to <link
4207 linkend="monitoring-stats-views-table"><structname>pg_stat_database</></link>
4212 This is the number of conflicts that occurred in the database.
4218 Increase the maximum values for
4219 <link linkend="guc-max-standby-archive-delay"><varname>max_standby_archive_delay</varname></link> and
4220 <link linkend="guc-max-standby-streaming-delay"><varname>max_standby_streaming_delay</varname></link>
4224 The maximum value for each of these parameters was previously
4225 only about 35 minutes. Much larger values are now allowed.
4232 linkend="errcodes-table"><literal>ERRCODE_T_R_DATABASE_DROPPED</></link>
4233 error code to report recovery conflicts due to dropped databases
4238 This is useful for connection pooling software.
4247 <title>Recovery Control</title>
4253 Add functions to control streaming replication replay (Simon Riggs)
4257 The new functions are <link
4258 linkend="functions-recovery-control-table"><function>pg_xlog_replay_pause()</></link>,
4260 linkend="functions-recovery-control-table"><function>pg_xlog_replay_resume()</></link>,
4261 and the status function <link
4262 linkend="functions-recovery-control-table"><function>pg_is_xlog_replay_paused()</></link>.
4268 Add <filename>recovery.conf</> setting <link
4269 linkend="pause-at-recovery-target"><varname>pause_at_recovery_target</></link>
4270 to pause recovery at target (Simon Riggs)
4274 This allows a recovery server to be queried to check whether
4275 the recovery point is the one desired.
4281 Add the ability to create named restore points using <link
4282 linkend="functions-admin-backup-table"><function>pg_create_restore_point()</></link>
4287 These named restore points can be specified as recovery
4288 targets using the new <filename>recovery.conf</> setting
4289 <link linkend="recovery-target-name"><varname>recovery_target_name</></link>.
4295 Allow standby recovery to switch to a new timeline automatically
4296 (Heikki Linnakangas)
4300 Now standby servers scan the archive directory for new
4301 timelines periodically.
4308 linkend="guc-restart-after-crash"><varname>restart_after_crash</></link>
4309 setting which disables automatic server restart after a backend
4314 This allows external cluster management software to control
4315 whether the database server restarts or not.
4322 linkend="recovery-config"><filename>recovery.conf</></link>
4323 to use the same quoting behavior as <filename>postgresql.conf</>
4328 Previously all values had to be quoted.
4339 <title>Queries</title>
4346 linkend="xact-serializable">serializable isolation level</link>
4347 (Kevin Grittner, Dan Ports)
4351 Previously, asking for serializable isolation guaranteed only that a
4352 single MVCC snapshot would be used for the entire transaction, which
4353 allowed certain documented anomalies. The old snapshot isolation
4354 behavior is still available by requesting the <link
4355 linkend="xact-repeatable-read"><literal>REPEATABLE READ</></link>
4362 Allow data-modification commands
4363 (<command>INSERT</>/<command>UPDATE</>/<command>DELETE</>) in
4364 <link linkend="queries-with"><literal>WITH</></link> clauses
4365 (Marko Tiikkaja, Hitoshi Harada)
4369 These commands can use <literal>RETURNING</> to pass data up to the
4376 Allow <link linkend="queries-with"><literal>WITH</></link>
4377 clauses to be attached to <command>INSERT</>, <command>UPDATE</>,
4378 <command>DELETE</> statements (Marko Tiikkaja, Hitoshi Harada)
4384 Allow non-<link linkend="queries-group"><literal>GROUP
4385 BY</></link> columns in the query target list when the primary
4386 key is specified in the <literal>GROUP BY</> clause (Peter
4391 The SQL standard allows this behavior, and
4392 because of the primary key, the result is unambiguous.
4398 Allow use of the key word <literal>DISTINCT</> in <link
4399 linkend="queries-union"><literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</></link>
4404 <literal>DISTINCT</> is the default behavior so use of this
4405 key word is redundant, but the SQL standard allows it.
4411 Fix ordinary queries with rules to use the same snapshot behavior
4412 as <command>EXPLAIN ANALYZE</> (Marko Tiikkaja)
4416 Previously <command>EXPLAIN ANALYZE</> used slightly different
4417 snapshot timing for queries involving rules. The
4418 <command>EXPLAIN ANALYZE</> behavior was judged to be more logical.
4425 <title>Strings</title>
4431 Add per-column <link
4432 linkend="collation">collation</link> support
4433 (Peter Eisentraut, Tom Lane)
4437 Previously collation (the sort ordering of text strings) could only be
4438 chosen at database creation.
4439 Collation can now be set per column, domain, index, or
4440 expression, via the SQL-standard <literal>COLLATE</> clause.
4451 <title>Object Manipulation</title>
4457 Add <link linkend="extend-extensions">extensions</link> which
4458 simplify packaging of additions to <productname>PostgreSQL</>
4459 (Dimitri Fontaine, Tom Lane)
4463 Extensions are controlled by the new <link
4464 linkend="SQL-CREATEEXTENSION"><command>CREATE</></link>/<link
4465 linkend="SQL-ALTEREXTENSION"><command>ALTER</></link>/<link
4466 linkend="SQL-DROPEXTENSION"><command>DROP EXTENSION</></link>
4467 commands. This replaces ad-hoc methods of grouping objects that
4468 are added to a <productname>PostgreSQL</> installation.
4474 Add support for <link linkend="SQL-CREATEFOREIGNTABLE">foreign
4475 tables</link> (Shigeru Hanada, Robert Haas, Jan Urbanski,
4480 This allows data stored outside the database to be used like
4481 native <productname>PostgreSQL</>-stored data. Foreign tables
4482 are currently read-only, however.
4488 Allow new values to be added to an existing enum type via
4489 <link linkend="SQL-ALTERTYPE"><command>ALTER TYPE</></link> (Andrew
4496 Add <link linkend="SQL-ALTERTYPE"><command>ALTER TYPE ...
4497 ADD/DROP/ALTER/RENAME ATTRIBUTE</></link> (Peter Eisentraut)
4501 This allows modification of composite types.
4508 <title><command>ALTER</> Object</title>
4514 Add <literal>RESTRICT</>/<literal>CASCADE</> to <link
4515 linkend="SQL-ALTERTYPE"><command>ALTER TYPE</></link> operations
4516 on typed tables (Peter Eisentraut)
4521 <literal>ADD</>/<literal>DROP</>/<literal>ALTER</>/<literal>RENAME
4522 ATTRIBUTE</> cascading behavior.
4528 Support <literal>ALTER TABLE <replaceable>name</> {OF | NOT OF}
4529 <replaceable>type</></literal>
4534 This syntax allows a standalone table to be made into a typed table,
4535 or a typed table to be made standalone.
4541 Add support for more object types in <command>ALTER ... SET
4542 SCHEMA</> commands (Dimitri Fontaine)
4546 This command is now supported for conversions, operators, operator
4547 classes, operator families, text search configurations, text search
4548 dictionaries, text search parsers, and text search templates.
4557 <title><link linkend="SQL-CREATETABLE"><command>CREATE/ALTER TABLE</></link></title>
4563 Add <command>ALTER TABLE ...
4564 ADD UNIQUE/PRIMARY KEY USING INDEX</command>
4569 This allows a primary key or unique constraint to be defined using an
4570 existing unique index, including a concurrently created unique index.
4576 Allow <command>ALTER TABLE</>
4577 to add foreign keys without validation (Simon Riggs)
4581 The new option is called <literal>NOT VALID</>. The constraint's
4582 state can later be modified to <literal>VALIDATED</> and validation
4583 checks performed. Together these allow you to add a foreign key
4584 with minimal impact on read and write operations.
4590 Allow <link linkend="SQL-ALTERTABLE"><command>ALTER TABLE
4591 ... SET DATA TYPE</command></link> to avoid table rewrites in
4592 appropriate cases (Noah Misch, Robert Haas)
4596 For example, converting a <type>varchar</> column to
4597 <type>text</> no longer requires a rewrite of the table.
4598 However, increasing the length constraint on a
4599 <type>varchar</> column still requires a table rewrite.
4605 Add <link linkend="SQL-CREATETABLE"><command>CREATE TABLE IF
4606 NOT EXISTS</></link> syntax (Robert Haas)
4610 This allows table creation without causing an error if the
4611 table already exists.
4617 Fix possible <quote>tuple concurrently updated</quote> error
4618 when two backends attempt to add an inheritance
4619 child to the same table at the same time (Robert Haas)
4623 <link linkend="sql-altertable"><command>ALTER TABLE</command></link>
4624 now takes a stronger lock on the parent table, so that the sessions
4625 cannot try to update it simultaneously.
4634 <title>Object Permissions</title>
4640 Add a <link linkend="SQL-SECURITY-LABEL"><command>SECURITY
4641 LABEL</></link> command (KaiGai Kohei)
4645 This allows security labels to be assigned to objects.
4656 <title>Utility Operations</title>
4662 Add transaction-level <link linkend="advisory-locks">advisory
4663 locks</link> (Marko Tiikkaja)
4667 These are similar to the existing session-level advisory locks,
4668 but such locks are automatically released at transaction end.
4674 Make <link linkend="SQL-TRUNCATE"><command>TRUNCATE ... RESTART
4675 IDENTITY</></link> restart sequences transactionally (Steve
4680 Previously the counter could have been left out of sync if a
4681 backend crashed between the on-commit truncation activity and
4689 <title><link linkend="SQL-COPY"><command>COPY</></link></title>
4695 Add <literal>ENCODING</> option to <link
4696 linkend="SQL-COPY"><command>COPY TO/FROM</></link> (Hitoshi
4697 Harada, Itagaki Takahiro)
4701 This allows the encoding of the <command>COPY</> file to be
4702 specified separately from client encoding.
4708 Add bidirectional <link linkend="SQL-COPY"><command>COPY</></link>
4709 protocol support (Fujii Masao)
4713 This is currently only used by streaming replication.
4722 <title><link linkend="SQL-EXPLAIN"><command>EXPLAIN</></link></title>
4728 Make <command>EXPLAIN VERBOSE</> show the function call expression
4729 in a <literal>FunctionScan</literal> node (Tom Lane)
4738 <title><link linkend="SQL-VACUUM"><command>VACUUM</></link></title>
4744 Add additional details to the output of <link
4745 linkend="SQL-VACUUM"><command>VACUUM FULL VERBOSE</></link>
4746 and <link linkend="SQL-CLUSTER"><command>CLUSTER VERBOSE</></link>
4751 New information includes the live and dead tuple count and
4752 whether <command>CLUSTER</> is using an index to rebuild.
4758 Prevent <link linkend="autovacuum">autovacuum</link> from
4759 waiting if it cannot acquire a table lock (Robert Haas)
4763 It will try to vacuum that table later.
4772 <title><link linkend="SQL-CLUSTER"><command>CLUSTER</></link></title>
4778 Allow <command>CLUSTER</> to sort the table rather than scanning
4779 the index when it seems likely to be cheaper (Leonardo Francalanci)
4788 <title>Indexes</title>
4794 Add nearest-neighbor (order-by-operator) searching to <link
4795 linkend="GiST"><acronym>GiST</> indexes</link> (Teodor Sigaev, Tom Lane)
4799 This allows <acronym>GiST</> indexes to quickly return the
4800 <replaceable>N</> closest values in a query with <literal>LIMIT</>.
4802 <programlisting><![CDATA[
4803 SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10;
4806 finds the ten places closest to a given target point.
4812 Allow <link linkend="GIN"><acronym>GIN</> indexes</link> to index null
4813 and empty values (Tom Lane)
4817 This allows full <acronym>GIN</> index scans, and fixes various
4818 corner cases in which GIN scans would fail.
4824 Allow <link linkend="GIN"><acronym>GIN</> indexes</link> to
4825 better recognize duplicate search entries (Tom Lane)
4829 This reduces the cost of index scans, especially in cases where
4830 it avoids unnecessary full index scans.
4836 Fix <link linkend="GiST"><acronym>GiST</> indexes</link> to be fully
4837 crash-safe (Heikki Linnakangas)
4841 Previously there were rare cases where a <command>REINDEX</>
4842 would be required (you would be informed).
4853 <title>Data Types</title>
4859 Allow <type>numeric</> to use a more compact, two-byte header
4860 in common cases (Robert Haas)
4864 Previously all <type>numeric</> values had four-byte headers;
4865 this change saves on disk storage.
4871 Add support for dividing <type>money</> by <type>money</>
4878 Allow binary I/O on type <type>void</type> (Radoslaw Smogura)
4884 Improve hypotenuse calculations for geometric operators (Paul Matthews)
4888 This avoids unnecessary overflows, and may also be more accurate.
4894 Support hashing array values (Tom Lane)
4898 This provides additional query optimization possibilities.
4904 Don't treat a composite type as sortable unless all its column types
4905 are sortable (Tom Lane)
4909 This avoids possible <quote>could not identify a comparison function</>
4910 failures at runtime, if it is possible to implement the query without
4911 sorting. Also, <command>ANALYZE</> won't try to use inappropriate
4912 statistics-gathering methods for columns of such composite types.
4919 <title>Casting</title>
4925 Add support for casting between <type>money</> and <type>numeric</>
4932 Add support for casting from <type>int4</> and <type>int8</>
4933 to <type>money</> (Joey Adams)
4939 Allow casting a table's row type to the table's supertype if
4940 it's a typed table (Peter Eisentraut)
4944 This is analogous to the existing facility that allows casting a row
4945 type to a supertable's row type.
4954 <title><link linkend="functions-xml"><acronym>XML</></link></title>
4960 Add <acronym>XML</> function <link
4961 linkend="xml-exists"><literal>XMLEXISTS</></link> and <link
4962 linkend="xml-exists"><function>xpath_exists()</></link>
4963 functions (Mike Fowler)
4967 These are used for XPath matching.
4973 Add <acronym>XML</> functions <link
4974 linkend="xml-is-well-formed"><function>xml_is_well_formed()</></link>,
4976 linkend="xml-is-well-formed"><function>xml_is_well_formed_document()</></link>,
4978 linkend="xml-is-well-formed"><function>xml_is_well_formed_content()</></link>
4983 These check whether the input is properly-formed <acronym>XML</>.
4984 They provide functionality that was previously available only in
4985 the deprecated <filename>contrib/xml2</filename> module.
4996 <title>Functions</title>
5002 Add SQL function <link
5003 linkend="format"><function>format(text, ...)</></link>, which
5004 behaves analogously to C's <function>printf()</> (Pavel Stehule,
5009 It currently supports formats for strings, SQL literals, and
5016 Add string functions <link
5017 linkend="functions-string-other"><function>concat()</></link>,
5019 linkend="functions-string-other"><function>concat_ws()</></link>,
5020 <link linkend="functions-string-other"><function>left()</></link>,
5021 <link linkend="functions-string-other"><function>right()</></link>,
5023 linkend="functions-string-other"><function>reverse()</></link>
5028 These improve compatibility with other database products.
5035 linkend="functions-admin-genfile"><function>pg_read_binary_file()</></link>
5036 to read binary files (Dimitri Fontaine, Itagaki Takahiro)
5042 Add a single-parameter version of function <link
5043 linkend="functions-admin-genfile"><function>pg_read_file()</></link>
5044 to read an entire file (Dimitri Fontaine, Itagaki Takahiro)
5050 Add three-parameter forms of <link
5051 linkend="array-functions-table"><function>array_to_string()</></link>
5053 linkend="array-functions-table"><function>string_to_array()</></link>
5054 for null value processing control (Pavel Stehule)
5061 <title>Object Information Functions</title>
5068 linkend="functions-info-catalog-table"><function>pg_describe_object()</></link>
5069 function (Alvaro Herrera)
5073 This function is used to obtain a human-readable string describing
5074 an object, based on the <link
5075 linkend="catalog-pg-class"><structname>pg_class</structname></link>
5076 OID, object OID, and sub-object ID. It can be used to help
5077 interpret the contents of <link
5078 linkend="catalog-pg-depend"><structname>pg_depend</structname></link>.
5084 Update comments for built-in operators and their underlying
5085 functions (Tom Lane)
5089 Functions that are meant to be used via an associated operator
5090 are now commented as such.
5097 linkend="guc-quote-all-identifiers"><varname>quote_all_identifiers</></link>
5098 to force the quoting of all identifiers in <command>EXPLAIN</>
5099 and in system catalog functions like <link
5100 linkend="functions-info-catalog-table"><function>pg_get_viewdef()</></link>
5105 This makes exporting schemas to tools and other databases with
5106 different quoting rules easier.
5112 Add columns to the <link
5113 linkend="infoschema-sequences"><structname>information_schema.sequences</></link>
5114 system view (Peter Eisentraut)
5118 Previously, though the view existed, the columns about the
5119 sequence parameters were unimplemented.
5125 Allow <literal>public</> as a pseudo-role name in <link
5126 linkend="functions-info-access-table"><function>has_table_privilege()</></link>
5127 and related functions (Alvaro Herrera)
5131 This allows checking for public permissions.
5140 <title>Function and Trigger Creation</title>
5146 Support <link linkend="SQL-CREATETRIGGER"><literal>INSTEAD
5147 OF</></link> triggers on views (Dean Rasheed)
5151 This feature can be used to implement fully updatable views.
5162 <title>Server-Side Languages</title>
5165 <title><link linkend="plpgsql">PL/pgSQL</link> Server-Side Language</title>
5171 Add <link linkend="plpgsql-foreach-array"><command>FOREACH IN
5172 ARRAY</></link> to PL/pgSQL
5177 This is more efficient and readable than previous methods of
5178 iterating through the elements of an array value.
5184 Allow <command>RAISE</command> without parameters to be caught in
5185 the same places that could catch a <command>RAISE ERROR</command>
5186 from the same location (Piyush Newe)
5190 The previous coding threw the error
5191 from the block containing the active exception handler.
5192 The new behavior is more consistent with other DBMS products.
5201 <title><link linkend="plperl">PL/Perl</link> Server-Side Language</title>
5207 Allow generic record arguments to PL/Perl functions (Andrew
5212 PL/Perl functions can now be declared to accept type <type>record</>.
5213 The behavior is the same as for any named composite type.
5219 Convert PL/Perl array arguments to Perl arrays (Alexey Klyukin,
5224 String representations are still available.
5230 Convert PL/Perl composite-type arguments to Perl hashes
5231 (Alexey Klyukin, Alex Hunsaker)
5235 String representations are still available.
5244 <title><link linkend="plpython">PL/Python</link> Server-Side Language</title>
5250 Add table function support for PL/Python (Jan Urbanski)
5254 PL/Python can now return multiple <literal>OUT</> parameters
5261 Add a validator to PL/Python (Jan Urbanski)
5265 This allows PL/Python functions to be syntax-checked at function
5272 Allow exceptions for SQL queries in PL/Python (Jan Urbanski)
5276 This allows access to SQL-generated exception error codes from
5277 PL/Python exception blocks.
5283 Add explicit subtransactions to PL/Python (Jan Urbanski)
5289 Add PL/Python functions for quoting strings (Jan Urbanski)
5293 These functions are <link
5294 linkend="plpython-util"><literal>plpy.quote_ident</></link>,
5295 <link linkend="plpython-util"><literal>plpy.quote_literal</></link>,
5297 linkend="plpython-util"><literal>plpy.quote_nullable</></link>.
5303 Add traceback information to PL/Python errors (Jan Urbanski)
5309 Report PL/Python errors from iterators with <literal>PLy_elog</> (Jan
5316 Fix exception handling with Python 3 (Jan Urbanski)
5320 Exception classes were previously not available in
5321 <literal>plpy</> under Python 3.
5332 <title>Client Applications</title>
5339 linkend="APP-CREATELANG"><application>createlang</></link>
5340 and <link linkend="APP-DROPLANG"><application>droplang</></link>
5341 as deprecated now that they just invoke extension commands (Tom
5349 <title><link linkend="APP-PSQL"><application>psql</></link></title>
5355 Add <application>psql</> command <literal>\conninfo</>
5356 to show current connection information (David Christensen)
5362 Add <application>psql</> command <literal>\sf</> to
5363 show a function's definition (Pavel Stehule)
5369 Add <application>psql</> command <literal>\dL</> to list
5370 languages (Fernando Ike)
5376 Add the <option>S</> (<quote>system</>) option to <application>psql</>'s
5377 <literal>\dn</> (list schemas) command (Tom Lane)
5381 <literal>\dn</> without <literal>S</> now suppresses system
5388 Allow <application>psql</>'s <literal>\e</> and <literal>\ef</>
5389 commands to accept a line number to be used to position the
5390 cursor in the editor (Pavel Stehule)
5394 This is passed to the editor according to the
5395 <envar>PSQL_EDITOR_LINENUMBER_ARG</> environment variable.
5401 Have <application>psql</> set the client encoding from the
5402 operating system locale by default (Heikki Linnakangas)
5406 This only happens if the <envar>PGCLIENTENCODING</> environment
5407 variable is not set.
5413 Make <literal>\d</literal> distinguish between unique
5414 indexes and unique constraints (Josh Kupershmidt)
5420 Make <literal>\dt+</literal> report <function>pg_table_size</>
5421 instead of <function>pg_relation_size</> when talking to 9.0 or
5422 later servers (Bernd Helmle)
5426 This is a more useful measure of table size, but note that it is
5427 not identical to what was previously reported in the same display.
5433 Additional tab completion support (Itagaki Takahiro, Pavel Stehule,
5434 Andrey Popp, Christoph Berg, David Fetter, Josh Kupershmidt)
5443 <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title>
5449 Add <link linkend="APP-PGDUMP"><application>pg_dump</></link>
5451 linkend="APP-PG-DUMPALL"><application>pg_dumpall</></link>
5452 option <option>--quote-all-identifiers</> to force quoting
5453 of all identifiers (Robert Haas)
5459 Add <literal>directory</> format to <application>pg_dump</>
5460 (Joachim Wieland, Heikki Linnakangas)
5464 This is internally similar to the <literal>tar</>
5465 <application>pg_dump</> format.
5474 <title><link linkend="APP-PG-CTL"><application>pg_ctl</></link></title>
5480 Fix <application>pg_ctl</>
5481 so it no longer incorrectly reports that the server is not
5482 running (Bruce Momjian)
5486 Previously this could happen if the server was running but
5487 <application>pg_ctl</> could not authenticate.
5493 Improve <application>pg_ctl</> start's <quote>wait</quote>
5494 (<option>-w</>) option (Bruce Momjian, Tom Lane)
5498 The wait mode is now significantly more robust. It will not get
5499 confused by non-default postmaster port numbers, non-default
5500 Unix-domain socket locations, permission problems, or stale
5501 postmaster lock files.
5507 Add <literal>promote</> option to <application>pg_ctl</> to
5508 switch a standby server to primary (Fujii Masao)
5519 <title><application>Development Tools</></title>
5522 <title><link linkend="libpq"><application>libpq</></link></title>
5528 Add a libpq connection option <link
5529 linkend="libpq-connect-client-encoding"><literal>client_encoding</></link>
5530 which behaves like the <envar>PGCLIENTENCODING</> environment
5531 variable (Heikki Linnakangas)
5535 The value <literal>auto</> sets the client encoding based on
5536 the operating system locale.
5543 linkend="libpq-pqlibversion"><function>PQlibVersion()</></link>
5544 function which returns the libpq library version (Magnus
5549 libpq already had <function>PQserverVersion()</> which returns
5556 Allow libpq-using clients to
5557 check the user name of the server process
5558 when connecting via Unix-domain sockets, with the new <link
5559 linkend="libpq-connect-requirepeer"><literal>requirepeer</></link>
5565 <productname>PostgreSQL</> already allowed servers to check
5566 the client user name when connecting via Unix-domain sockets.
5572 Add <link linkend="libpq-pqping"><function>PQping()</></link>
5574 linkend="libpq-pqpingparams"><function>PQpingParams()</></link>
5575 to libpq (Bruce Momjian, Tom Lane)
5579 These functions allow detection of the server's status without
5580 trying to open a new session.
5589 <title><link linkend="ecpg"><application>ECPG</></link></title>
5595 Allow ECPG to accept dynamic cursor names even in
5596 <literal>WHERE CURRENT OF</literal> clauses
5597 (Zoltan Boszormenyi)
5603 Make <application>ecpglib</> write <type>double</> values with a
5604 precision of 15 digits, not 14 as formerly (Akira Kurosawa)
5614 <title>Build Options</title>
5620 Use <literal>+Olibmerrno</> compile flag with HP-UX C compilers
5621 that accept it (Ibrar Ahmed)
5625 This avoids possible misbehavior of math library calls on recent
5633 <title>Makefiles</title>
5639 Improved parallel make support (Peter Eisentraut)
5643 This allows for faster compiles. Also, <literal>make -k</>
5644 now works more consistently.
5650 Require <acronym>GNU</> <link
5651 linkend="install-requirements"><application>make</></link>
5652 3.80 or newer (Peter Eisentraut)
5656 This is necessary because of the parallel-make improvements.
5662 Add <literal>make maintainer-check</> target
5667 This target performs various source code checks that are not
5668 appropriate for either the build or the regression tests. Currently:
5669 duplicate_oids, SGML syntax and tabs check, NLS syntax check.
5675 Support <literal>make check</> in <filename>contrib</>
5680 Formerly only <literal>make installcheck</> worked, but now
5681 there is support for testing in a temporary installation.
5682 The top-level <literal>make check-world</> target now includes
5683 testing <filename>contrib</> this way.
5692 <title>Windows</title>
5698 On Windows, allow <link
5699 linkend="app-pg-ctl"><application>pg_ctl</></link> to register
5700 the service as auto-start or start-on-demand (Quan Zongliang)
5706 Add support for collecting <link linkend="windows-crash-dumps">crash
5707 dumps</link> on Windows (Craig Ringer, Magnus Hagander)
5711 <productname>minidumps</> can now be generated by non-debug
5712 Windows binaries and analyzed by standard debugging tools.
5718 Enable building with the MinGW64 compiler (Andrew Dunstan)
5722 This allows building 64-bit Windows binaries even on non-Windows
5723 platforms via cross-compiling.
5734 <title>Source Code</title>
5740 Revise the API for GUC variable assign hooks (Tom Lane)
5744 The previous functions of assign hooks are now split between check
5745 hooks and assign hooks, where the former can fail but the latter
5746 shouldn't. This change will impact add-on modules that define custom
5753 Add latches to the source code to support waiting for events (Heikki
5760 Centralize data modification permissions-checking logic
5767 Add missing <function>get_<replaceable>object</>_oid()</function> functions, for consistency
5774 Improve ability to use C++ compilers for <link
5775 linkend="xfunc-c">compiling add-on modules</link> by removing
5776 conflicting key words (Tom Lane)
5782 Add support for DragonFly <acronym>BSD</> (Rumko)
5788 Expose <function>quote_literal_cstr()</> for backend use
5795 Run <link linkend="build">regression tests</link> in the
5796 default encoding (Peter Eisentraut)
5800 Regression tests were previously always run with
5801 <literal>SQL_ASCII</> encoding.
5807 Add <application>src/tools/git_changelog</> to replace
5808 <application>cvs2cl</> and <application>pgcvslog</> (Robert
5815 Add <application>git-external-diff</> script to
5816 <filename>src/tools</> (Bruce Momjian)
5820 This is used to generate context diffs from git.
5826 Improve support for building with
5827 <application>Clang</application> (Peter Eisentraut)
5834 <title>Server Hooks</title>
5840 Add source code hooks to check permissions (Robert Haas,
5847 Add post-object-creation function hooks for use by security
5848 frameworks (KaiGai Kohei)
5854 Add a client authentication hook (KaiGai Kohei)
5865 <title>Contrib</title>
5871 Modify <filename>contrib</> modules and procedural
5872 languages to install via the new <link
5873 linkend="extend-extensions">extension</link> mechanism (Tom Lane,
5880 Add <link linkend="file-fdw"><filename>contrib/file_fdw</></link>
5881 foreign-data wrapper (Shigeru Hanada)
5885 Foreign tables using this foreign data wrapper can read flat files
5886 in a manner very similar to <command>COPY</>.
5892 Add nearest-neighbor search support to <link
5893 linkend="pgtrgm"><filename>contrib/pg_trgm</></link> and <link
5894 linkend="btree-gist"><filename>contrib/btree_gist</></link>
5902 linkend="btree-gist"><filename>contrib/btree_gist</></link>
5903 support for searching on not-equals (Jeff Davis)
5910 linkend="fuzzystrmatch"><filename>contrib/fuzzystrmatch</></link>'s
5911 <function>levenshtein()</> function to handle multibyte characters
5912 (Alexander Korotkov)
5918 Add <function>ssl_cipher()</> and <function>ssl_version()</>
5920 linkend="sslinfo"><filename>contrib/sslinfo</></link> (Robert
5927 Fix <link linkend="intarray"><filename>contrib/intarray</></link>
5928 and <link linkend="hstore"><filename>contrib/hstore</></link>
5929 to give consistent results with indexed empty arrays (Tom Lane)
5933 Previously an empty-array query that used an index might return
5934 different results from one that used a sequential scan.
5940 Allow <link linkend="intarray"><filename>contrib/intarray</></link>
5941 to work properly on multidimensional arrays (Tom Lane)
5948 <link linkend="intarray"><filename>contrib/intarray</></link>,
5949 avoid errors complaining about the presence of nulls in cases where no
5950 nulls are actually present (Tom Lane)
5957 <link linkend="intarray"><filename>contrib/intarray</></link>,
5958 fix behavior of containment operators with respect to empty arrays
5963 Empty arrays are now correctly considered to be contained in any other
5970 Remove <link linkend="xml2"><filename>contrib/xml2</></link>'s
5971 arbitrary limit on the number of
5972 <replaceable>parameter</>=<replaceable>value</> pairs that can be
5973 handled by <function>xslt_process()</> (Pavel Stehule)
5977 The previous limit was 10.
5983 In <link linkend="pageinspect"><filename>contrib/pageinspect</></link>,
5984 fix heap_page_item to return infomasks as 32-bit values (Alvaro Herrera)
5988 This avoids returning negative values, which was confusing. The
5989 underlying value is a 16-bit unsigned integer.
5996 <title>Security</title>
6002 Add <link linkend="sepgsql"><filename>contrib/sepgsql</></link>
6003 to interface permission checks with <acronym>SELinux</> (KaiGai Kohei)
6007 This uses the new <link
6008 linkend="SQL-SECURITY-LABEL"><command>SECURITY LABEL</></link>
6015 Add contrib module <link
6016 linkend="auth-delay"><filename>auth_delay</></link> (KaiGai
6021 This causes the server to pause before returning authentication
6022 failure; it is designed to make brute force password attacks
6029 Add <link linkend="dummy-seclabel"><filename>dummy_seclabel</></link>
6030 contrib module (KaiGai Kohei)
6034 This is used for permission regression testing.
6043 <title>Performance</title>
6049 Add support for <literal>LIKE</> and <literal>ILIKE</> index
6051 linkend="pgtrgm"><filename>contrib/pg_trgm</></link> (Alexander
6058 Add <function>levenshtein_less_equal()</> function to <link
6059 linkend="fuzzystrmatch"><filename>contrib/fuzzystrmatch</></link>,
6060 which is optimized for small distances (Alexander Korotkov)
6066 Improve performance of index lookups on <link
6067 linkend="seg"><filename>contrib/seg</></link> columns (Alexander
6074 Improve performance of <link
6075 linkend="pgupgrade"><application>pg_upgrade</></link> for
6076 databases with many relations (Bruce Momjian)
6083 linkend="pgbench"><filename>contrib/pgbench</></link> to
6084 report per-statement latencies (Florian Pflug)
6093 <title>Fsync Testing</title>
6099 Move <filename>src/tools/test_fsync</> to <link
6100 linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link>
6101 (Bruce Momjian, Tom Lane)
6107 Add <literal>O_DIRECT</> support to <link
6108 linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link>
6113 This matches the use of <literal>O_DIRECT</> by <link
6114 linkend="guc-wal-sync-method"><varname>wal_sync_method</></link>.
6120 Add new tests to <link
6121 linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link>
6133 <title>Documentation</title>
6139 Extensive <link linkend="ecpg"><application>ECPG</></link>
6140 documentation improvements (Satoshi Nagayasu)
6146 Extensive proofreading and documentation improvements
6147 (Thom Brown, Josh Kupershmidt, Susanne Ebrecht)
6153 Add documentation for <link
6154 linkend="guc-exit-on-error"><varname>exit_on_error</></link>
6159 This parameter causes sessions to exit on any error.
6165 Add documentation for <link
6166 linkend="functions-info-catalog-table"><function>pg_options_to_table()</></link>
6171 This function shows table storage options in a readable form.
6177 Document that it is possible to access all composite type
6179 linkend="field-selection"><literal>(compositeval).*</></link>
6180 syntax (Peter Eisentraut)
6187 linkend="functions-string-other"><function>translate()</></link>
6188 removes characters in <literal>from</> that don't have a
6189 corresponding <literal>to</> character (Josh Kupershmidt)
6195 Merge documentation for <command>CREATE CONSTRAINT TRIGGER</> and <link
6196 linkend="SQL-CREATETRIGGER"><command>CREATE TRIGGER</></link>
6203 Centralize <link linkend="ddl-priv">permission</link> and <link
6204 linkend="upgrading">upgrade</link> documentation (Bruce Momjian)
6210 Add <link linkend="sysvipc-parameters">kernel tuning
6211 documentation</link> for Solaris 10 (Josh Berkus)
6215 Previously only Solaris 9 kernel tuning was documented.
6221 Handle non-ASCII characters consistently in <filename>HISTORY</> file
6226 While the <filename>HISTORY</> file is in English, we do have to deal
6227 with non-ASCII letters in contributor names. These are now
6228 transliterated so that they are reasonably legible without assumptions
6229 about character set.