]> granicus.if.org Git - postgresql/blob - doc/src/sgml/release-9.1.sgml
Update release notes for 9.2.3, 9.1.8, 9.0.12, 8.4.16, 8.3.23.
[postgresql] / doc / src / sgml / release-9.1.sgml
1 <!-- doc/src/sgml/release-9.1.sgml -->
2 <!-- See header comment in release.sgml about typical markup -->
3
4  <sect1 id="release-9-1-8">
5   <title>Release 9.1.8</title>
6
7   <note>
8   <title>Release Date</title>
9   <simpara>2013-02-07</simpara>
10   </note>
11
12   <para>
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">.
16   </para>
17
18   <sect2>
19    <title>Migration to Version 9.1.8</title>
20
21    <para>
22     A dump/restore is not required for those running 9.1.X.
23    </para>
24
25    <para>
26     However, if you are upgrading from a version earlier than 9.1.6,
27     see the release notes for 9.1.6.
28    </para>
29
30   </sect2>
31
32   <sect2>
33    <title>Changes</title>
34
35    <itemizedlist>
36
37     <listitem>
38      <para>
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)
42      </para>
43     </listitem>
44
45     <listitem>
46      <para>
47       Update minimum recovery point when truncating a relation file (Heikki
48       Linnakangas)
49      </para>
50
51      <para>
52       Once data has been discarded, it's no longer safe to stop recovery at
53       an earlier point in the timeline.
54      </para>
55     </listitem>
56
57     <listitem>
58      <para>
59       Fix recycling of WAL segments after changing recovery target timeline
60       (Heikki Linnakangas)
61      </para>
62     </listitem>
63
64     <listitem>
65      <para>
66       Fix missing cancellations in hot standby mode (Noah Misch, Simon Riggs)
67      </para>
68
69      <para>
70       The need to cancel conflicting hot-standby queries would sometimes be
71       missed, allowing those queries to see inconsistent data.
72      </para>
73     </listitem>
74
75     <listitem>
76      <para>
77       Prevent recovery pause feature from pausing before users can connect
78       (Tom Lane)
79      </para>
80     </listitem>
81
82     <listitem>
83      <para>
84       Fix SQL grammar to allow subscripting or field selection from a
85       sub-SELECT result (Tom Lane)
86      </para>
87     </listitem>
88
89     <listitem>
90      <para>
91       Fix performance problems with autovacuum truncation in busy workloads
92       (Jan Wieck)
93      </para>
94
95      <para>
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.
104      </para>
105     </listitem>
106
107     <listitem>
108      <para>
109       Protect against race conditions when scanning
110       <structname>pg_tablespace</> (Stephen Frost, Tom Lane)
111      </para>
112
113      <para>
114       <command>CREATE DATABASE</> and <command>DROP DATABASE</> could
115       misbehave if there were concurrent updates of
116       <structname>pg_tablespace</> entries.
117      </para>
118     </listitem>
119
120     <listitem>
121      <para>
122       Prevent <command>DROP OWNED</> from trying to drop whole databases or
123       tablespaces (&Aacute;lvaro Herrera)
124      </para>
125
126      <para>
127       For safety, ownership of these objects must be reassigned, not dropped.
128      </para>
129     </listitem>
130
131     <listitem>
132      <para>
133       Fix error in <link
134       linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link>
135       implementation (Andres Freund)
136      </para>
137
138      <para>
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
142       than intended.
143      </para>
144     </listitem>
145
146     <listitem>
147      <para>
148       Prevent misbehavior when a <symbol>RowExpr</> or <symbol>XmlExpr</>
149       is parse-analyzed twice (Andres Freund, Tom Lane)
150      </para>
151
152      <para>
153       This mistake could be user-visible in contexts such as
154       <literal>CREATE TABLE LIKE INCLUDING INDEXES</>.
155      </para>
156     </listitem>
157
158     <listitem>
159      <para>
160       Improve defenses against integer overflow in hashtable sizing
161       calculations (Jeff Davis)
162      </para>
163     </listitem>
164
165     <listitem>
166      <para>
167       Fix failure to ignore leftover temporary tables after a server crash
168       (Tom Lane)
169      </para>
170     </listitem>
171
172     <listitem>
173      <para>
174       Reject out-of-range dates in <function>to_date()</> (Hitoshi Harada)
175      </para>
176     </listitem>
177
178     <listitem>
179      <para>
180       Fix <function>pg_extension_config_dump()</> to handle
181       extension-update cases properly (Tom Lane)
182      </para>
183
184      <para>
185       This function will now replace any existing entry for the target
186       table, making it usable in extension update scripts.
187      </para>
188     </listitem>
189
190     <listitem>
191      <para>
192       Fix PL/Python's handling of functions used as triggers on multiple
193       tables (Andres Freund)
194      </para>
195     </listitem>
196
197     <listitem>
198      <para>
199       Ensure that non-ASCII prompt strings are translated to the correct
200       code page on Windows (Alexander Law, Noah Misch)
201      </para>
202
203      <para>
204       This bug affected <application>psql</> and some other client programs.
205      </para>
206     </listitem>
207
208     <listitem>
209      <para>
210       Fix possible crash in <application>psql</>'s <command>\?</> command
211       when not connected to a database (Meng Qingzhong)
212      </para>
213     </listitem>
214
215     <listitem>
216      <para>
217       Fix possible error if a relation file is removed while
218       <application>pg_basebackup</> is running (Heikki Linnakangas)
219      </para>
220     </listitem>
221
222     <listitem>
223      <para>
224       Make <application>pg_dump</> exclude data of unlogged tables when
225       running on a hot-standby server (Magnus Hagander)
226      </para>
227
228      <para>
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.
232      </para>
233     </listitem>
234
235     <listitem>
236      <para>
237       Fix <application>pg_upgrade</> to deal with invalid indexes safely
238       (Bruce Momjian)
239      </para>
240     </listitem>
241
242     <listitem>
243      <para>
244       Fix one-byte buffer overrun in <application>libpq</>'s
245       <function>PQprintTuples</> (Xi Wang)
246      </para>
247
248      <para>
249       This ancient function is not used anywhere by
250       <productname>PostgreSQL</> itself, but it might still be used by some
251       client code.
252      </para>
253     </listitem>
254
255     <listitem>
256      <para>
257       Make <application>ecpglib</> use translated messages properly
258       (Chen Huajun)
259      </para>
260     </listitem>
261
262     <listitem>
263      <para>
264       Properly install <application>ecpg_compat</> and
265       <application>pgtypes</> libraries on MSVC (Jiang Guiqing)
266      </para>
267     </listitem>
268
269     <listitem>
270      <para>
271       Include our version of <function>isinf()</> in
272       <application>libecpg</> if it's not provided by the system
273       (Jiang Guiqing)
274      </para>
275     </listitem>
276
277     <listitem>
278      <para>
279       Rearrange configure's tests for supplied functions so it is not
280       fooled by bogus exports from libedit/libreadline (Christoph Berg)
281      </para>
282     </listitem>
283
284     <listitem>
285      <para>
286       Ensure Windows build number increases over time (Magnus Hagander)
287      </para>
288     </listitem>
289
290     <listitem>
291      <para>
292       Make <application>pgxs</> build executables with the right
293       <literal>.exe</> suffix when cross-compiling for Windows
294       (Zoltan Boszormenyi)
295      </para>
296     </listitem>
297
298     <listitem>
299      <para>
300       Add new timezone abbreviation <literal>FET</> (Tom Lane)
301      </para>
302
303      <para>
304       This is now used in some eastern-European time zones.
305      </para>
306     </listitem>
307
308    </itemizedlist>
309
310   </sect2>
311  </sect1>
312
313  <sect1 id="release-9-1-7">
314   <title>Release 9.1.7</title>
315
316   <note>
317   <title>Release Date</title>
318   <simpara>2012-12-06</simpara>
319   </note>
320
321   <para>
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">.
325   </para>
326
327   <sect2>
328    <title>Migration to Version 9.1.7</title>
329
330    <para>
331     A dump/restore is not required for those running 9.1.X.
332    </para>
333
334    <para>
335     However, if you are upgrading from a version earlier than 9.1.6,
336     see the release notes for 9.1.6.
337    </para>
338
339   </sect2>
340
341   <sect2>
342    <title>Changes</title>
343
344    <itemizedlist>
345
346     <listitem>
347      <para>
348       Fix multiple bugs associated with <command>CREATE INDEX
349       CONCURRENTLY</> (Andres Freund, Tom Lane)
350      </para>
351
352      <para>
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.
358      </para>
359
360      <para>
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
366       the invalid index.
367      </para>
368     </listitem>
369
370     <listitem>
371      <para>
372       Fix buffer locking during WAL replay (Tom Lane)
373      </para>
374
375      <para>
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.
380      </para>
381     </listitem>
382
383     <listitem>
384      <para>
385       Fix an error in WAL generation logic for GIN indexes (Tom Lane)
386      </para>
387
388      <para>
389       This could result in index corruption, if a torn-page failure occurred.
390      </para>
391     </listitem>
392
393     <listitem>
394      <para>
395       Properly remove startup process's virtual XID lock when promoting a
396       hot standby server to normal running (Simon Riggs)
397      </para>
398
399      <para>
400       This oversight could prevent subsequent execution of certain
401       operations such as <command>CREATE INDEX CONCURRENTLY</>.
402      </para>
403     </listitem>
404
405     <listitem>
406      <para>
407       Avoid bogus <quote>out-of-sequence timeline ID</> errors in standby
408       mode (Heikki Linnakangas)
409      </para>
410     </listitem>
411
412     <listitem>
413      <para>
414       Prevent the postmaster from launching new child processes after it's
415       received a shutdown signal (Tom Lane)
416      </para>
417
418      <para>
419       This mistake could result in shutdown taking longer than it should, or
420       even never completing at all without additional user action.
421      </para>
422     </listitem>
423
424     <listitem>
425      <para>
426       Avoid corruption of internal hash tables when out of memory
427       (Hitoshi Harada)
428      </para>
429     </listitem>
430
431     <listitem>
432      <para>
433       Prevent file descriptors for dropped tables from being held open past
434       transaction end (Tom Lane)
435      </para>
436
437      <para>
438       This should reduce problems with long-since-dropped tables continuing
439       to occupy disk space.
440      </para>
441     </listitem>
442
443     <listitem>
444      <para>
445       Prevent database-wide crash and restart when a new child process is
446       unable to create a pipe for its latch (Tom Lane)
447      </para>
448
449      <para>
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.
453      </para>
454     </listitem>
455
456     <listitem>
457      <para>
458       Fix planning of non-strict equivalence clauses above outer joins
459       (Tom Lane)
460      </para>
461
462      <para>
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.
467      </para>
468     </listitem>
469
470     <listitem>
471      <para>
472       Fix <command>SELECT DISTINCT</> with index-optimized
473       <function>MIN</>/<function>MAX</> on an inheritance tree (Tom Lane)
474      </para>
475
476      <para>
477       The planner would fail with <quote>failed to re-find MinMaxAggInfo
478       record</> given this combination of factors.
479      </para>
480     </listitem>
481
482     <listitem>
483      <para>
484       Improve planner's ability to prove exclusion constraints from
485       equivalence classes (Tom Lane)
486      </para>
487     </listitem>
488
489     <listitem>
490      <para>
491       Fix partial-row matching in hashed subplans to handle cross-type cases
492       correctly (Tom Lane)
493      </para>
494
495      <para>
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.
501      </para>
502     </listitem>
503
504     <listitem>
505      <para>
506       Acquire buffer lock when re-fetching the old tuple for an
507       <literal>AFTER ROW UPDATE/DELETE</> trigger (Andres Freund)
508      </para>
509
510      <para>
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
515       fire the trigger.
516      </para>
517     </listitem>
518
519     <listitem>
520      <para>
521       Fix <command>ALTER COLUMN TYPE</> to handle inherited check
522       constraints properly (Pavan Deolasee)
523      </para>
524
525      <para>
526       This worked correctly in pre-8.4 releases, and now works correctly
527       in 8.4 and later.
528      </para>
529     </listitem>
530
531     <listitem>
532      <para>
533       Fix <command>ALTER EXTENSION SET SCHEMA</>'s failure  to move some
534       subsidiary objects into the new schema (&Aacute;lvaro Herrera, Dimitri
535       Fontaine)
536      </para>
537     </listitem>
538
539     <listitem>
540      <para>
541       Fix <command>REASSIGN OWNED</> to handle grants on tablespaces
542       (&Aacute;lvaro Herrera)
543      </para>
544     </listitem>
545
546     <listitem>
547      <para>
548       Ignore incorrect <structname>pg_attribute</> entries for system
549       columns for views (Tom Lane)
550      </para>
551
552      <para>
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.
557      </para>
558     </listitem>
559
560     <listitem>
561      <para>
562       Fix rule printing to dump <literal>INSERT INTO <replaceable>table</>
563       DEFAULT VALUES</literal> correctly (Tom Lane)
564      </para>
565     </listitem>
566
567     <listitem>
568      <para>
569       Guard against stack overflow when there are too many
570       <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> clauses
571       in a query (Tom Lane)
572      </para>
573     </listitem>
574
575     <listitem>
576      <para>
577       Prevent platform-dependent failures when dividing the minimum possible
578       integer value by -1 (Xi Wang, Tom Lane)
579      </para>
580     </listitem>
581
582     <listitem>
583      <para>
584       Fix possible access past end of string in date parsing
585       (Hitoshi Harada)
586      </para>
587     </listitem>
588
589     <listitem>
590      <para>
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)
594      </para>
595
596      <para>
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.
601      </para>
602     </listitem>
603
604     <listitem>
605      <para>
606       Fix display of
607       <structname>pg_stat_replication</>.<structfield>sync_state</> at a
608       page boundary (Kyotaro Horiguchi)
609      </para>
610     </listitem>
611
612     <listitem>
613      <para>
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)
617      </para>
618
619      <para>
620       Formerly, this would result in something quite unhelpful, such as
621       <quote>Non-recoverable failure in name resolution</>.
622      </para>
623     </listitem>
624
625     <listitem>
626      <para>
627       Fix memory leaks when sending composite column values to the client
628       (Tom Lane)
629      </para>
630     </listitem>
631
632     <listitem>
633      <para>
634       Make <application>pg_ctl</> more robust about reading the
635       <filename>postmaster.pid</> file (Heikki Linnakangas)
636      </para>
637
638      <para>
639       Fix race conditions and possible file descriptor leakage.
640      </para>
641     </listitem>
642
643     <listitem>
644      <para>
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)
648      </para>
649     </listitem>
650
651     <listitem>
652      <para>
653       Make <application>pg_dump</> dump <literal>SEQUENCE SET</> items in
654       the data not pre-data section of the archive (Tom Lane)
655      </para>
656
657      <para>
658       This change fixes dumping of sequences that are marked as extension
659       configuration tables.
660      </para>
661     </listitem>
662
663     <listitem>
664      <para>
665       Fix bugs in the <filename>restore.sql</> script emitted by
666       <application>pg_dump</> in <literal>tar</> output format (Tom Lane)
667      </para>
668
669      <para>
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.
673      </para>
674     </listitem>
675
676     <listitem>
677      <para>
678       Fix <application>pg_restore</> to accept POSIX-conformant
679       <literal>tar</> files (Brian Weaver, Tom Lane)
680      </para>
681
682      <para>
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.
689      </para>
690     </listitem>
691
692     <listitem>
693      <para>
694       Fix <literal>tar</> files emitted by <application>pg_basebackup</> to
695       be POSIX conformant (Brian Weaver, Tom Lane)
696      </para>
697     </listitem>
698
699     <listitem>
700      <para>
701       Fix <application>pg_resetxlog</> to locate <filename>postmaster.pid</>
702       correctly when given a relative path to the data directory (Tom Lane)
703      </para>
704
705      <para>
706       This mistake could lead to <application>pg_resetxlog</> not noticing
707       that there is an active postmaster using the data directory.
708      </para>
709     </listitem>
710
711     <listitem>
712      <para>
713       Fix <application>libpq</>'s <function>lo_import()</> and
714       <function>lo_export()</> functions to report file I/O errors properly
715       (Tom Lane)
716      </para>
717     </listitem>
718
719     <listitem>
720      <para>
721       Fix <application>ecpg</>'s processing of nested structure pointer
722       variables (Muhammad Usama)
723      </para>
724     </listitem>
725
726     <listitem>
727      <para>
728       Fix <application>ecpg</>'s <function>ecpg_get_data</> function to
729       handle arrays properly (Michael Meskes)
730      </para>
731     </listitem>
732
733     <listitem>
734      <para>
735       Make <filename>contrib/pageinspect</>'s btree page inspection
736       functions take buffer locks while examining pages (Tom Lane)
737      </para>
738     </listitem>
739
740     <listitem>
741      <para>
742       Ensure that <literal>make install</> for an extension creates the
743       <filename>extension</> installation directory (C&eacute;dric Villemain)
744      </para>
745
746      <para>
747       Previously, this step was missed if <varname>MODULEDIR</> was set in
748       the extension's Makefile.
749      </para>
750     </listitem>
751
752     <listitem>
753      <para>
754       Fix <application>pgxs</> support for building loadable modules on AIX
755       (Tom Lane)
756      </para>
757
758      <para>
759       Building modules outside the original source tree didn't work on AIX.
760      </para>
761     </listitem>
762
763     <listitem>
764      <para>
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.
768      </para>
769     </listitem>
770
771    </itemizedlist>
772
773   </sect2>
774  </sect1>
775
776  <sect1 id="release-9-1-6">
777   <title>Release 9.1.6</title>
778
779   <note>
780   <title>Release Date</title>
781   <simpara>2012-09-24</simpara>
782   </note>
783
784   <para>
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">.
788   </para>
789
790   <sect2>
791    <title>Migration to Version 9.1.6</title>
792
793    <para>
794     A dump/restore is not required for those running 9.1.X.
795    </para>
796
797    <para>
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.
801    </para>
802
803    <para>
804     Also, if you are upgrading from a version earlier than 9.1.4,
805     see the release notes for 9.1.4.
806    </para>
807
808   </sect2>
809
810   <sect2>
811    <title>Changes</title>
812
813    <itemizedlist>
814
815     <listitem>
816      <para>
817       Fix persistence marking of shared buffers during WAL replay
818       (Jeff Davis)
819      </para>
820
821      <para>
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.
833      </para>
834
835      <para>
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.
840      </para>
841
842      <para>
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
845       while having <link
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.
852      </para>
853     </listitem>
854
855     <listitem>
856      <para>
857       Fix planner's assignment of executor parameters, and fix executor's
858       rescan logic for CTE plan nodes (Tom Lane)
859      </para>
860
861      <para>
862       These errors could result in wrong answers from queries that scan the
863       same <literal>WITH</> subquery multiple times.
864      </para>
865     </listitem>
866
867     <listitem>
868      <para>
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
872       Linnakangas)
873      </para>
874
875      <para>
876       Symptoms include crashes at process start on Windows, and crashes in
877       hot standby operation.
878      </para>
879     </listitem>
880
881     <listitem>
882      <para>
883       Improve selectivity estimation for text search queries involving
884       prefixes, i.e. <replaceable>word</><literal>:*</> patterns  (Tom Lane)
885      </para>
886
887      <para>
888      </para>
889     </listitem>
890
891     <listitem>
892      <para>
893       Improve page-splitting decisions in GiST indexes (Alexander Korotkov,
894       Robert Haas, Tom Lane)
895      </para>
896
897      <para>
898       Multi-column GiST indexes might suffer unexpected bloat due to this
899       error.
900      </para>
901     </listitem>
902
903     <listitem>
904      <para>
905       Fix cascading privilege revoke to stop if privileges are still held
906       (Tom Lane)
907      </para>
908
909      <para>
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
914       to.
915      </para>
916     </listitem>
917
918     <listitem>
919      <para>
920       Disallow extensions from containing the schema they are assigned to
921       (Thom Brown)
922      </para>
923
924      <para>
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.
928      </para>
929     </listitem>
930
931     <listitem>
932      <para>
933       Improve error messages for Hot Standby misconfiguration errors
934       (Gurjeet Singh)
935      </para>
936     </listitem>
937
938     <listitem>
939      <para>
940       Make <application>configure</> probe for <function>mbstowcs_l</> (Tom
941       Lane)
942      </para>
943
944      <para>
945       This fixes build failures on some versions of AIX.
946      </para>
947     </listitem>
948
949     <listitem>
950      <para>
951       Fix handling of <literal>SIGFPE</> when PL/Perl is in use (Andres Freund)
952      </para>
953
954      <para>
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.
958      </para>
959     </listitem>
960
961     <listitem>
962      <para>
963       Prevent PL/Perl from crashing if a recursive PL/Perl function is
964       redefined while being executed (Tom Lane)
965      </para>
966     </listitem>
967
968     <listitem>
969      <para>
970       Work around possible misoptimization in PL/Perl (Tom Lane)
971      </para>
972
973      <para>
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.
978      </para>
979     </listitem>
980
981     <listitem>
982      <para>
983       Fix bugs in <filename>contrib/pg_trgm</>'s <literal>LIKE</> pattern
984       analysis code (Fujii Masao)
985      </para>
986
987      <para>
988       <literal>LIKE</> queries using a trigram index could produce wrong
989       results if the pattern contained <literal>LIKE</> escape characters.
990      </para>
991     </listitem>
992
993     <listitem>
994      <para>
995       Fix <application>pg_upgrade</>'s handling of line endings on Windows
996       (Andrew Dunstan)
997      </para>
998
999      <para>
1000       Previously, <application>pg_upgrade</> might add or remove carriage
1001       returns in places such as function bodies.
1002      </para>
1003     </listitem>
1004
1005     <listitem>
1006      <para>
1007       On Windows, make <application>pg_upgrade</> use backslash path
1008       separators in the scripts it emits (Andrew Dunstan)
1009      </para>
1010     </listitem>
1011
1012     <listitem>
1013      <para>
1014       Remove unnecessary dependency on <application>pg_config</> from
1015       <application>pg_upgrade</> (Peter Eisentraut)
1016      </para>
1017     </listitem>
1018
1019     <listitem>
1020      <para>
1021       Update time zone data files to <application>tzdata</> release 2012f
1022       for DST law changes in Fiji
1023      </para>
1024     </listitem>
1025
1026    </itemizedlist>
1027
1028   </sect2>
1029  </sect1>
1030
1031  <sect1 id="release-9-1-5">
1032   <title>Release 9.1.5</title>
1033
1034   <note>
1035   <title>Release Date</title>
1036   <simpara>2012-08-17</simpara>
1037   </note>
1038
1039   <para>
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">.
1043   </para>
1044
1045   <sect2>
1046    <title>Migration to Version 9.1.5</title>
1047
1048    <para>
1049     A dump/restore is not required for those running 9.1.X.
1050    </para>
1051
1052    <para>
1053     However, if you are upgrading from a version earlier than 9.1.4,
1054     see the release notes for 9.1.4.
1055    </para>
1056
1057   </sect2>
1058
1059   <sect2>
1060    <title>Changes</title>
1061
1062    <itemizedlist>
1063
1064     <listitem>
1065      <para>
1066       Prevent access to external files/URLs via XML entity references
1067       (Noah Misch, Tom Lane)
1068      </para>
1069
1070      <para>
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)
1079      </para>
1080     </listitem>
1081
1082     <listitem>
1083      <para>
1084       Prevent access to external files/URLs via <filename>contrib/xml2</>'s
1085       <function>xslt_process()</> (Peter Eisentraut)
1086      </para>
1087
1088      <para>
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)
1094      </para>
1095
1096      <para>
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
1102       remove it.
1103      </para>
1104     </listitem>
1105
1106     <listitem>
1107      <para>
1108       Prevent too-early recycling of btree index pages (Noah Misch)
1109      </para>
1110
1111      <para>
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.
1118      </para>
1119     </listitem>
1120
1121     <listitem>
1122      <para>
1123       Fix crash-safety bug with newly-created-or-reset sequences (Tom Lane)
1124      </para>
1125
1126      <para>
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.
1136      </para>
1137     </listitem>
1138
1139     <listitem>
1140      <para>
1141       Fix race condition in <literal>enum</>-type value comparisons (Robert
1142       Haas, Tom Lane)
1143      </para>
1144
1145      <para>
1146       Comparisons could fail when encountering an enum value added since
1147       the current query started.
1148      </para>
1149     </listitem>
1150
1151     <listitem>
1152      <para>
1153       Fix <function>txid_current()</> to report the correct epoch when not
1154       in hot standby (Heikki Linnakangas)
1155      </para>
1156
1157      <para>
1158       This fixes a regression introduced in the previous minor release.
1159      </para>
1160     </listitem>
1161
1162     <listitem>
1163      <para>
1164       Prevent selection of unsuitable replication connections as
1165       the synchronous standby (Fujii Masao)
1166      </para>
1167
1168      <para>
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.
1172      </para>
1173     </listitem>
1174
1175     <listitem>
1176      <para>
1177       Fix bug in startup of Hot Standby when a master transaction has many
1178       subtransactions (Andres Freund)
1179      </para>
1180
1181      <para>
1182       This mistake led to failures reported as <quote>out-of-order XID
1183       insertion in KnownAssignedXids</>.
1184      </para>
1185     </listitem>
1186
1187     <listitem>
1188      <para>
1189       Ensure the <filename>backup_label</> file is fsync'd after
1190       <function>pg_start_backup()</> (Dave Kerr)
1191      </para>
1192     </listitem>
1193
1194     <listitem>
1195      <para>
1196       Fix timeout handling in walsender processes (Tom Lane)
1197      </para>
1198
1199      <para>
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.
1203      </para>
1204     </listitem>
1205
1206     <listitem>
1207      <para>
1208       Wake walsenders after each background flush by walwriter (Andres
1209       Freund, Simon Riggs)
1210      </para>
1211
1212      <para>
1213       This greatly reduces replication delay when the workload contains
1214       only asynchronously-committed transactions.
1215      </para>
1216     </listitem>
1217
1218     <listitem>
1219      <para>
1220       Fix <literal>LISTEN</>/<literal>NOTIFY</> to cope better with I/O
1221       problems, such as out of disk space (Tom Lane)
1222      </para>
1223
1224      <para>
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>.
1229      </para>
1230     </listitem>
1231
1232     <listitem>
1233      <para>
1234       Only allow autovacuum to be auto-canceled by a directly blocked
1235       process (Tom Lane)
1236      </para>
1237
1238      <para>
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.
1242      </para>
1243     </listitem>
1244
1245     <listitem>
1246      <para>
1247       Improve logging of autovacuum cancels (Robert Haas)
1248      </para>
1249     </listitem>
1250
1251     <listitem>
1252      <para>
1253       Fix log collector so that <literal>log_truncate_on_rotation</> works
1254       during the very first log rotation after server start (Tom Lane)
1255      </para>
1256     </listitem>
1257
1258     <listitem>
1259      <para>
1260       Fix <literal>WITH</> attached to a nested set operation
1261       (<literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>)
1262       (Tom Lane)
1263      </para>
1264     </listitem>
1265
1266     <listitem>
1267      <para>
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)
1270      </para>
1271     </listitem>
1272
1273     <listitem>
1274      <para>
1275       Fix dependencies generated during <literal>ALTER TABLE ... ADD
1276       CONSTRAINT USING INDEX</> (Tom Lane)
1277      </para>
1278
1279      <para>
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
1283       columns.
1284      </para>
1285     </listitem>
1286
1287     <listitem>
1288      <para>
1289       Fix <command>REASSIGN OWNED</> to work on extensions (Alvaro Herrera)
1290      </para>
1291     </listitem>
1292
1293     <listitem>
1294      <para>
1295       Disallow copying whole-row references in <literal>CHECK</>
1296       constraints and index definitions during <command>CREATE TABLE</>
1297       (Tom Lane)
1298      </para>
1299
1300      <para>
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.
1309      </para>
1310     </listitem>
1311
1312     <listitem>
1313      <para>
1314       Fix memory leak in <literal>ARRAY(SELECT ...)</> subqueries (Heikki
1315       Linnakangas, Tom Lane)
1316      </para>
1317     </listitem>
1318
1319     <listitem>
1320      <para>
1321       Fix planner to pass correct collation to operator selectivity
1322       estimators (Tom Lane)
1323      </para>
1324
1325      <para>
1326       This was not previously required by any core selectivity estimation
1327       function, but third-party code might need it.
1328      </para>
1329     </listitem>
1330
1331     <listitem>
1332      <para>
1333       Fix extraction of common prefixes from regular expressions (Tom Lane)
1334      </para>
1335
1336      <para>
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.
1340      </para>
1341     </listitem>
1342
1343     <listitem>
1344      <para>
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)
1349      </para>
1350     </listitem>
1351
1352     <listitem>
1353      <para>
1354       Fix <application>pg_dump</> to better handle views containing partial
1355       <literal>GROUP BY</> lists (Tom Lane)
1356      </para>
1357
1358      <para>
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.
1366      </para>
1367     </listitem>
1368
1369     <listitem>
1370      <para>
1371       In PL/Perl, avoid setting UTF8 flag when in SQL_ASCII encoding
1372       (Alex Hunsaker, Kyotaro Horiguchi, Alvaro Herrera)
1373      </para>
1374     </listitem>
1375
1376     <listitem>
1377      <para>
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)
1381      </para>
1382
1383      <para>
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.
1389      </para>
1390     </listitem>
1391
1392     <listitem>
1393      <para>
1394       Fix mapping of PostgreSQL encodings to Python encodings in PL/Python
1395       (Jan Urbanski)
1396      </para>
1397     </listitem>
1398
1399     <listitem>
1400      <para>
1401       Report errors properly in <filename>contrib/xml2</>'s
1402       <function>xslt_process()</> (Tom Lane)
1403      </para>
1404     </listitem>
1405
1406     <listitem>
1407      <para>
1408       Update time zone data files to <application>tzdata</> release 2012e
1409       for DST law changes in Morocco and Tokelau
1410      </para>
1411     </listitem>
1412
1413    </itemizedlist>
1414
1415   </sect2>
1416  </sect1>
1417
1418  <sect1 id="release-9-1-4">
1419   <title>Release 9.1.4</title>
1420
1421   <note>
1422   <title>Release Date</title>
1423   <simpara>2012-06-04</simpara>
1424   </note>
1425
1426   <para>
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">.
1430   </para>
1431
1432   <sect2>
1433    <title>Migration to Version 9.1.4</title>
1434
1435    <para>
1436     A dump/restore is not required for those running 9.1.X.
1437    </para>
1438
1439    <para>
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.
1449    </para>
1450
1451    <para>
1452     Also, if you are upgrading from a version earlier than 9.1.2,
1453     see the release notes for 9.1.2.
1454    </para>
1455
1456   </sect2>
1457
1458   <sect2>
1459    <title>Changes</title>
1460
1461    <itemizedlist>
1462
1463     <listitem>
1464      <para>
1465       Fix incorrect password transformation in
1466       <filename>contrib/pgcrypto</>'s DES <function>crypt()</> function
1467       (Solar Designer)
1468      </para>
1469
1470      <para>
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)
1477      </para>
1478     </listitem>
1479
1480     <listitem>
1481      <para>
1482       Ignore <literal>SECURITY DEFINER</> and <literal>SET</> attributes for
1483       a procedural language's call handler (Tom Lane)
1484      </para>
1485
1486      <para>
1487       Applying such attributes to a call handler could crash the server.
1488       (CVE-2012-2655)
1489      </para>
1490     </listitem>
1491
1492     <listitem>
1493      <para>
1494       Make <filename>contrib/citext</>'s upgrade script fix collations of
1495       <type>citext</> arrays and domains over <type>citext</>
1496       (Tom Lane)
1497      </para>
1498
1499      <para>
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.
1508      </para>
1509     </listitem>
1510
1511     <listitem>
1512      <para>
1513       Allow numeric timezone offsets in <type>timestamp</> input to be up to
1514       16 hours away from UTC (Tom Lane)
1515      </para>
1516
1517      <para>
1518       Some historical time zones have offsets larger than 15 hours, the
1519       previous limit.  This could result in dumped data values being rejected
1520       during reload.
1521      </para>
1522     </listitem>
1523
1524     <listitem>
1525      <para>
1526       Fix timestamp conversion to cope when the given time is exactly the
1527       last DST transition time for the current timezone (Tom Lane)
1528      </para>
1529
1530      <para>
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.
1534      </para>
1535     </listitem>
1536
1537     <listitem>
1538      <para>
1539       Fix <type>text</> to <type>name</> and <type>char</> to <type>name</>
1540       casts to perform string truncation correctly in multibyte encodings
1541       (Karl Schnaitter)
1542      </para>
1543     </listitem>
1544
1545     <listitem>
1546      <para>
1547       Fix memory copying bug in <function>to_tsquery()</> (Heikki Linnakangas)
1548      </para>
1549     </listitem>
1550
1551     <listitem>
1552      <para>
1553       Ensure <function>txid_current()</> reports the correct epoch when
1554       executed in hot standby (Simon Riggs)
1555      </para>
1556     </listitem>
1557
1558     <listitem>
1559      <para>
1560       Fix planner's handling of outer PlaceHolderVars within subqueries (Tom
1561       Lane)
1562      </para>
1563
1564      <para>
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.
1571      </para>
1572     </listitem>
1573
1574     <listitem>
1575      <para>
1576       Fix planning of <literal>UNION ALL</> subqueries with output columns
1577       that are not simple variables (Tom Lane)
1578      </para>
1579
1580      <para>
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.
1584      </para>
1585     </listitem>
1586
1587     <listitem>
1588      <para>
1589       Fix slow session startup when <structname>pg_attribute</> is very large
1590       (Tom Lane)
1591      </para>
1592
1593      <para>
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.
1599      </para>
1600     </listitem>
1601
1602     <listitem>
1603      <para>
1604       Ensure sequential scans check for query cancel reasonably often (Merlin
1605       Moncure)
1606      </para>
1607
1608      <para>
1609       A scan encountering many consecutive pages that contain no live tuples
1610       would not respond to interrupts meanwhile.
1611      </para>
1612     </listitem>
1613
1614     <listitem>
1615      <para>
1616       Ensure the Windows implementation of <function>PGSemaphoreLock()</>
1617       clears <varname>ImmediateInterruptOK</> before returning (Tom Lane)
1618      </para>
1619
1620      <para>
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.
1624      </para>
1625     </listitem>
1626
1627     <listitem>
1628      <para>
1629       Show whole-row variables safely when printing views or rules
1630       (Abbas Butt, Tom Lane)
1631      </para>
1632
1633      <para>
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.
1639      </para>
1640     </listitem>
1641
1642     <listitem>
1643      <para>
1644       Fix <command>COPY FROM</> to properly handle null marker strings that
1645       correspond to invalid encoding (Tom Lane)
1646      </para>
1647
1648      <para>
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.
1651      </para>
1652     </listitem>
1653
1654     <listitem>
1655      <para>
1656       Fix <command>EXPLAIN VERBOSE</> for writable CTEs containing
1657       <literal>RETURNING</> clauses (Tom Lane)
1658      </para>
1659     </listitem>
1660
1661     <listitem>
1662      <para>
1663       Fix <command>PREPARE TRANSACTION</> to work correctly in the presence
1664       of advisory locks (Tom Lane)
1665      </para>
1666
1667      <para>
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.
1671      </para>
1672     </listitem>
1673
1674     <listitem>
1675      <para>
1676       Fix truncation of unlogged tables (Robert Haas)
1677      </para>
1678     </listitem>
1679
1680     <listitem>
1681      <para>
1682       Ignore missing schemas during non-interactive assignments of
1683       <varname>search_path</> (Tom Lane)
1684      </para>
1685
1686      <para>
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</>.
1691      </para>
1692     </listitem>
1693
1694     <listitem>
1695      <para>
1696       Fix bugs with temporary or transient tables used in extension scripts
1697       (Tom Lane)
1698      </para>
1699
1700      <para>
1701       This includes cases such as a rewriting <command>ALTER TABLE</> within
1702       an extension update script, since that uses a transient table behind
1703       the scenes.
1704      </para>
1705     </listitem>
1706
1707     <listitem>
1708      <para>
1709       Ensure autovacuum worker processes perform stack depth checking
1710       properly (Heikki Linnakangas)
1711      </para>
1712
1713      <para>
1714       Previously, infinite recursion in a function invoked by
1715       auto-<command>ANALYZE</> could crash worker processes.
1716      </para>
1717     </listitem>
1718
1719     <listitem>
1720      <para>
1721       Fix logging collector to not lose log coherency under high load (Andrew
1722       Dunstan)
1723      </para>
1724
1725      <para>
1726       The collector previously could fail to reassemble large messages if it
1727       got too busy.
1728      </para>
1729     </listitem>
1730
1731     <listitem>
1732      <para>
1733       Fix logging collector to ensure it will restart file rotation
1734       after receiving <systemitem>SIGHUP</> (Tom Lane)
1735      </para>
1736     </listitem>
1737
1738     <listitem>
1739      <para>
1740       Fix <quote>too many LWLocks taken</> failure in GiST indexes (Heikki
1741       Linnakangas)
1742      </para>
1743     </listitem>
1744
1745     <listitem>
1746      <para>
1747       Fix WAL replay logic for GIN indexes to not fail if the index was
1748       subsequently dropped (Tom Lane)
1749      </para>
1750     </listitem>
1751
1752     <listitem>
1753      <para>
1754       Correctly detect SSI conflicts of prepared transactions after a crash
1755       (Dan Ports)
1756      </para>
1757     </listitem>
1758
1759     <listitem>
1760      <para>
1761       Avoid synchronous replication delay when committing a transaction that
1762       only modified temporary tables (Heikki Linnakangas)
1763      </para>
1764
1765      <para>
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.
1769      </para>
1770     </listitem>
1771
1772     <listitem>
1773      <para>
1774       Fix error handling in <application>pg_basebackup</>
1775       (Thomas Ogrisegg, Fujii Masao)
1776      </para>
1777     </listitem>
1778
1779     <listitem>
1780      <para>
1781       Fix <application>walsender</> to not go into a busy loop if connection
1782       is terminated (Fujii Masao)
1783      </para>
1784     </listitem>
1785
1786     <listitem>
1787      <para>
1788       Fix memory leak in PL/pgSQL's <command>RETURN NEXT</> command (Joe
1789       Conway)
1790      </para>
1791     </listitem>
1792
1793     <listitem>
1794      <para>
1795       Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target
1796       is the function's first variable (Tom Lane)
1797      </para>
1798     </listitem>
1799
1800     <listitem>
1801      <para>
1802       Ensure that PL/Perl package-qualifies the <varname>_TD</> variable
1803       (Alex Hunsaker)
1804      </para>
1805
1806      <para>
1807       This bug caused trigger invocations to fail when they are nested
1808       within a function invocation that changes the current package.
1809      </para>
1810     </listitem>
1811
1812     <listitem>
1813      <para>
1814       Fix PL/Python functions returning composite types to accept a string
1815       for their result value (Jan Urbanski)
1816      </para>
1817
1818      <para>
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
1821       dictionaries.
1822      </para>
1823     </listitem>
1824
1825     <listitem>
1826      <para>
1827       Fix potential access off the end of memory in <application>psql</>'s
1828       expanded display (<command>\x</>) mode (Peter Eisentraut)
1829      </para>
1830     </listitem>
1831
1832     <listitem>
1833      <para>
1834       Fix several performance problems in <application>pg_dump</> when
1835       the database contains many objects (Jeff Janes, Tom Lane)
1836      </para>
1837
1838      <para>
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.
1842      </para>
1843     </listitem>
1844
1845     <listitem>
1846      <para>
1847       Fix memory and file descriptor leaks in <application>pg_restore</>
1848       when reading a directory-format archive (Peter Eisentraut)
1849      </para>
1850     </listitem>
1851
1852     <listitem>
1853      <para>
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)
1857      </para>
1858     </listitem>
1859
1860     <listitem>
1861      <para>
1862       In <application>ecpg</>, fix rare memory leaks and possible overwrite
1863       of one byte after the <structname>sqlca_t</> structure (Peter Eisentraut)
1864      </para>
1865     </listitem>
1866
1867     <listitem>
1868      <para>
1869       Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak
1870       temporary database connections upon error (Tom Lane)
1871      </para>
1872     </listitem>
1873
1874     <listitem>
1875      <para>
1876       Fix <filename>contrib/dblink</> to report the correct connection name in
1877       error messages (Kyotaro Horiguchi)
1878      </para>
1879     </listitem>
1880
1881     <listitem>
1882      <para>
1883       Fix <filename>contrib/vacuumlo</> to use multiple transactions when
1884       dropping many large objects (Tim Lewis, Robert Haas, Tom Lane)
1885      </para>
1886
1887      <para>
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.
1891      </para>
1892     </listitem>
1893
1894     <listitem>
1895      <para>
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.
1900      </para>
1901     </listitem>
1902
1903    </itemizedlist>
1904
1905   </sect2>
1906  </sect1>
1907
1908  <sect1 id="release-9-1-3">
1909   <title>Release 9.1.3</title>
1910
1911   <note>
1912   <title>Release Date</title>
1913   <simpara>2012-02-27</simpara>
1914   </note>
1915
1916   <para>
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">.
1920   </para>
1921
1922   <sect2>
1923    <title>Migration to Version 9.1.3</title>
1924
1925    <para>
1926     A dump/restore is not required for those running 9.1.X.
1927    </para>
1928
1929    <para>
1930     However, if you are upgrading from a version earlier than 9.1.2,
1931     see the release notes for 9.1.2.
1932    </para>
1933
1934   </sect2>
1935
1936   <sect2>
1937    <title>Changes</title>
1938
1939    <itemizedlist>
1940
1941     <listitem>
1942      <para>
1943       Require execute permission on the trigger function for
1944       <command>CREATE TRIGGER</> (Robert Haas)
1945      </para>
1946
1947      <para>
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)
1953      </para>
1954     </listitem>
1955
1956     <listitem>
1957      <para>
1958       Remove arbitrary limitation on length of common name in SSL
1959       certificates (Heikki Linnakangas)
1960      </para>
1961
1962      <para>
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.
1972       (CVE-2012-0867)
1973      </para>
1974     </listitem>
1975
1976     <listitem>
1977      <para>
1978       Convert newlines to spaces in names written in <application>pg_dump</>
1979       comments (Robert Haas)
1980      </para>
1981
1982      <para>
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)
1988      </para>
1989     </listitem>
1990
1991     <listitem>
1992      <para>
1993       Fix btree index corruption from insertions concurrent with vacuuming
1994       (Tom Lane)
1995      </para>
1996
1997      <para>
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
2007       will fix things.
2008      </para>
2009     </listitem>
2010
2011     <listitem>
2012      <para>
2013       Fix transient zeroing of shared buffers during WAL replay (Tom Lane)
2014      </para>
2015
2016      <para>
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</>.
2022      </para>
2023     </listitem>
2024
2025     <listitem>
2026      <para>
2027       Fix handling of data-modifying <literal>WITH</> subplans in
2028       <literal>READ COMMITTED</> rechecking (Tom Lane)
2029      </para>
2030
2031      <para>
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.
2037      </para>
2038     </listitem>
2039
2040     <listitem>
2041      <para>
2042       Fix corner case in SSI transaction cleanup
2043       (Dan Ports)
2044      </para>
2045
2046      <para>
2047       When finishing up a read-write serializable transaction,
2048       a crash could occur if all remaining active serializable transactions
2049       are read-only.
2050      </para>
2051     </listitem>
2052
2053     <listitem>
2054      <para>
2055       Fix postmaster to attempt restart after a hot-standby crash (Tom Lane)
2056      </para>
2057
2058      <para>
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.
2062      </para>
2063     </listitem>
2064
2065     <listitem>
2066      <para>
2067       Fix <command>CLUSTER</>/<command>VACUUM FULL</> handling of toast
2068       values owned by recently-updated rows (Tom Lane)
2069      </para>
2070
2071      <para>
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.
2075      </para>
2076     </listitem>
2077
2078     <listitem>
2079      <para>
2080       Update per-column permissions, not only per-table permissions, when
2081       changing table owner (Tom Lane)
2082      </para>
2083
2084      <para>
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.
2089      </para>
2090     </listitem>
2091
2092     <listitem>
2093      <para>
2094       Support foreign data wrappers and foreign servers in
2095       <command>REASSIGN OWNED</> (Alvaro Herrera)
2096      </para>
2097
2098      <para>
2099       This command failed with <quote>unexpected classid</> errors if
2100       it needed to change the ownership of any such objects.
2101      </para>
2102     </listitem>
2103
2104     <listitem>
2105      <para>
2106       Allow non-existent values for some settings in <command>ALTER
2107       USER/DATABASE SET</> (Heikki Linnakangas)
2108      </para>
2109
2110      <para>
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.
2118      </para>
2119     </listitem>
2120
2121     <listitem>
2122      <para>
2123       Fix <quote>unsupported node type</> error caused by <literal>COLLATE</>
2124       in an <command>INSERT</> expression (Tom Lane)
2125      </para>
2126     </listitem>
2127
2128     <listitem>
2129      <para>
2130       Avoid crashing when we have problems deleting table files post-commit
2131       (Tom Lane)
2132      </para>
2133
2134      <para>
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.
2141      </para>
2142     </listitem>
2143
2144     <listitem>
2145      <para>
2146       Recover from errors occurring during WAL replay of <command>DROP
2147       TABLESPACE</> (Tom Lane)
2148      </para>
2149
2150      <para>
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
2157       wasted disk space.
2158      </para>
2159     </listitem>
2160
2161     <listitem>
2162      <para>
2163       Fix race condition in logging AccessExclusiveLocks for hot standby
2164       (Simon Riggs)
2165      </para>
2166
2167      <para>
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.
2171      </para>
2172     </listitem>
2173
2174     <listitem>
2175      <para>
2176       Track the OID counter correctly during WAL replay, even when it wraps
2177       around (Tom Lane)
2178      </para>
2179
2180      <para>
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.
2186      </para>
2187     </listitem>
2188
2189     <listitem>
2190      <para>
2191       Prevent emitting misleading <quote>consistent recovery state reached</>
2192       log message at the beginning of crash recovery (Heikki Linnakangas)
2193      </para>
2194     </listitem>
2195
2196     <listitem>
2197      <para>
2198       Fix initial value of
2199       <structname>pg_stat_replication</>.<structfield>replay_location</>
2200       (Fujii Masao)
2201      </para>
2202
2203      <para>
2204       Previously, the value shown would be wrong until at least one WAL
2205       record had been replayed.
2206      </para>
2207     </listitem>
2208
2209     <listitem>
2210      <para>
2211       Fix regular expression back-references with <literal>*</> attached
2212       (Tom Lane)
2213      </para>
2214
2215      <para>
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.
2219      </para>
2220
2221      <para>
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.
2226      </para>
2227     </listitem>
2228
2229     <listitem>
2230      <para>
2231       Fix recently-introduced memory leak in processing of
2232       <type>inet</>/<type>cidr</> values (Heikki Linnakangas)
2233      </para>
2234
2235      <para>
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.
2239      </para>
2240     </listitem>
2241
2242     <listitem>
2243      <para>
2244       Fix planner's ability to push down index-expression restrictions
2245       through <literal>UNION ALL</> (Tom Lane)
2246      </para>
2247
2248      <para>
2249       This type of optimization was inadvertently disabled by a fix for
2250       another problem in 9.1.2.
2251      </para>
2252     </listitem>
2253
2254     <listitem>
2255      <para>
2256       Fix planning of <literal>WITH</> clauses referenced in
2257       <command>UPDATE</>/<command>DELETE</> on an inherited table
2258       (Tom Lane)
2259      </para>
2260
2261      <para>
2262       This bug led to <quote>could not find plan for CTE</> failures.
2263      </para>
2264     </listitem>
2265
2266     <listitem>
2267      <para>
2268       Fix GIN cost estimation to handle <literal>column IN (...)</>
2269       index conditions (Marti Raudsepp)
2270      </para>
2271
2272      <para>
2273       This oversight would usually lead to crashes if such a condition could
2274       be used with a GIN index.
2275      </para>
2276     </listitem>
2277
2278     <listitem>
2279      <para>
2280       Prevent assertion failure when exiting a session with an open, failed
2281       transaction (Tom Lane)
2282      </para>
2283
2284      <para>
2285       This bug has no impact on normal builds with asserts not enabled.
2286      </para>
2287     </listitem>
2288
2289     <listitem>
2290      <para>
2291       Fix dangling pointer after <command>CREATE TABLE AS</>/<command>SELECT
2292       INTO</> in a SQL-language function (Tom Lane)
2293      </para>
2294
2295      <para>
2296       In most cases this only led to an assertion failure in assert-enabled
2297       builds, but worse consequences seem possible.
2298      </para>
2299     </listitem>
2300
2301     <listitem>
2302      <para>
2303       Avoid double close of file handle in syslogger on Windows (MauMau)
2304      </para>
2305
2306      <para>
2307       Ordinarily this error was invisible, but it would cause an exception
2308       when running on a debug version of Windows.
2309      </para>
2310     </listitem>
2311
2312     <listitem>
2313      <para>
2314       Fix I/O-conversion-related memory leaks in plpgsql
2315       (Andres Freund, Jan Urbanski, Tom Lane)
2316      </para>
2317
2318      <para>
2319       Certain operations would leak memory until the end of the current
2320       function.
2321      </para>
2322     </listitem>
2323
2324     <listitem>
2325      <para>
2326       Work around bug in perl's SvPVutf8() function (Andrew Dunstan)
2327      </para>
2328
2329      <para>
2330       This function crashes when handed a typeglob or certain read-only
2331       objects such as <literal>$^V</>.  Make plperl avoid passing those to
2332       it.
2333      </para>
2334     </listitem>
2335
2336     <listitem>
2337      <para>
2338       In <application>pg_dump</>, don't dump contents of an extension's
2339       configuration tables if the extension itself is not being dumped
2340       (Tom Lane)
2341      </para>
2342     </listitem>
2343
2344     <listitem>
2345      <para>
2346       Improve <application>pg_dump</>'s handling of inherited table columns
2347       (Tom Lane)
2348      </para>
2349
2350      <para>
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.
2359      </para>
2360     </listitem>
2361
2362     <listitem>
2363      <para>
2364       Fix <application>pg_restore</>'s direct-to-database mode for
2365       INSERT-style table data (Tom Lane)
2366      </para>
2367
2368      <para>
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
2374       output is okay.
2375      </para>
2376     </listitem>
2377
2378     <listitem>
2379      <para>
2380       Teach <application>pg_upgrade</> to handle renaming of
2381       <application>plpython</>'s shared library (Bruce Momjian)
2382      </para>
2383
2384      <para>
2385       Upgrading a pre-9.1 database that included plpython would fail because
2386       of this oversight.
2387      </para>
2388     </listitem>
2389
2390     <listitem>
2391      <para>
2392       Allow <application>pg_upgrade</> to process tables containing
2393       <type>regclass</> columns (Bruce Momjian)
2394      </para>
2395
2396      <para>
2397       Since <application>pg_upgrade</> now takes care to preserve
2398       <structname>pg_class</> OIDs, there was no longer any reason for this
2399       restriction.
2400      </para>
2401     </listitem>
2402
2403     <listitem>
2404      <para>
2405       Make <application>libpq</> ignore <literal>ENOTDIR</> errors
2406       when looking for an SSL client certificate file
2407       (Magnus Hagander)
2408      </para>
2409
2410      <para>
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</>.
2414      </para>
2415     </listitem>
2416
2417     <listitem>
2418      <para>
2419       Fix some more field alignment issues in <application>ecpg</>'s SQLDA area
2420       (Zoltan Boszormenyi)
2421      </para>
2422     </listitem>
2423
2424     <listitem>
2425      <para>
2426       Allow <literal>AT</> option in <application>ecpg</>
2427       <literal>DEALLOCATE</> statements (Michael Meskes)
2428      </para>
2429
2430      <para>
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.
2433      </para>
2434     </listitem>
2435
2436     <listitem>
2437      <para>
2438       Do not use the variable name when defining a varchar structure in ecpg
2439       (Michael Meskes)
2440      </para>
2441     </listitem>
2442
2443     <listitem>
2444      <para>
2445       Fix <filename>contrib/auto_explain</>'s JSON output mode to produce
2446       valid JSON (Andrew Dunstan)
2447      </para>
2448
2449      <para>
2450       The output used brackets at the top level, when it should have used
2451       braces.
2452      </para>
2453     </listitem>
2454
2455     <listitem>
2456      <para>
2457       Fix error in <filename>contrib/intarray</>'s <literal>int[] &amp;
2458       int[]</> operator (Guillaume Lelarge)
2459      </para>
2460
2461      <para>
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.
2465      </para>
2466     </listitem>
2467
2468     <listitem>
2469      <para>
2470       Fix error detection in <filename>contrib/pgcrypto</>'s
2471       <function>encrypt_iv()</> and <function>decrypt_iv()</>
2472       (Marko Kreen)
2473      </para>
2474
2475      <para>
2476       These functions failed to report certain types of invalid-input errors,
2477       and would instead return random garbage values for incorrect input.
2478      </para>
2479     </listitem>
2480
2481     <listitem>
2482      <para>
2483       Fix one-byte buffer overrun in <filename>contrib/test_parser</>
2484       (Paul Guyot)
2485      </para>
2486
2487      <para>
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.
2492      </para>
2493     </listitem>
2494
2495     <listitem>
2496      <para>
2497       Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if
2498       available (Martin Pitt)
2499      </para>
2500
2501      <para>
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.
2507      </para>
2508     </listitem>
2509
2510     <listitem>
2511      <para>
2512       Use <option>-fexcess-precision=standard</> option when building with
2513       gcc versions that accept it (Andrew Dunstan)
2514      </para>
2515
2516      <para>
2517       This prevents assorted scenarios wherein recent versions of gcc will
2518       produce creative results.
2519      </para>
2520     </listitem>
2521
2522     <listitem>
2523      <para>
2524       Allow use of threaded Python on FreeBSD (Chris Rees)
2525      </para>
2526
2527      <para>
2528       Our configure script previously believed that this combination wouldn't
2529       work; but FreeBSD fixed the problem, so remove that error check.
2530      </para>
2531     </listitem>
2532
2533     <listitem>
2534      <para>
2535       Allow MinGW builds to use standardly-named OpenSSL libraries
2536       (Tomasz Ostrowski)
2537      </para>
2538     </listitem>
2539
2540    </itemizedlist>
2541
2542   </sect2>
2543  </sect1>
2544
2545  <sect1 id="release-9-1-2">
2546   <title>Release 9.1.2</title>
2547
2548   <note>
2549   <title>Release Date</title>
2550   <simpara>2011-12-05</simpara>
2551   </note>
2552
2553   <para>
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">.
2557   </para>
2558
2559   <sect2>
2560    <title>Migration to Version 9.1.2</title>
2561
2562    <para>
2563     A dump/restore is not required for those running 9.1.X.
2564    </para>
2565
2566    <para>
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.
2571    </para>
2572
2573    <para>
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.
2583    </para>
2584
2585   </sect2>
2586
2587   <sect2>
2588    <title>Changes</title>
2589
2590    <itemizedlist>
2591
2592     <listitem>
2593      <para>
2594       Fix bugs in <literal>information_schema.referential_constraints</> view
2595       (Tom Lane)
2596      </para>
2597
2598      <para>
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.
2604      </para>
2605
2606      <para>
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
2614       to be fixed.
2615      </para>
2616     </listitem>
2617
2618     <listitem>
2619      <para>
2620       Make <filename>contrib/citext</>'s upgrade script fix collations of
2621       <type>citext</> columns and indexes (Tom Lane)
2622      </para>
2623
2624      <para>
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</>.
2634      </para>
2635
2636      <para>
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
2640       found at the end of
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.
2645      </para>
2646     </listitem>
2647
2648     <listitem>
2649      <para>
2650       Fix possible crash during <command>UPDATE</> or <command>DELETE</> that
2651       joins to the output of a scalar-returning function (Tom Lane)
2652      </para>
2653
2654      <para>
2655       A crash could only occur if the target row had been concurrently
2656       updated, so this problem surfaced only intermittently.
2657      </para>
2658     </listitem>
2659
2660     <listitem>
2661      <para>
2662       Fix incorrect replay of WAL records for GIN index updates
2663       (Tom Lane)
2664      </para>
2665
2666      <para>
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.
2670      </para>
2671     </listitem>
2672
2673     <listitem>
2674      <para>
2675       Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS
2676       SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</>
2677       (Tom Lane)
2678      </para>
2679
2680      <para>
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.
2687      </para>
2688     </listitem>
2689
2690     <listitem>
2691      <para>
2692       Fix possible failures during hot standby startup (Simon Riggs)
2693      </para>
2694     </listitem>
2695
2696     <listitem>
2697      <para>
2698       Start hot standby faster when initial snapshot is incomplete
2699       (Simon Riggs)
2700      </para>
2701     </listitem>
2702
2703     <listitem>
2704      <para>
2705       Fix race condition during toast table access from stale syscache entries
2706       (Tom Lane)
2707      </para>
2708
2709      <para>
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.
2713      </para>
2714     </listitem>
2715
2716     <listitem>
2717      <para>
2718       Track dependencies of functions on items used in parameter default
2719       expressions (Tom Lane)
2720      </para>
2721
2722      <para>
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.
2729      </para>
2730     </listitem>
2731
2732     <listitem>
2733      <para>
2734       Fix incorrect management of placeholder variables in nestloop joins
2735       (Tom Lane)
2736      </para>
2737
2738      <para>
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.
2742      </para>
2743     </listitem>
2744
2745     <listitem>
2746      <para>
2747       Fix window functions that sort by expressions involving aggregates
2748       (Tom Lane)
2749      </para>
2750
2751      <para>
2752       Previously these could fail with <quote>could not find pathkey item to
2753       sort</> planner errors.
2754      </para>
2755     </listitem>
2756
2757     <listitem>
2758      <para>
2759       Fix <quote>MergeAppend child's targetlist doesn't match MergeAppend</>
2760       planner errors (Tom Lane)
2761      </para>
2762     </listitem>
2763
2764     <listitem>
2765      <para>
2766       Fix index matching for operators with both collatable and noncollatable
2767       inputs (Tom Lane)
2768      </para>
2769
2770      <para>
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.
2775      </para>
2776     </listitem>
2777
2778     <listitem>
2779      <para>
2780       Allow inlining of set-returning SQL functions with multiple OUT
2781       parameters (Tom Lane)
2782      </para>
2783     </listitem>
2784
2785     <listitem>
2786      <para>
2787       Don't trust deferred-unique indexes for join removal (Tom Lane and Marti
2788       Raudsepp)
2789      </para>
2790
2791      <para>
2792       A deferred uniqueness constraint might not hold intra-transaction,
2793       so assuming that it does could give incorrect query results.
2794      </para>
2795     </listitem>
2796
2797     <listitem>
2798      <para>
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)
2802      </para>
2803
2804      <para>
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.
2808      </para>
2809     </listitem>
2810
2811     <listitem>
2812      <para>
2813       Improve locale support in <type>money</> type's input and output
2814       (Tom Lane)
2815      </para>
2816
2817      <para>
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
2822       not be re-read.
2823      </para>
2824     </listitem>
2825
2826     <listitem>
2827      <para>
2828       Don't let <link
2829       linkend="guc-transform-null-equals"><varname>transform_null_equals</></link>
2830       affect <literal>CASE foo WHEN NULL ...</> constructs
2831       (Heikki Linnakangas)
2832      </para>
2833
2834      <para>
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</>.
2838      </para>
2839     </listitem>
2840
2841     <listitem>
2842      <para>
2843       Change foreign-key trigger creation order to better support
2844       self-referential foreign keys (Tom Lane)
2845      </para>
2846
2847      <para>
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.
2862      </para>
2863     </listitem>
2864
2865     <listitem>
2866      <para>
2867       Fix <literal>IF EXISTS</> to work correctly in <command>DROP OPERATOR
2868       FAMILY</> (Robert Haas)
2869      </para>
2870     </listitem>
2871
2872     <listitem>
2873      <para>
2874       Disallow dropping of an extension from within its own script
2875       (Tom Lane)
2876      </para>
2877
2878      <para>
2879       This prevents odd behavior in case of incorrect management of extension
2880       dependencies.
2881      </para>
2882     </listitem>
2883
2884     <listitem>
2885      <para>
2886       Don't mark auto-generated types as extension members (Robert Haas)
2887      </para>
2888
2889      <para>
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.
2893      </para>
2894     </listitem>
2895
2896     <listitem>
2897      <para>
2898       Cope with invalid pre-existing <varname>search_path</> settings during
2899       <command>CREATE EXTENSION</> (Tom Lane)
2900      </para>
2901     </listitem>
2902
2903     <listitem>
2904      <para>
2905       Avoid floating-point underflow while tracking buffer allocation rate
2906       (Greg Matthews)
2907      </para>
2908
2909      <para>
2910       While harmless in itself, on certain platforms this would result in
2911       annoying kernel log messages.
2912      </para>
2913     </listitem>
2914
2915     <listitem>
2916      <para>
2917       Prevent autovacuum transactions from running in serializable mode
2918       (Tom Lane)
2919      </para>
2920
2921      <para>
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.
2926      </para>
2927     </listitem>
2928
2929     <listitem>
2930      <para>
2931       Ensure walsender processes respond promptly to <systemitem>SIGTERM</>
2932       (Magnus Hagander)
2933      </para>
2934     </listitem>
2935
2936     <listitem>
2937      <para>
2938       Exclude <filename>postmaster.opts</> from base backups
2939       (Magnus Hagander)
2940      </para>
2941     </listitem>
2942
2943     <listitem>
2944      <para>
2945       Preserve configuration file name and line number values when starting
2946       child processes under Windows (Tom Lane)
2947      </para>
2948
2949      <para>
2950       Formerly, these would not be displayed correctly in the
2951       <structname>pg_settings</> view.
2952      </para>
2953     </listitem>
2954
2955     <listitem>
2956      <para>
2957       Fix incorrect field alignment in <application>ecpg</>'s SQLDA area
2958       (Zoltan Boszormenyi)
2959      </para>
2960     </listitem>
2961
2962     <listitem>
2963      <para>
2964       Preserve blank lines within commands in <application>psql</>'s command
2965       history (Robert Haas)
2966      </para>
2967
2968      <para>
2969       The former behavior could cause problems if an empty line was removed
2970       from within a string literal, for example.
2971      </para>
2972     </listitem>
2973
2974     <listitem>
2975      <para>
2976       Avoid platform-specific infinite loop in <application>pg_dump</>
2977       (Steve Singer)
2978      </para>
2979     </listitem>
2980
2981     <listitem>
2982      <para>
2983       Fix compression of plain-text output format in <application>pg_dump</>
2984       (Adrian Klaver and Tom Lane)
2985      </para>
2986
2987      <para>
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.
2991      </para>
2992     </listitem>
2993
2994     <listitem>
2995      <para>
2996       Fix <application>pg_dump</> to dump user-defined casts between
2997       auto-generated types, such as table rowtypes (Tom Lane)
2998      </para>
2999     </listitem>
3000
3001     <listitem>
3002      <para>
3003       Fix missed quoting of foreign server names in <application>pg_dump</>
3004       (Tom Lane)
3005      </para>
3006     </listitem>
3007
3008     <listitem>
3009      <para>
3010       Assorted fixes for <application>pg_upgrade</> (Bruce Momjian)
3011      </para>
3012
3013      <para>
3014       Handle exclusion constraints correctly, avoid failures on Windows,
3015       don't complain about mismatched toast table names in 8.4 databases.
3016      </para>
3017     </listitem>
3018
3019     <listitem>
3020      <para>
3021       In PL/pgSQL, allow foreign tables to define row types
3022       (Alexander Soudakov)
3023      </para>
3024     </listitem>
3025
3026     <listitem>
3027      <para>
3028       Fix up conversions of PL/Perl functions' results
3029       (Alex Hunsaker and Tom Lane)
3030      </para>
3031
3032      <para>
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.)
3043      </para>
3044     </listitem>
3045
3046     <listitem>
3047      <para>
3048       Ensure PL/Perl strings are always correctly UTF8-encoded
3049       (Amit Khandekar and Alex Hunsaker)
3050      </para>
3051     </listitem>
3052
3053     <listitem>
3054      <para>
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)
3058      </para>
3059     </listitem>
3060
3061     <listitem>
3062      <para>
3063       Correctly propagate SQLSTATE in PL/Python exceptions
3064       (Mika Eloranta and Jan Urbanski)
3065      </para>
3066     </listitem>
3067
3068     <listitem>
3069      <para>
3070       Do not install PL/Python extension files for Python major versions
3071       other than the one built against (Peter Eisentraut)
3072      </para>
3073     </listitem>
3074
3075     <listitem>
3076      <para>
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)
3080      </para>
3081
3082      <para>
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.
3087      </para>
3088     </listitem>
3089
3090     <listitem>
3091      <para>
3092       Fix incorrect coding in <filename>contrib/dict_int</> and
3093       <filename>contrib/dict_xsyn</> (Tom Lane)
3094      </para>
3095
3096      <para>
3097       Some functions incorrectly assumed that memory returned by
3098       <function>palloc()</> is guaranteed zeroed.
3099      </para>
3100     </listitem>
3101
3102     <listitem>
3103      <para>
3104       Remove <filename>contrib/sepgsql</> tests from the regular regression
3105       test mechanism (Tom Lane)
3106      </para>
3107
3108      <para>
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.
3112      </para>
3113     </listitem>
3114
3115     <listitem>
3116      <para>
3117       Fix assorted errors in <filename>contrib/unaccent</>'s configuration
3118       file parsing (Tom Lane)
3119      </para>
3120     </listitem>
3121
3122     <listitem>
3123      <para>
3124       Honor query cancel interrupts promptly in <function>pgstatindex()</>
3125       (Robert Haas)
3126      </para>
3127     </listitem>
3128
3129     <listitem>
3130      <para>
3131       Fix incorrect quoting of log file name in Mac OS X start script
3132       (Sidar Lopez)
3133      </para>
3134     </listitem>
3135
3136     <listitem>
3137      <para>
3138       Revert unintentional enabling of <literal>WAL_DEBUG</> (Robert Haas)
3139      </para>
3140
3141      <para>
3142       Fortunately, as debugging tools go, this one is pretty cheap;
3143       but it's not intended to be enabled by default, so revert.
3144      </para>
3145     </listitem>
3146
3147     <listitem>
3148      <para>
3149       Ensure VPATH builds properly install all server header files
3150       (Peter Eisentraut)
3151      </para>
3152     </listitem>
3153
3154     <listitem>
3155      <para>
3156       Shorten file names reported in verbose error messages (Peter Eisentraut)
3157      </para>
3158
3159      <para>
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.
3163      </para>
3164     </listitem>
3165
3166     <listitem>
3167      <para>
3168       Fix interpretation of Windows timezone names for Central America
3169       (Tom Lane)
3170      </para>
3171
3172      <para>
3173       Map <quote>Central America Standard Time</> to <literal>CST6</>, not
3174       <literal>CST6CDT</>, because DST is generally not observed anywhere in
3175       Central America.
3176      </para>
3177     </listitem>
3178
3179     <listitem>
3180      <para>
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.
3184      </para>
3185     </listitem>
3186
3187    </itemizedlist>
3188
3189   </sect2>
3190  </sect1>
3191
3192  <sect1 id="release-9-1-1">
3193   <title>Release 9.1.1</title>
3194
3195   <note>
3196   <title>Release Date</title>
3197   <simpara>2011-09-26</simpara>
3198   </note>
3199
3200   <para>
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">.
3204   </para>
3205
3206   <sect2>
3207    <title>Migration to Version 9.1.1</title>
3208
3209    <para>
3210     A dump/restore is not required for those running 9.1.X.
3211    </para>
3212
3213   </sect2>
3214
3215   <sect2>
3216    <title>Changes</title>
3217
3218    <itemizedlist>
3219
3220     <listitem>
3221      <para>
3222       Make <function>pg_options_to_table</> return NULL for an option with no
3223       value (Tom Lane)
3224      </para>
3225
3226      <para>
3227       Previously such cases would result in a server crash.
3228      </para>
3229     </listitem>
3230
3231     <listitem>
3232      <para>
3233       Fix memory leak at end of a GiST index scan (Tom Lane)
3234      </para>
3235
3236      <para>
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.
3241      </para>
3242     </listitem>
3243
3244     <listitem>
3245      <para>
3246       Fix explicit reference to <literal>pg_temp</> schema in <command>CREATE
3247       TEMPORARY TABLE</> (Robert Haas)
3248      </para>
3249
3250      <para>
3251       This used to be allowed, but failed in 9.1.0.
3252      </para>
3253     </listitem>
3254
3255    </itemizedlist>
3256
3257   </sect2>
3258  </sect1>
3259
3260  <sect1 id="release-9-1">
3261   <title>Release 9.1</title>
3262
3263   <note>
3264    <title>Release Date</title>
3265    <simpara>2011-09-12</simpara>
3266   </note>
3267
3268   <sect2>
3269    <title>Overview</title>
3270
3271    <para>
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:
3279    </para>
3280
3281    <itemizedlist>
3282
3283     <!-- This list duplicates items below, but without authors or details-->
3284
3285     <listitem>
3286      <para>
3287       Allow <link linkend="synchronous-replication">synchronous
3288       replication</link>
3289      </para>
3290     </listitem>
3291
3292     <listitem>
3293      <para>
3294       Add support for <link linkend="SQL-CREATEFOREIGNTABLE">foreign
3295       tables</link>
3296      </para>
3297     </listitem>
3298
3299     <listitem>
3300      <para>
3301       Add per-column <link
3302       linkend="collation">collation</link> support
3303      </para>
3304     </listitem>
3305
3306     <listitem>
3307      <para>
3308       Add <link linkend="extend-extensions">extensions</link> which
3309       simplify packaging of additions to <productname>PostgreSQL</>
3310      </para>
3311     </listitem>
3312
3313     <listitem>
3314      <para>
3315       Add a true <link
3316       linkend="xact-serializable">serializable isolation level</link>
3317      </para>
3318     </listitem>
3319
3320     <listitem>
3321      <para>
3322       Support unlogged tables using the <literal>UNLOGGED</>
3323       option in <link linkend="SQL-CREATETABLE"><command>CREATE
3324       TABLE</></link>
3325      </para>
3326     </listitem>
3327
3328     <listitem>
3329      <para>
3330       Allow data-modification commands
3331       (<command>INSERT</>/<command>UPDATE</>/<command>DELETE</>) in
3332       <link linkend="queries-with"><literal>WITH</></link> clauses
3333      </para>
3334     </listitem>
3335
3336     <listitem>
3337      <para>
3338       Add nearest-neighbor (order-by-operator) searching to <link
3339       linkend="GiST"><acronym>GiST</> indexes</link>
3340      </para>
3341     </listitem>
3342
3343     <listitem>
3344      <para>
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>
3348      </para>
3349     </listitem>
3350
3351     <listitem>
3352      <para>
3353       Update the <link linkend="plpython">PL/Python</link> server-side
3354       language
3355      </para>
3356     </listitem>
3357
3358    </itemizedlist>
3359
3360    <para>
3361     The above items are explained in more detail in the sections below.
3362    </para>
3363
3364   </sect2>
3365
3366   <sect2>
3367
3368   <title>Migration to Version 9.1</title>
3369
3370    <para>
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
3374     release.
3375    </para>
3376
3377    <para>
3378     Version 9.1 contains a number of changes that may affect compatibility
3379     with previous releases.  Observe the following incompatibilities:
3380    </para>
3381
3382    <sect3>
3383     <title>Strings</title>
3384
3385     <itemizedlist>
3386
3387      <listitem>
3388       <para>
3389        Change the default value of <link
3390        linkend="guc-standard-conforming-strings"><varname>standard_conforming_strings</></link>
3391        to on (Robert Haas)
3392       </para>
3393
3394       <para>
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.
3402       </para>
3403
3404       <warning>
3405        <para>
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.
3412        </para>
3413       </warning>
3414      </listitem>
3415
3416     </itemizedlist>
3417
3418    </sect3>
3419
3420    <sect3>
3421     <title>Casting</title>
3422
3423     <itemizedlist>
3424
3425      <listitem>
3426       <para>
3427        Disallow function-style and attribute-style data type casts for
3428        composite types (Tom Lane)
3429       </para>
3430
3431       <para>
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.
3440       </para>
3441      </listitem>
3442
3443      <listitem>
3444       <para>
3445        Tighten casting checks for domains based on arrays (Tom Lane)
3446       </para>
3447
3448       <para>
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
3455        were skipped.
3456       </para>
3457      </listitem>
3458
3459     </itemizedlist>
3460
3461    </sect3>
3462
3463    <sect3>
3464     <title>Arrays</title>
3465
3466     <itemizedlist>
3467
3468      <listitem>
3469       <para>
3470        Change <link
3471        linkend="array-functions-table"><function>string_to_array()</></link>
3472        to return an empty array for a zero-length string (Pavel
3473        Stehule)
3474       </para>
3475
3476       <para>
3477        Previously this returned a null value.
3478       </para>
3479      </listitem>
3480
3481      <listitem>
3482       <para>
3483        Change <link
3484        linkend="array-functions-table"><function>string_to_array()</></link>
3485        so a <literal>NULL</> separator splits the string into characters
3486        (Pavel Stehule)
3487       </para>
3488
3489       <para>
3490        Previously this returned a null value.
3491       </para>
3492      </listitem>
3493
3494     </itemizedlist>
3495
3496    </sect3>
3497
3498    <sect3>
3499     <title>Object Modification</title>
3500
3501     <itemizedlist>
3502
3503      <listitem>
3504       <para>
3505        Fix improper checks for before/after triggers (Tom Lane)
3506       </para>
3507
3508       <para>
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.
3513       </para>
3514      </listitem>
3515
3516      <listitem>
3517       <para>
3518         Require superuser or <literal>CREATEROLE</> permissions in order to
3519         set comments on roles (Tom Lane)
3520       </para>
3521      </listitem>
3522
3523     </itemizedlist>
3524
3525    </sect3>
3526
3527    <sect3>
3528     <title>Server Settings</title>
3529
3530     <itemizedlist>
3531
3532      <listitem>
3533       <para>
3534        Change <link
3535        linkend="functions-recovery-info-table"><function>pg_last_xlog_receive_location()</></link>
3536        so it never moves backwards (Fujii Masao)
3537       </para>
3538
3539       <para>
3540        Previously, the value of <function>pg_last_xlog_receive_location()</>
3541        could move backward when streaming replication is restarted.
3542       </para>
3543      </listitem>
3544
3545      <listitem>
3546       <para>
3547        Have logging of replication connections honor <link
3548        linkend="guc-log-connections"><varname>log_connections</></link>
3549        (Magnus Hagander)
3550       </para>
3551
3552       <para>
3553        Previously, replication connections were always logged.
3554       </para>
3555      </listitem>
3556
3557     </itemizedlist>
3558
3559    </sect3>
3560
3561    <sect3>
3562     <title><link linkend="plpgsql">PL/pgSQL</link> Server-Side Language</title>
3563
3564     <itemizedlist>
3565
3566      <listitem>
3567       <para>
3568        Change PL/pgSQL's <literal>RAISE</> command without parameters
3569        to be catchable by the attached exception block (Piyush Newe)
3570       </para>
3571
3572       <para>
3573        Previously <literal>RAISE</> in a code block was always scoped to
3574        an attached exception block, so it was uncatchable at the same
3575        scope.
3576       </para>
3577      </listitem>
3578
3579      <listitem>
3580       <para>
3581        Adjust PL/pgSQL's error line numbering code to be consistent
3582        with other PLs (Pavel Stehule)
3583       </para>
3584
3585       <para>
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.
3589       </para>
3590      </listitem>
3591
3592      <listitem>
3593       <para>
3594        Make PL/pgSQL complain about conflicting IN and OUT parameter names
3595        (Tom Lane)
3596       </para>
3597
3598       <para>
3599        Formerly, the collision was not detected, and the name would just
3600        silently refer to only the OUT parameter.
3601       </para>
3602      </listitem>
3603
3604      <listitem>
3605       <para>
3606        Type modifiers of PL/pgSQL variables are now visible to the SQL parser
3607        (Tom Lane)
3608       </para>
3609
3610       <para>
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.
3617       </para>
3618      </listitem>
3619
3620     </itemizedlist>
3621
3622    </sect3>
3623
3624    <sect3>
3625     <title>Contrib</title>
3626
3627     <itemizedlist>
3628
3629      <listitem>
3630       <para>
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)
3635       </para>
3636
3637       <para>
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</>.
3643       </para>
3644      </listitem>
3645
3646     </itemizedlist>
3647
3648    </sect3>
3649
3650    <sect3>
3651     <title>Other Incompatibilities</title>
3652
3653     <itemizedlist>
3654
3655      <listitem>
3656       <para>
3657        Make <link
3658        linkend="monitoring-stats-funcs-table"><function>pg_stat_reset()</></link>
3659        reset all database-level statistics (Tomas Vondra)
3660       </para>
3661
3662       <para>
3663        Some <structname>pg_stat_database</> counters were not being reset.
3664       </para>
3665      </listitem>
3666
3667      <listitem>
3668       <para>
3669         Fix some <link
3670         linkend="infoschema-triggers"><structname>information_schema.triggers</></link>
3671         column names to match the new SQL-standard names (Dean Rasheed)
3672       </para>
3673      </listitem>
3674
3675      <listitem>
3676       <para>
3677        Treat <application>ECPG</> cursor names as case-insensitive
3678        (Zoltan Boszormenyi)
3679       </para>
3680      </listitem>
3681
3682     </itemizedlist>
3683
3684    </sect3>
3685   </sect2>
3686
3687   <sect2>
3688    <title>Changes</title>
3689
3690    <para>
3691     Below you will find a detailed account of the changes between
3692     <productname>PostgreSQL</productname> 9.1 and the previous major
3693     release.
3694    </para>
3695
3696    <sect3>
3697     <title>Server</title>
3698
3699     <sect4>
3700      <title>Performance</title>
3701
3702      <itemizedlist>
3703
3704       <listitem>
3705        <para>
3706         Support unlogged tables using the <literal>UNLOGGED</>
3707         option in <link linkend="SQL-CREATETABLE"><command>CREATE
3708         TABLE</></link> (Robert Haas)
3709        </para>
3710
3711        <para>
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.
3716        </para>
3717       </listitem>
3718
3719       <listitem>
3720        <para>
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)
3724        </para>
3725
3726        <para>
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
3731         possibilities.
3732        </para>
3733       </listitem>
3734
3735       <listitem>
3736        <para>
3737         Merge duplicate fsync requests (Robert Haas, Greg Smith)
3738        </para>
3739
3740        <para>
3741         This greatly improves performance under heavy write loads.
3742        </para>
3743       </listitem>
3744
3745       <listitem>
3746        <para>
3747         Improve performance of <link
3748         linkend="guc-commit-siblings"><varname>commit_siblings</></link>
3749         (Greg Smith)
3750        </para>
3751
3752        <para>
3753         This allows the use of <varname>commit_siblings</varname> with
3754         less overhead.
3755        </para>
3756       </listitem>
3757
3758       <listitem>
3759        <para>
3760         Reduce the memory requirement for large ispell dictionaries
3761         (Pavel Stehule, Tom Lane)
3762        </para>
3763       </listitem>
3764
3765       <listitem>
3766        <para>
3767         Avoid leaving data files open after <quote>blind writes</>
3768         (Alvaro Herrera)
3769        </para>
3770
3771        <para>
3772         This fixes scenarios in which backends might hold files open long
3773         after they were deleted, preventing the kernel from reclaiming
3774         disk space.
3775        </para>
3776       </listitem>
3777
3778      </itemizedlist>
3779
3780     </sect4>
3781
3782     <sect4>
3783      <title>Optimizer</title>
3784
3785      <itemizedlist>
3786
3787       <listitem>
3788        <para>
3789         Allow inheritance table scans to return meaningfully-sorted
3790         results (Greg Stark, Hans-Jurgen Schonig, Robert Haas, Tom Lane)
3791        </para>
3792
3793        <para>
3794         This allows better optimization of queries that use <literal>ORDER
3795         BY</>, <literal>LIMIT</>, or <literal>MIN</>/<literal>MAX</> with
3796         inherited tables.
3797        </para>
3798       </listitem>
3799
3800       <listitem>
3801        <para>
3802          Improve GIN index scan cost estimation (Teodor Sigaev)
3803        </para>
3804       </listitem>
3805
3806       <listitem>
3807        <para>
3808         Improve cost estimation for aggregates and window functions (Tom Lane)
3809        </para>
3810       </listitem>
3811
3812      </itemizedlist>
3813
3814     </sect4>
3815
3816     <sect4>
3817      <title>Authentication</title>
3818
3819      <itemizedlist>
3820
3821       <listitem>
3822        <para>
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>
3826         (Peter Eisentraut)
3827        </para>
3828
3829        <para>
3830         Previously only host <acronym>IP</> addresses and <acronym>CIDR</>
3831         values were supported.
3832        </para>
3833       </listitem>
3834
3835       <listitem>
3836        <para>
3837         Support the key word <literal>all</> in the host column of <link
3838         linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link>
3839         (Peter Eisentraut)
3840        </para>
3841
3842        <para>
3843         Previously people used <literal>0.0.0.0/0</> or <literal>::/0</>
3844         for this.
3845        </para>
3846       </listitem>
3847
3848       <listitem>
3849        <para>
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
3853         (Magnus Hagander)
3854        </para>
3855
3856        <para>
3857         Formerly, such lines were silently ignored, which could be surprising.
3858         This makes the behavior more like other unsupported cases.
3859        </para>
3860       </listitem>
3861
3862       <listitem>
3863        <para>
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)
3867        </para>
3868
3869        <para>
3870         Specifically this allows Unix-based <acronym>GSSAPI</> clients
3871         to do <acronym>SSPI</> authentication with Windows servers.
3872        </para>
3873       </listitem>
3874
3875       <listitem>
3876        <para>
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>
3880         (Magnus Hagander)
3881        </para>
3882
3883        <para>
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.
3887        </para>
3888       </listitem>
3889
3890       <listitem>
3891        <para>
3892         Rewrite <link linkend="auth-peer"><acronym>peer</></link>
3893         authentication to avoid use of credential control messages (Tom Lane)
3894        </para>
3895
3896        <para>
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.
3902        </para>
3903       </listitem>
3904
3905      </itemizedlist>
3906
3907     </sect4>
3908
3909     <sect4>
3910      <title>Monitoring</title>
3911
3912      <itemizedlist>
3913
3914       <listitem>
3915        <para>
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)
3920        </para>
3921
3922        <para>
3923         New details include <acronym>WAL</> file and sync activity.
3924        </para>
3925       </listitem>
3926
3927       <listitem>
3928        <para>
3929          Add <link
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)
3933        </para>
3934       </listitem>
3935
3936       <listitem>
3937        <para>
3938         Reduce the default maximum line length for <application>syslog</>
3939         logging to 900 bytes plus prefixes (Noah Misch)
3940        </para>
3941
3942        <para>
3943         This avoids truncation of long log lines on syslog implementations
3944         that have a 1KB length limit, rather than the more common 2KB.
3945        </para>
3946       </listitem>
3947
3948      </itemizedlist>
3949
3950     </sect4>
3951
3952     <sect4>
3953      <title>Statistical Views</title>
3954
3955      <itemizedlist>
3956
3957       <listitem>
3958        <para>
3959         Add <structfield>client_hostname</structfield> column to <link
3960         linkend="monitoring-stats-views-table"><structname>pg_stat_activity</></link>
3961         (Peter Eisentraut)
3962        </para>
3963
3964        <para>
3965         Previously only the client address was reported.
3966        </para>
3967       </listitem>
3968
3969       <listitem>
3970        <para>
3971         Add <link
3972         linkend="monitoring-stats-views-table"><structname>pg_stat_xact_*</></link>
3973         statistics functions and views (Joel Jacobson)
3974        </para>
3975
3976        <para>
3977         These are like the database-wide statistics counter views, but
3978         reflect counts for only the current transaction.
3979        </para>
3980       </listitem>
3981
3982       <listitem>
3983        <para>
3984          Add time of last reset in database-level and background writer
3985          statistics views (Tomas Vondra)
3986        </para>
3987       </listitem>
3988
3989       <listitem>
3990        <para>
3991          Add columns showing the number of vacuum and analyze operations
3992          in <link
3993          linkend="monitoring-stats-views-table"><structname>pg_stat_*_tables</></link>
3994          views (Magnus Hagander)
3995        </para>
3996       </listitem>
3997
3998       <listitem>
3999        <para>
4000         Add <structfield>buffers_backend_fsync</> column to <link
4001         linkend="monitoring-stats-views-table"><structname>pg_stat_bgwriter</></link>
4002         (Greg Smith)
4003        </para>
4004
4005        <para>
4006         This new column counts the number of times a backend fsyncs a
4007         buffer.
4008        </para>
4009       </listitem>
4010
4011      </itemizedlist>
4012
4013     </sect4>
4014
4015     <sect4>
4016      <title>Server Settings</title>
4017
4018      <itemizedlist>
4019
4020       <listitem>
4021        <para>
4022         Provide auto-tuning of <link
4023         linkend="guc-wal-buffers"><varname>wal_buffers</></link> (Greg
4024         Smith)
4025        </para>
4026
4027        <para>
4028         By default, the value of <varname>wal_buffers</> is now chosen
4029         automatically based on the value of <varname>shared_buffers</>.
4030        </para>
4031       </listitem>
4032
4033       <listitem>
4034        <para>
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>
4039         (Peter Eisentraut)
4040        </para>
4041
4042        <para>
4043         The maximum value for each of these parameters was previously
4044         only about 35 minutes.  Much larger values are now allowed.
4045        </para>
4046       </listitem>
4047
4048       </itemizedlist>
4049
4050     </sect4>
4051
4052    </sect3>
4053
4054    <sect3>
4055     <title>Replication and Recovery</title>
4056
4057    <sect4>
4058     <title>Streaming Replication and Continuous Archiving</title>
4059
4060     <itemizedlist>
4061
4062      <listitem>
4063       <para>
4064        Allow <link linkend="synchronous-replication">synchronous
4065        replication</link> (Simon Riggs, Fujii Masao)
4066       </para>
4067
4068       <para>
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>
4077        setting.
4078       </para>
4079      </listitem>
4080
4081      <listitem>
4082       <para>
4083        Add protocol support for sending file system backups to standby servers
4084        using the streaming replication network connection (Magnus Hagander,
4085        Heikki Linnakangas)
4086       </para>
4087
4088       <para>
4089        This avoids the requirement of manually transferring a file
4090        system backup when setting up a standby server.
4091       </para>
4092      </listitem>
4093
4094      <listitem>
4095       <para>
4096        Add
4097        <varname>replication_timeout</>
4098        setting (Fujii Masao, Heikki Linnakangas)
4099       </para>
4100
4101       <para>
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.
4107       </para>
4108      </listitem>
4109
4110      <listitem>
4111       <para>
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
4115        Hagander)
4116       </para>
4117      </listitem>
4118
4119      <listitem>
4120       <para>
4121        Add a <link linkend="SQL-CREATEROLE">replication permission</link>
4122        for roles (Magnus Hagander)
4123       </para>
4124
4125       <para>
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.
4130       </para>
4131      </listitem>
4132
4133     </itemizedlist>
4134
4135     </sect4>
4136
4137     <sect4>
4138      <title>Replication Monitoring</title>
4139
4140      <itemizedlist>
4141
4142       <listitem>
4143        <para>
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)
4148        </para>
4149
4150        <para>
4151         This reports the status of all connected standby servers.
4152        </para>
4153       </listitem>
4154
4155       <listitem>
4156        <para>
4157         Add monitoring function <link
4158         linkend="functions-recovery-info-table"><function>pg_last_xact_replay_timestamp()</></link>
4159         (Fujii Masao)
4160        </para>
4161
4162        <para>
4163         This returns the time at which the primary generated the most
4164         recent commit or abort record applied on the standby.
4165        </para>
4166       </listitem>
4167
4168      </itemizedlist>
4169
4170     </sect4>
4171
4172     <sect4>
4173      <title>Hot Standby</title>
4174
4175      <itemizedlist>
4176
4177      <listitem>
4178       <para>
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)
4183       </para>
4184
4185       <para>
4186        This helps avoid canceling long-running queries on the standby.
4187       </para>
4188      </listitem>
4189
4190       <listitem>
4191        <para>
4192         Add the <link
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)
4196        </para>
4197
4198        <para>
4199         Cancellations can occur because of dropped tablespaces, lock
4200         timeouts, old snapshots, pinned buffers, and deadlocks.
4201        </para>
4202       </listitem>
4203
4204       <listitem>
4205        <para>
4206         Add a <structfield>conflicts</> count to <link
4207         linkend="monitoring-stats-views-table"><structname>pg_stat_database</></link>
4208         (Magnus Hagander)
4209        </para>
4210
4211        <para>
4212         This is the number of conflicts that occurred in the database.
4213        </para>
4214       </listitem>
4215
4216       <listitem>
4217        <para>
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>
4221        </para>
4222
4223        <para>
4224         The maximum value for each of these parameters was previously
4225         only about 35 minutes.  Much larger values are now allowed.
4226        </para>
4227       </listitem>
4228
4229       <listitem>
4230        <para>
4231         Add <link
4232         linkend="errcodes-table"><literal>ERRCODE_T_R_DATABASE_DROPPED</></link>
4233         error code to report recovery conflicts due to dropped databases
4234         (Tatsuo Ishii)
4235        </para>
4236
4237        <para>
4238         This is useful for connection pooling software.
4239        </para>
4240       </listitem>
4241
4242      </itemizedlist>
4243
4244     </sect4>
4245
4246     <sect4>
4247      <title>Recovery Control</title>
4248
4249      <itemizedlist>
4250
4251       <listitem>
4252        <para>
4253         Add functions to control streaming replication replay (Simon Riggs)
4254        </para>
4255
4256        <para>
4257         The new functions are <link
4258         linkend="functions-recovery-control-table"><function>pg_xlog_replay_pause()</></link>,
4259         <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>.
4263        </para>
4264       </listitem>
4265
4266       <listitem>
4267        <para>
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)
4271        </para>
4272
4273        <para>
4274         This allows a recovery server to be queried to check whether
4275         the recovery point is the one desired.
4276        </para>
4277       </listitem>
4278
4279       <listitem>
4280        <para>
4281         Add the ability to create named restore points using <link
4282         linkend="functions-admin-backup-table"><function>pg_create_restore_point()</></link>
4283         (Jaime Casanova)
4284        </para>
4285
4286        <para>
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>.
4290        </para>
4291       </listitem>
4292
4293       <listitem>
4294        <para>
4295         Allow standby recovery to switch to a new timeline automatically
4296         (Heikki Linnakangas)
4297        </para>
4298
4299        <para>
4300         Now standby servers scan the archive directory for new
4301         timelines periodically.
4302        </para>
4303       </listitem>
4304
4305       <listitem>
4306        <para>
4307         Add <link
4308         linkend="guc-restart-after-crash"><varname>restart_after_crash</></link>
4309         setting which disables automatic server restart after a backend
4310         crash (Robert Haas)
4311        </para>
4312
4313        <para>
4314         This allows external cluster management software to control
4315         whether the database server restarts or not.
4316        </para>
4317       </listitem>
4318
4319       <listitem>
4320        <para>
4321         Allow <link
4322         linkend="recovery-config"><filename>recovery.conf</></link>
4323         to use the same quoting behavior as <filename>postgresql.conf</>
4324         (Dimitri Fontaine)
4325        </para>
4326
4327        <para>
4328         Previously all values had to be quoted.
4329        </para>
4330       </listitem>
4331
4332      </itemizedlist>
4333
4334     </sect4>
4335
4336    </sect3>
4337
4338    <sect3>
4339     <title>Queries</title>
4340
4341      <itemizedlist>
4342
4343       <listitem>
4344        <para>
4345         Add a true <link
4346         linkend="xact-serializable">serializable isolation level</link>
4347         (Kevin Grittner, Dan Ports)
4348        </para>
4349
4350        <para>
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>
4356         isolation level.
4357        </para>
4358       </listitem>
4359
4360       <listitem>
4361        <para>
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)
4366        </para>
4367
4368        <para>
4369         These commands can use <literal>RETURNING</> to pass data up to the
4370         containing query.
4371        </para>
4372       </listitem>
4373
4374       <listitem>
4375        <para>
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)
4379        </para>
4380       </listitem>
4381
4382       <listitem>
4383        <para>
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
4387         Eisentraut)
4388        </para>
4389
4390        <para>
4391         The SQL standard allows this behavior, and
4392         because of the primary key, the result is unambiguous.
4393        </para>
4394       </listitem>
4395
4396       <listitem>
4397        <para>
4398         Allow use of the key word <literal>DISTINCT</> in <link
4399         linkend="queries-union"><literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</></link>
4400         clauses (Tom Lane)
4401        </para>
4402
4403        <para>
4404         <literal>DISTINCT</> is the default behavior so use of this
4405         key word is redundant, but the SQL standard allows it.
4406        </para>
4407       </listitem>
4408
4409       <listitem>
4410        <para>
4411         Fix ordinary queries with rules to use the same snapshot behavior
4412         as <command>EXPLAIN ANALYZE</> (Marko Tiikkaja)
4413        </para>
4414
4415        <para>
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.
4419        </para>
4420       </listitem>
4421
4422      </itemizedlist>
4423
4424     <sect4>
4425      <title>Strings</title>
4426
4427      <itemizedlist>
4428
4429       <listitem>
4430        <para>
4431         Add per-column <link
4432         linkend="collation">collation</link> support
4433         (Peter Eisentraut, Tom Lane)
4434        </para>
4435
4436        <para>
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.
4441        </para>
4442       </listitem>
4443
4444      </itemizedlist>
4445
4446     </sect4>
4447
4448    </sect3>
4449
4450    <sect3>
4451     <title>Object Manipulation</title>
4452
4453      <itemizedlist>
4454
4455       <listitem>
4456        <para>
4457         Add <link linkend="extend-extensions">extensions</link> which
4458         simplify packaging of additions to <productname>PostgreSQL</>
4459         (Dimitri Fontaine, Tom Lane)
4460        </para>
4461
4462        <para>
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.
4469        </para>
4470       </listitem>
4471
4472       <listitem>
4473        <para>
4474         Add support for <link linkend="SQL-CREATEFOREIGNTABLE">foreign
4475         tables</link> (Shigeru Hanada, Robert Haas, Jan Urbanski,
4476         Heikki Linnakangas)
4477        </para>
4478
4479        <para>
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.
4483        </para>
4484       </listitem>
4485
4486      <listitem>
4487       <para>
4488          Allow new values to be added to an existing enum type via
4489          <link linkend="SQL-ALTERTYPE"><command>ALTER TYPE</></link> (Andrew
4490          Dunstan)
4491       </para>
4492      </listitem>
4493
4494       <listitem>
4495        <para>
4496         Add <link linkend="SQL-ALTERTYPE"><command>ALTER TYPE ...
4497         ADD/DROP/ALTER/RENAME ATTRIBUTE</></link> (Peter Eisentraut)
4498        </para>
4499
4500        <para>
4501         This allows modification of composite types.
4502        </para>
4503       </listitem>
4504
4505      </itemizedlist>
4506
4507     <sect4>
4508      <title><command>ALTER</> Object</title>
4509
4510      <itemizedlist>
4511
4512       <listitem>
4513        <para>
4514         Add <literal>RESTRICT</>/<literal>CASCADE</> to <link
4515         linkend="SQL-ALTERTYPE"><command>ALTER TYPE</></link> operations
4516         on typed tables (Peter Eisentraut)
4517        </para>
4518
4519        <para>
4520         This controls
4521         <literal>ADD</>/<literal>DROP</>/<literal>ALTER</>/<literal>RENAME
4522         ATTRIBUTE</> cascading behavior.
4523        </para>
4524       </listitem>
4525
4526       <listitem>
4527        <para>
4528         Support <literal>ALTER TABLE <replaceable>name</> {OF | NOT OF}
4529         <replaceable>type</></literal>
4530         (Noah Misch)
4531        </para>
4532
4533        <para>
4534         This syntax allows a standalone table to be made into a typed table,
4535         or a typed table to be made standalone.
4536        </para>
4537       </listitem>
4538
4539       <listitem>
4540        <para>
4541         Add support for more object types in <command>ALTER ... SET
4542         SCHEMA</> commands (Dimitri Fontaine)
4543        </para>
4544
4545        <para>
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.
4549        </para>
4550       </listitem>
4551
4552      </itemizedlist>
4553
4554     </sect4>
4555
4556     <sect4>
4557      <title><link linkend="SQL-CREATETABLE"><command>CREATE/ALTER TABLE</></link></title>
4558
4559      <itemizedlist>
4560
4561       <listitem>
4562        <para>
4563         Add <command>ALTER TABLE ...
4564         ADD UNIQUE/PRIMARY KEY USING INDEX</command>
4565         (Gurjeet Singh)
4566        </para>
4567
4568        <para>
4569         This allows a primary key or unique constraint to be defined using an
4570         existing unique index, including a concurrently created unique index.
4571        </para>
4572       </listitem>
4573
4574       <listitem>
4575        <para>
4576         Allow <command>ALTER TABLE</>
4577         to add foreign keys without validation (Simon Riggs)
4578        </para>
4579
4580        <para>
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.
4585        </para>
4586       </listitem>
4587
4588       <listitem>
4589        <para>
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)
4593        </para>
4594
4595        <para>
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.
4600        </para>
4601       </listitem>
4602
4603       <listitem>
4604        <para>
4605         Add <link linkend="SQL-CREATETABLE"><command>CREATE TABLE IF
4606         NOT EXISTS</></link> syntax (Robert Haas)
4607        </para>
4608
4609        <para>
4610         This allows table creation without causing an error if the
4611         table already exists.
4612        </para>
4613       </listitem>
4614
4615       <listitem>
4616        <para>
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)
4620        </para>
4621
4622        <para>
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.
4626        </para>
4627       </listitem>
4628
4629      </itemizedlist>
4630
4631     </sect4>
4632
4633     <sect4>
4634      <title>Object Permissions</title>
4635
4636      <itemizedlist>
4637
4638       <listitem>
4639        <para>
4640         Add a <link linkend="SQL-SECURITY-LABEL"><command>SECURITY
4641         LABEL</></link> command (KaiGai Kohei)
4642        </para>
4643
4644        <para>
4645         This allows security labels to be assigned to objects.
4646        </para>
4647       </listitem>
4648
4649      </itemizedlist>
4650
4651     </sect4>
4652
4653    </sect3>
4654
4655    <sect3>
4656     <title>Utility Operations</title>
4657
4658     <itemizedlist>
4659
4660      <listitem>
4661       <para>
4662        Add transaction-level <link linkend="advisory-locks">advisory
4663        locks</link> (Marko Tiikkaja)
4664       </para>
4665
4666       <para>
4667        These are similar to the existing session-level advisory locks,
4668        but such locks are automatically released at transaction end.
4669       </para>
4670      </listitem>
4671
4672      <listitem>
4673       <para>
4674        Make <link linkend="SQL-TRUNCATE"><command>TRUNCATE ... RESTART
4675        IDENTITY</></link> restart sequences transactionally (Steve
4676        Singer)
4677       </para>
4678
4679       <para>
4680        Previously the counter could have been left out of sync if a
4681        backend crashed between the on-commit truncation activity and
4682        commit completion.
4683       </para>
4684      </listitem>
4685
4686     </itemizedlist>
4687
4688     <sect4>
4689      <title><link linkend="SQL-COPY"><command>COPY</></link></title>
4690
4691      <itemizedlist>
4692
4693       <listitem>
4694        <para>
4695         Add <literal>ENCODING</> option to <link
4696         linkend="SQL-COPY"><command>COPY TO/FROM</></link> (Hitoshi
4697         Harada, Itagaki Takahiro)
4698        </para>
4699
4700        <para>
4701         This allows the encoding of the <command>COPY</> file to be
4702         specified separately from client encoding.
4703        </para>
4704       </listitem>
4705
4706       <listitem>
4707        <para>
4708         Add bidirectional <link linkend="SQL-COPY"><command>COPY</></link>
4709         protocol support (Fujii Masao)
4710        </para>
4711
4712        <para>
4713         This is currently only used by streaming replication.
4714        </para>
4715       </listitem>
4716
4717      </itemizedlist>
4718
4719     </sect4>
4720
4721     <sect4>
4722      <title><link linkend="SQL-EXPLAIN"><command>EXPLAIN</></link></title>
4723
4724       <itemizedlist>
4725
4726       <listitem>
4727        <para>
4728         Make <command>EXPLAIN VERBOSE</> show the function call expression
4729         in a <literal>FunctionScan</literal> node (Tom Lane)
4730        </para>
4731       </listitem>
4732
4733      </itemizedlist>
4734
4735     </sect4>
4736
4737     <sect4>
4738      <title><link linkend="SQL-VACUUM"><command>VACUUM</></link></title>
4739
4740      <itemizedlist>
4741
4742       <listitem>
4743        <para>
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>
4747         (Itagaki Takahiro)
4748        </para>
4749
4750        <para>
4751         New information includes the live and dead tuple count and
4752         whether <command>CLUSTER</> is using an index to rebuild.
4753        </para>
4754       </listitem>
4755
4756       <listitem>
4757        <para>
4758         Prevent <link linkend="autovacuum">autovacuum</link> from
4759         waiting if it cannot acquire a table lock (Robert Haas)
4760        </para>
4761
4762        <para>
4763         It will try to vacuum that table later.
4764        </para>
4765       </listitem>
4766
4767      </itemizedlist>
4768
4769     </sect4>
4770
4771     <sect4>
4772      <title><link linkend="SQL-CLUSTER"><command>CLUSTER</></link></title>
4773
4774      <itemizedlist>
4775
4776       <listitem>
4777        <para>
4778         Allow <command>CLUSTER</> to sort the table rather than scanning
4779         the index when it seems likely to be cheaper (Leonardo Francalanci)
4780        </para>
4781       </listitem>
4782
4783      </itemizedlist>
4784
4785     </sect4>
4786
4787     <sect4>
4788      <title>Indexes</title>
4789
4790      <itemizedlist>
4791
4792       <listitem>
4793        <para>
4794         Add nearest-neighbor (order-by-operator) searching to <link
4795         linkend="GiST"><acronym>GiST</> indexes</link> (Teodor Sigaev, Tom Lane)
4796        </para>
4797
4798        <para>
4799         This allows <acronym>GiST</> indexes to quickly return the
4800         <replaceable>N</> closest values in a query with <literal>LIMIT</>.
4801         For example
4802 <programlisting><![CDATA[
4803 SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10;
4804 ]]>
4805 </programlisting>
4806         finds the ten places closest to a given target point.
4807        </para>
4808       </listitem>
4809
4810       <listitem>
4811        <para>
4812         Allow <link linkend="GIN"><acronym>GIN</> indexes</link> to index null
4813         and empty values (Tom Lane)
4814        </para>
4815
4816        <para>
4817         This allows full <acronym>GIN</> index scans, and fixes various
4818         corner cases in which GIN scans would fail.
4819        </para>
4820       </listitem>
4821
4822       <listitem>
4823        <para>
4824         Allow <link linkend="GIN"><acronym>GIN</> indexes</link> to
4825         better recognize duplicate search entries (Tom Lane)
4826        </para>
4827
4828        <para>
4829         This reduces the cost of index scans, especially in cases where
4830         it avoids unnecessary full index scans.
4831        </para>
4832       </listitem>
4833
4834       <listitem>
4835        <para>
4836         Fix <link linkend="GiST"><acronym>GiST</> indexes</link> to be fully
4837         crash-safe (Heikki Linnakangas)
4838        </para>
4839
4840        <para>
4841         Previously there were rare cases where a <command>REINDEX</>
4842         would be required (you would be informed).
4843        </para>
4844       </listitem>
4845
4846      </itemizedlist>
4847
4848     </sect4>
4849
4850    </sect3>
4851
4852    <sect3>
4853     <title>Data Types</title>
4854
4855     <itemizedlist>
4856
4857      <listitem>
4858       <para>
4859        Allow <type>numeric</> to use a more compact, two-byte header
4860        in common cases (Robert Haas)
4861       </para>
4862
4863       <para>
4864        Previously all <type>numeric</> values had four-byte headers;
4865        this change saves on disk storage.
4866       </para>
4867      </listitem>
4868
4869      <listitem>
4870       <para>
4871         Add support for dividing <type>money</> by <type>money</>
4872         (Andy Balholm)
4873       </para>
4874      </listitem>
4875
4876      <listitem>
4877       <para>
4878        Allow binary I/O on type <type>void</type> (Radoslaw Smogura)
4879       </para>
4880      </listitem>
4881
4882      <listitem>
4883       <para>
4884        Improve hypotenuse calculations for geometric operators (Paul Matthews)
4885       </para>
4886
4887       <para>
4888        This avoids unnecessary overflows, and may also be more accurate.
4889       </para>
4890      </listitem>
4891
4892      <listitem>
4893       <para>
4894        Support hashing array values (Tom Lane)
4895       </para>
4896
4897       <para>
4898        This provides additional query optimization possibilities.
4899       </para>
4900      </listitem>
4901
4902      <listitem>
4903       <para>
4904        Don't treat a composite type as sortable unless all its column types
4905        are sortable (Tom Lane)
4906       </para>
4907
4908       <para>
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.
4913       </para>
4914      </listitem>
4915
4916     </itemizedlist>
4917
4918     <sect4>
4919      <title>Casting</title>
4920
4921      <itemizedlist>
4922
4923      <listitem>
4924       <para>
4925         Add support for casting between <type>money</> and <type>numeric</>
4926         (Andy Balholm)
4927       </para>
4928      </listitem>
4929
4930      <listitem>
4931       <para>
4932        Add support for casting from <type>int4</> and <type>int8</>
4933        to <type>money</> (Joey Adams)
4934       </para>
4935      </listitem>
4936
4937       <listitem>
4938        <para>
4939         Allow casting a table's row type to the table's supertype if
4940         it's a typed table (Peter Eisentraut)
4941        </para>
4942
4943        <para>
4944         This is analogous to the existing facility that allows casting a row
4945         type to a supertable's row type.
4946        </para>
4947       </listitem>
4948
4949      </itemizedlist>
4950
4951     </sect4>
4952
4953     <sect4>
4954      <title><link linkend="functions-xml"><acronym>XML</></link></title>
4955
4956      <itemizedlist>
4957
4958       <listitem>
4959        <para>
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)
4964        </para>
4965
4966        <para>
4967         These are used for XPath matching.
4968        </para>
4969       </listitem>
4970
4971       <listitem>
4972        <para>
4973         Add <acronym>XML</> functions <link
4974         linkend="xml-is-well-formed"><function>xml_is_well_formed()</></link>,
4975         <link
4976         linkend="xml-is-well-formed"><function>xml_is_well_formed_document()</></link>,
4977         <link
4978         linkend="xml-is-well-formed"><function>xml_is_well_formed_content()</></link>
4979         (Mike Fowler)
4980        </para>
4981
4982        <para>
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.
4986        </para>
4987       </listitem>
4988
4989      </itemizedlist>
4990
4991     </sect4>
4992
4993    </sect3>
4994
4995    <sect3>
4996     <title>Functions</title>
4997
4998      <itemizedlist>
4999
5000       <listitem>
5001        <para>
5002         Add SQL function <link
5003         linkend="format"><function>format(text, ...)</></link>, which
5004         behaves analogously to C's <function>printf()</> (Pavel Stehule,
5005         Robert Haas)
5006        </para>
5007
5008        <para>
5009         It currently supports formats for strings, SQL literals, and
5010         SQL identifiers.
5011        </para>
5012       </listitem>
5013
5014       <listitem>
5015        <para>
5016         Add string functions <link
5017         linkend="functions-string-other"><function>concat()</></link>,
5018         <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>,
5022         and <link
5023         linkend="functions-string-other"><function>reverse()</></link>
5024         (Pavel Stehule)
5025        </para>
5026
5027        <para>
5028         These improve compatibility with other database products.
5029        </para>
5030       </listitem>
5031
5032       <listitem>
5033        <para>
5034          Add function <link
5035          linkend="functions-admin-genfile"><function>pg_read_binary_file()</></link>
5036          to read binary files (Dimitri Fontaine, Itagaki Takahiro)
5037        </para>
5038       </listitem>
5039
5040       <listitem>
5041        <para>
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)
5045        </para>
5046       </listitem>
5047
5048       <listitem>
5049        <para>
5050          Add three-parameter forms of <link
5051          linkend="array-functions-table"><function>array_to_string()</></link>
5052          and <link
5053          linkend="array-functions-table"><function>string_to_array()</></link>
5054          for null value processing control (Pavel Stehule)
5055        </para>
5056       </listitem>
5057
5058      </itemizedlist>
5059
5060     <sect4>
5061      <title>Object Information Functions</title>
5062
5063      <itemizedlist>
5064
5065       <listitem>
5066        <para>
5067         Add the <link
5068         linkend="functions-info-catalog-table"><function>pg_describe_object()</></link>
5069         function (Alvaro Herrera)
5070        </para>
5071
5072        <para>
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>.
5079        </para>
5080       </listitem>
5081
5082       <listitem>
5083        <para>
5084          Update comments for built-in operators and their underlying
5085          functions (Tom Lane)
5086        </para>
5087
5088        <para>
5089         Functions that are meant to be used via an associated operator
5090         are now commented as such.
5091        </para>
5092       </listitem>
5093
5094       <listitem>
5095        <para>
5096         Add variable <link
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>
5101         (Robert Haas)
5102        </para>
5103
5104        <para>
5105         This makes exporting schemas to tools and other databases with
5106         different quoting rules easier.
5107        </para>
5108       </listitem>
5109
5110       <listitem>
5111        <para>
5112         Add columns to the <link
5113         linkend="infoschema-sequences"><structname>information_schema.sequences</></link>
5114         system view (Peter Eisentraut)
5115        </para>
5116
5117        <para>
5118         Previously, though the view existed, the columns about the
5119         sequence parameters were unimplemented.
5120        </para>
5121       </listitem>
5122
5123       <listitem>
5124        <para>
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)
5128        </para>
5129
5130        <para>
5131         This allows checking for public permissions.
5132        </para>
5133       </listitem>
5134
5135      </itemizedlist>
5136
5137     </sect4>
5138
5139     <sect4>
5140      <title>Function and Trigger Creation</title>
5141
5142      <itemizedlist>
5143
5144       <listitem>
5145        <para>
5146         Support <link linkend="SQL-CREATETRIGGER"><literal>INSTEAD
5147         OF</></link> triggers on views (Dean Rasheed)
5148        </para>
5149
5150        <para>
5151         This feature can be used to implement fully updatable views.
5152        </para>
5153       </listitem>
5154
5155      </itemizedlist>
5156
5157     </sect4>
5158
5159    </sect3>
5160
5161    <sect3>
5162     <title>Server-Side Languages</title>
5163
5164     <sect4>
5165      <title><link linkend="plpgsql">PL/pgSQL</link> Server-Side Language</title>
5166
5167      <itemizedlist>
5168
5169       <listitem>
5170        <para>
5171         Add <link linkend="plpgsql-foreach-array"><command>FOREACH IN
5172         ARRAY</></link> to PL/pgSQL
5173         (Pavel Stehule)
5174        </para>
5175
5176        <para>
5177         This is more efficient and readable than previous methods of
5178         iterating through the elements of an array value.
5179        </para>
5180       </listitem>
5181
5182       <listitem>
5183        <para>
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)
5187        </para>
5188
5189        <para>
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.
5193        </para>
5194       </listitem>
5195
5196     </itemizedlist>
5197
5198     </sect4>
5199
5200     <sect4>
5201      <title><link linkend="plperl">PL/Perl</link> Server-Side Language</title>
5202
5203      <itemizedlist>
5204
5205       <listitem>
5206        <para>
5207         Allow generic record arguments to PL/Perl functions (Andrew
5208         Dunstan)
5209        </para>
5210
5211        <para>
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.
5214        </para>
5215       </listitem>
5216
5217       <listitem>
5218        <para>
5219         Convert PL/Perl array arguments to Perl arrays (Alexey Klyukin,
5220         Alex Hunsaker)
5221        </para>
5222
5223        <para>
5224         String representations are still available.
5225        </para>
5226       </listitem>
5227
5228       <listitem>
5229        <para>
5230         Convert PL/Perl composite-type arguments to Perl hashes
5231         (Alexey Klyukin, Alex Hunsaker)
5232        </para>
5233
5234        <para>
5235         String representations are still available.
5236        </para>
5237       </listitem>
5238
5239      </itemizedlist>
5240
5241     </sect4>
5242
5243     <sect4>
5244      <title><link linkend="plpython">PL/Python</link> Server-Side Language</title>
5245
5246      <itemizedlist>
5247
5248       <listitem>
5249        <para>
5250         Add table function support for PL/Python (Jan Urbanski)
5251        </para>
5252
5253        <para>
5254         PL/Python can now return multiple <literal>OUT</> parameters
5255         and record sets.
5256        </para>
5257       </listitem>
5258
5259       <listitem>
5260        <para>
5261         Add a validator to PL/Python (Jan Urbanski)
5262        </para>
5263
5264        <para>
5265         This allows PL/Python functions to be syntax-checked at function
5266         creation time.
5267        </para>
5268       </listitem>
5269
5270       <listitem>
5271        <para>
5272         Allow exceptions for SQL queries in PL/Python (Jan Urbanski)
5273        </para>
5274
5275        <para>
5276         This allows access to SQL-generated exception error codes from
5277         PL/Python exception blocks.
5278        </para>
5279       </listitem>
5280
5281       <listitem>
5282        <para>
5283         Add explicit subtransactions to PL/Python (Jan Urbanski)
5284        </para>
5285       </listitem>
5286
5287       <listitem>
5288        <para>
5289         Add PL/Python functions for quoting strings (Jan Urbanski)
5290        </para>
5291
5292        <para>
5293         These functions are <link
5294         linkend="plpython-util"><literal>plpy.quote_ident</></link>,
5295         <link linkend="plpython-util"><literal>plpy.quote_literal</></link>,
5296         and <link
5297         linkend="plpython-util"><literal>plpy.quote_nullable</></link>.
5298        </para>
5299       </listitem>
5300
5301       <listitem>
5302        <para>
5303          Add traceback information to PL/Python errors (Jan Urbanski)
5304        </para>
5305       </listitem>
5306
5307       <listitem>
5308        <para>
5309          Report PL/Python errors from iterators with <literal>PLy_elog</> (Jan
5310          Urbanski)
5311        </para>
5312       </listitem>
5313
5314       <listitem>
5315        <para>
5316         Fix exception handling with Python 3 (Jan Urbanski)
5317        </para>
5318
5319        <para>
5320         Exception classes were previously not available in
5321         <literal>plpy</> under Python 3.
5322        </para>
5323       </listitem>
5324
5325      </itemizedlist>
5326
5327     </sect4>
5328
5329    </sect3>
5330
5331    <sect3>
5332     <title>Client Applications</title>
5333
5334     <itemizedlist>
5335
5336      <listitem>
5337       <para>
5338         Mark <link
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
5342         Lane)
5343       </para>
5344      </listitem>
5345
5346     </itemizedlist>
5347
5348     <sect4>
5349      <title><link linkend="APP-PSQL"><application>psql</></link></title>
5350
5351      <itemizedlist>
5352
5353       <listitem>
5354        <para>
5355          Add <application>psql</> command <literal>\conninfo</>
5356          to show current connection information (David Christensen)
5357        </para>
5358       </listitem>
5359
5360       <listitem>
5361        <para>
5362          Add <application>psql</> command <literal>\sf</> to
5363          show a function's definition (Pavel Stehule)
5364        </para>
5365       </listitem>
5366
5367       <listitem>
5368        <para>
5369          Add <application>psql</> command <literal>\dL</> to list
5370          languages (Fernando Ike)
5371        </para>
5372       </listitem>
5373
5374       <listitem>
5375        <para>
5376         Add the <option>S</> (<quote>system</>) option to <application>psql</>'s
5377         <literal>\dn</> (list schemas) command (Tom Lane)
5378        </para>
5379
5380        <para>
5381         <literal>\dn</> without <literal>S</> now suppresses system
5382         schemas.
5383        </para>
5384       </listitem>
5385
5386       <listitem>
5387        <para>
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)
5391        </para>
5392
5393        <para>
5394         This is passed to the editor according to the
5395         <envar>PSQL_EDITOR_LINENUMBER_ARG</> environment variable.
5396        </para>
5397       </listitem>
5398
5399       <listitem>
5400        <para>
5401         Have <application>psql</> set the client encoding from the
5402         operating system locale by default (Heikki Linnakangas)
5403        </para>
5404
5405        <para>
5406         This only happens if the <envar>PGCLIENTENCODING</> environment
5407         variable is not set.
5408        </para>
5409       </listitem>
5410
5411       <listitem>
5412        <para>
5413         Make <literal>\d</literal> distinguish between unique
5414         indexes and unique constraints (Josh Kupershmidt)
5415        </para>
5416       </listitem>
5417
5418       <listitem>
5419        <para>
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)
5423        </para>
5424
5425        <para>
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.
5428        </para>
5429       </listitem>
5430
5431       <listitem>
5432        <para>
5433         Additional tab completion support (Itagaki Takahiro, Pavel Stehule,
5434         Andrey Popp, Christoph Berg, David Fetter, Josh Kupershmidt)
5435        </para>
5436       </listitem>
5437
5438      </itemizedlist>
5439
5440     </sect4>
5441
5442     <sect4>
5443      <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title>
5444
5445      <itemizedlist>
5446
5447       <listitem>
5448        <para>
5449          Add <link linkend="APP-PGDUMP"><application>pg_dump</></link>
5450          and <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)
5454        </para>
5455       </listitem>
5456
5457       <listitem>
5458        <para>
5459         Add <literal>directory</> format to <application>pg_dump</>
5460         (Joachim Wieland, Heikki Linnakangas)
5461        </para>
5462
5463        <para>
5464         This is internally similar to the <literal>tar</>
5465         <application>pg_dump</> format.
5466        </para>
5467       </listitem>
5468
5469      </itemizedlist>
5470
5471     </sect4>
5472
5473     <sect4>
5474      <title><link linkend="APP-PG-CTL"><application>pg_ctl</></link></title>
5475
5476      <itemizedlist>
5477
5478       <listitem>
5479        <para>
5480         Fix <application>pg_ctl</>
5481         so it no longer incorrectly reports that the server is not
5482         running (Bruce Momjian)
5483        </para>
5484
5485        <para>
5486         Previously this could happen if the server was running but
5487         <application>pg_ctl</> could not authenticate.
5488        </para>
5489       </listitem>
5490
5491       <listitem>
5492        <para>
5493         Improve <application>pg_ctl</> start's <quote>wait</quote>
5494         (<option>-w</>) option (Bruce Momjian, Tom Lane)
5495        </para>
5496
5497        <para>
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.
5502        </para>
5503       </listitem>
5504
5505       <listitem>
5506        <para>
5507          Add <literal>promote</> option to <application>pg_ctl</> to
5508          switch a standby server to primary (Fujii Masao)
5509        </para>
5510       </listitem>
5511
5512      </itemizedlist>
5513
5514     </sect4>
5515
5516    </sect3>
5517
5518    <sect3>
5519     <title><application>Development Tools</></title>
5520
5521     <sect4>
5522      <title><link linkend="libpq"><application>libpq</></link></title>
5523
5524      <itemizedlist>
5525
5526       <listitem>
5527        <para>
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)
5532        </para>
5533
5534        <para>
5535         The value <literal>auto</> sets the client encoding based on
5536         the operating system locale.
5537        </para>
5538       </listitem>
5539
5540       <listitem>
5541        <para>
5542         Add <link
5543         linkend="libpq-pqlibversion"><function>PQlibVersion()</></link>
5544         function which returns the libpq library version (Magnus
5545         Hagander)
5546        </para>
5547
5548        <para>
5549         libpq already had <function>PQserverVersion()</> which returns
5550         the server version.
5551        </para>
5552       </listitem>
5553
5554       <listitem>
5555        <para>
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>
5560         connection option
5561         (Peter Eisentraut)
5562        </para>
5563
5564        <para>
5565         <productname>PostgreSQL</> already allowed servers to check
5566         the client user name when connecting via Unix-domain sockets.
5567        </para>
5568       </listitem>
5569
5570       <listitem>
5571        <para>
5572         Add <link linkend="libpq-pqping"><function>PQping()</></link>
5573         and <link
5574         linkend="libpq-pqpingparams"><function>PQpingParams()</></link>
5575         to libpq (Bruce Momjian, Tom Lane)
5576        </para>
5577
5578        <para>
5579         These functions allow detection of the server's status without
5580         trying to open a new session.
5581        </para>
5582       </listitem>
5583
5584      </itemizedlist>
5585
5586     </sect4>
5587
5588     <sect4>
5589      <title><link linkend="ecpg"><application>ECPG</></link></title>
5590
5591      <itemizedlist>
5592
5593       <listitem>
5594        <para>
5595         Allow ECPG to accept dynamic cursor names even in
5596         <literal>WHERE CURRENT OF</literal> clauses
5597         (Zoltan Boszormenyi)
5598        </para>
5599       </listitem>
5600
5601       <listitem>
5602        <para>
5603         Make <application>ecpglib</> write <type>double</> values with a
5604         precision of 15 digits, not 14 as formerly (Akira Kurosawa)
5605        </para>
5606       </listitem>
5607
5608      </itemizedlist>
5609     </sect4>
5610
5611    </sect3>
5612
5613    <sect3>
5614     <title>Build Options</title>
5615
5616      <itemizedlist>
5617
5618       <listitem>
5619        <para>
5620         Use <literal>+Olibmerrno</> compile flag with HP-UX C compilers
5621         that accept it (Ibrar Ahmed)
5622        </para>
5623
5624        <para>
5625         This avoids possible misbehavior of math library calls on recent
5626         HP platforms.
5627        </para>
5628       </listitem>
5629
5630      </itemizedlist>
5631
5632     <sect4>
5633      <title>Makefiles</title>
5634
5635      <itemizedlist>
5636
5637       <listitem>
5638        <para>
5639         Improved parallel make support (Peter Eisentraut)
5640        </para>
5641
5642        <para>
5643         This allows for faster compiles.  Also, <literal>make -k</>
5644         now works more consistently.
5645        </para>
5646       </listitem>
5647
5648       <listitem>
5649        <para>
5650          Require <acronym>GNU</> <link
5651          linkend="install-requirements"><application>make</></link>
5652          3.80 or newer (Peter Eisentraut)
5653        </para>
5654
5655        <para>
5656         This is necessary because of the parallel-make improvements.
5657        </para>
5658       </listitem>
5659
5660       <listitem>
5661        <para>
5662         Add <literal>make maintainer-check</> target
5663         (Peter Eisentraut)
5664        </para>
5665
5666        <para>
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.
5670        </para>
5671       </listitem>
5672
5673       <listitem>
5674        <para>
5675         Support <literal>make check</> in <filename>contrib</>
5676         (Peter Eisentraut)
5677        </para>
5678
5679        <para>
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.
5684        </para>
5685       </listitem>
5686
5687      </itemizedlist>
5688
5689     </sect4>
5690
5691     <sect4>
5692      <title>Windows</title>
5693
5694      <itemizedlist>
5695
5696       <listitem>
5697        <para>
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)
5701        </para>
5702       </listitem>
5703
5704       <listitem>
5705        <para>
5706         Add support for collecting <link linkend="windows-crash-dumps">crash
5707         dumps</link> on Windows (Craig Ringer, Magnus Hagander)
5708        </para>
5709
5710        <para>
5711         <productname>minidumps</> can now be generated by non-debug
5712         Windows binaries and analyzed by standard debugging tools.
5713        </para>
5714       </listitem>
5715
5716       <listitem>
5717        <para>
5718         Enable building with the MinGW64 compiler (Andrew Dunstan)
5719        </para>
5720
5721        <para>
5722         This allows building 64-bit Windows binaries even on non-Windows
5723         platforms via cross-compiling.
5724        </para>
5725       </listitem>
5726
5727      </itemizedlist>
5728
5729     </sect4>
5730
5731    </sect3>
5732
5733    <sect3>
5734     <title>Source Code</title>
5735
5736      <itemizedlist>
5737
5738       <listitem>
5739        <para>
5740         Revise the API for GUC variable assign hooks (Tom Lane)
5741        </para>
5742
5743        <para>
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
5747         GUC parameters.
5748        </para>
5749       </listitem>
5750
5751       <listitem>
5752        <para>
5753         Add latches to the source code to support waiting for events (Heikki
5754         Linnakangas)
5755        </para>
5756       </listitem>
5757
5758       <listitem>
5759        <para>
5760          Centralize data modification permissions-checking logic
5761          (KaiGai Kohei)
5762        </para>
5763       </listitem>
5764
5765       <listitem>
5766        <para>
5767          Add missing <function>get_<replaceable>object</>_oid()</function> functions, for consistency
5768          (Robert Haas)
5769        </para>
5770       </listitem>
5771
5772       <listitem>
5773        <para>
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)
5777        </para>
5778       </listitem>
5779
5780       <listitem>
5781        <para>
5782          Add support for DragonFly <acronym>BSD</> (Rumko)
5783        </para>
5784       </listitem>
5785
5786       <listitem>
5787        <para>
5788          Expose <function>quote_literal_cstr()</> for backend use
5789          (Robert Haas)
5790        </para>
5791       </listitem>
5792
5793       <listitem>
5794        <para>
5795         Run <link linkend="build">regression tests</link> in the
5796         default encoding (Peter Eisentraut)
5797        </para>
5798
5799        <para>
5800         Regression tests were previously always run with
5801         <literal>SQL_ASCII</> encoding.
5802        </para>
5803       </listitem>
5804
5805       <listitem>
5806        <para>
5807          Add <application>src/tools/git_changelog</> to replace
5808          <application>cvs2cl</> and <application>pgcvslog</> (Robert
5809          Haas, Tom Lane)
5810        </para>
5811       </listitem>
5812
5813       <listitem>
5814        <para>
5815         Add <application>git-external-diff</> script to
5816         <filename>src/tools</> (Bruce Momjian)
5817        </para>
5818
5819        <para>
5820         This is used to generate context diffs from git.
5821        </para>
5822       </listitem>
5823
5824       <listitem>
5825        <para>
5826          Improve support for building with
5827          <application>Clang</application> (Peter Eisentraut)
5828        </para>
5829       </listitem>
5830
5831      </itemizedlist>
5832
5833     <sect4>
5834      <title>Server Hooks</title>
5835
5836      <itemizedlist>
5837
5838       <listitem>
5839        <para>
5840          Add source code hooks to check permissions (Robert Haas,
5841          Stephen Frost)
5842        </para>
5843       </listitem>
5844
5845       <listitem>
5846        <para>
5847          Add post-object-creation function hooks for use by security
5848          frameworks (KaiGai Kohei)
5849        </para>
5850       </listitem>
5851
5852       <listitem>
5853        <para>
5854          Add a client authentication hook (KaiGai Kohei)
5855        </para>
5856       </listitem>
5857
5858      </itemizedlist>
5859
5860     </sect4>
5861
5862    </sect3>
5863
5864    <sect3>
5865     <title>Contrib</title>
5866
5867     <itemizedlist>
5868
5869      <listitem>
5870       <para>
5871        Modify <filename>contrib</> modules and procedural
5872        languages to install via the new <link
5873        linkend="extend-extensions">extension</link> mechanism (Tom Lane,
5874        Dimitri Fontaine)
5875       </para>
5876      </listitem>
5877
5878      <listitem>
5879       <para>
5880        Add <link linkend="file-fdw"><filename>contrib/file_fdw</></link>
5881        foreign-data wrapper (Shigeru Hanada)
5882       </para>
5883
5884       <para>
5885        Foreign tables using this foreign data wrapper can read flat files
5886        in a manner very similar to <command>COPY</>.
5887       </para>
5888      </listitem>
5889
5890      <listitem>
5891       <para>
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>
5895         (Teodor Sigaev)
5896       </para>
5897      </listitem>
5898
5899      <listitem>
5900       <para>
5901         Add <link
5902         linkend="btree-gist"><filename>contrib/btree_gist</></link>
5903         support for searching on not-equals (Jeff Davis)
5904       </para>
5905      </listitem>
5906
5907      <listitem>
5908       <para>
5909         Fix <link
5910         linkend="fuzzystrmatch"><filename>contrib/fuzzystrmatch</></link>'s
5911         <function>levenshtein()</> function to handle multibyte characters
5912         (Alexander Korotkov)
5913       </para>
5914      </listitem>
5915
5916      <listitem>
5917       <para>
5918         Add <function>ssl_cipher()</> and <function>ssl_version()</>
5919         functions to <link
5920         linkend="sslinfo"><filename>contrib/sslinfo</></link> (Robert
5921         Haas)
5922       </para>
5923      </listitem>
5924
5925      <listitem>
5926       <para>
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)
5930       </para>
5931
5932       <para>
5933        Previously an empty-array query that used an index might return
5934        different results from one that used a sequential scan.
5935       </para>
5936      </listitem>
5937
5938      <listitem>
5939       <para>
5940        Allow <link linkend="intarray"><filename>contrib/intarray</></link>
5941        to work properly on multidimensional arrays (Tom Lane)
5942       </para>
5943      </listitem>
5944
5945      <listitem>
5946       <para>
5947        In
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)
5951       </para>
5952      </listitem>
5953
5954      <listitem>
5955       <para>
5956        In
5957        <link linkend="intarray"><filename>contrib/intarray</></link>,
5958        fix behavior of containment operators with respect to empty arrays
5959        (Tom Lane)
5960       </para>
5961
5962       <para>
5963        Empty arrays are now correctly considered to be contained in any other
5964        array.
5965       </para>
5966      </listitem>
5967
5968      <listitem>
5969       <para>
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)
5974       </para>
5975
5976       <para>
5977        The previous limit was 10.
5978       </para>
5979      </listitem>
5980
5981      <listitem>
5982       <para>
5983        In <link linkend="pageinspect"><filename>contrib/pageinspect</></link>,
5984        fix heap_page_item to return infomasks as 32-bit values (Alvaro Herrera)
5985       </para>
5986
5987       <para>
5988        This avoids returning negative values, which was confusing.  The
5989        underlying value is a 16-bit unsigned integer.
5990       </para>
5991      </listitem>
5992
5993     </itemizedlist>
5994
5995     <sect4>
5996      <title>Security</title>
5997
5998      <itemizedlist>
5999
6000       <listitem>
6001        <para>
6002         Add <link linkend="sepgsql"><filename>contrib/sepgsql</></link>
6003         to interface permission checks with <acronym>SELinux</> (KaiGai Kohei)
6004        </para>
6005
6006        <para>
6007         This uses the new <link
6008         linkend="SQL-SECURITY-LABEL"><command>SECURITY LABEL</></link>
6009         facility.
6010        </para>
6011       </listitem>
6012
6013       <listitem>
6014        <para>
6015         Add contrib module <link
6016         linkend="auth-delay"><filename>auth_delay</></link> (KaiGai
6017         Kohei)
6018        </para>
6019
6020        <para>
6021         This causes the server to pause before returning authentication
6022         failure;  it is designed to make brute force password attacks
6023         more difficult.
6024        </para>
6025       </listitem>
6026
6027       <listitem>
6028        <para>
6029         Add <link linkend="dummy-seclabel"><filename>dummy_seclabel</></link>
6030         contrib module (KaiGai Kohei)
6031        </para>
6032
6033        <para>
6034         This is used for permission regression testing.
6035        </para>
6036       </listitem>
6037
6038      </itemizedlist>
6039
6040     </sect4>
6041
6042     <sect4>
6043      <title>Performance</title>
6044
6045      <itemizedlist>
6046
6047       <listitem>
6048        <para>
6049          Add support for <literal>LIKE</> and <literal>ILIKE</> index
6050          searches to <link
6051          linkend="pgtrgm"><filename>contrib/pg_trgm</></link> (Alexander
6052          Korotkov)
6053        </para>
6054       </listitem>
6055
6056       <listitem>
6057        <para>
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)
6061        </para>
6062       </listitem>
6063
6064       <listitem>
6065        <para>
6066         Improve performance of index lookups on <link
6067         linkend="seg"><filename>contrib/seg</></link> columns (Alexander
6068         Korotkov)
6069        </para>
6070       </listitem>
6071
6072       <listitem>
6073        <para>
6074          Improve performance of <link
6075          linkend="pgupgrade"><application>pg_upgrade</></link> for
6076          databases with many relations (Bruce Momjian)
6077        </para>
6078       </listitem>
6079
6080       <listitem>
6081        <para>
6082          Add flag to <link
6083          linkend="pgbench"><filename>contrib/pgbench</></link> to
6084          report per-statement latencies (Florian Pflug)
6085        </para>
6086       </listitem>
6087
6088      </itemizedlist>
6089
6090     </sect4>
6091
6092     <sect4>
6093      <title>Fsync Testing</title>
6094
6095      <itemizedlist>
6096
6097       <listitem>
6098        <para>
6099          Move <filename>src/tools/test_fsync</> to <link
6100          linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link>
6101          (Bruce Momjian, Tom Lane)
6102        </para>
6103       </listitem>
6104
6105       <listitem>
6106        <para>
6107         Add <literal>O_DIRECT</> support to <link
6108         linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link>
6109         (Bruce Momjian)
6110        </para>
6111
6112        <para>
6113         This matches the use of <literal>O_DIRECT</> by <link
6114         linkend="guc-wal-sync-method"><varname>wal_sync_method</></link>.
6115        </para>
6116       </listitem>
6117
6118       <listitem>
6119        <para>
6120          Add new tests to <link
6121          linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link>
6122          (Bruce Momjian)
6123        </para>
6124       </listitem>
6125
6126      </itemizedlist>
6127
6128     </sect4>
6129
6130    </sect3>
6131
6132    <sect3>
6133     <title>Documentation</title>
6134
6135     <itemizedlist>
6136
6137      <listitem>
6138       <para>
6139         Extensive <link linkend="ecpg"><application>ECPG</></link>
6140         documentation improvements (Satoshi Nagayasu)
6141       </para>
6142      </listitem>
6143
6144      <listitem>
6145       <para>
6146         Extensive proofreading and documentation improvements
6147         (Thom Brown, Josh Kupershmidt, Susanne Ebrecht)
6148       </para>
6149      </listitem>
6150
6151      <listitem>
6152       <para>
6153        Add documentation for <link
6154        linkend="guc-exit-on-error"><varname>exit_on_error</></link>
6155        (Robert Haas)
6156       </para>
6157
6158       <para>
6159        This parameter causes sessions to exit on any error.
6160       </para>
6161      </listitem>
6162
6163      <listitem>
6164       <para>
6165        Add documentation for <link
6166        linkend="functions-info-catalog-table"><function>pg_options_to_table()</></link>
6167        (Josh Berkus)
6168       </para>
6169
6170       <para>
6171        This function shows table storage options in a readable form.
6172       </para>
6173      </listitem>
6174
6175      <listitem>
6176       <para>
6177        Document that it is possible to access all composite type
6178        fields using <link
6179        linkend="field-selection"><literal>(compositeval).*</></link>
6180        syntax (Peter Eisentraut)
6181       </para>
6182      </listitem>
6183
6184      <listitem>
6185       <para>
6186        Document that <link
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)
6190       </para>
6191      </listitem>
6192
6193      <listitem>
6194       <para>
6195        Merge documentation for <command>CREATE CONSTRAINT TRIGGER</> and <link
6196        linkend="SQL-CREATETRIGGER"><command>CREATE TRIGGER</></link>
6197        (Alvaro Herrera)
6198       </para>
6199      </listitem>
6200
6201      <listitem>
6202       <para>
6203        Centralize <link linkend="ddl-priv">permission</link> and <link
6204        linkend="upgrading">upgrade</link> documentation (Bruce Momjian)
6205       </para>
6206      </listitem>
6207
6208      <listitem>
6209       <para>
6210        Add <link linkend="sysvipc-parameters">kernel tuning
6211        documentation</link> for Solaris 10 (Josh Berkus)
6212       </para>
6213
6214       <para>
6215        Previously only Solaris 9 kernel tuning was documented.
6216       </para>
6217      </listitem>
6218
6219      <listitem>
6220       <para>
6221        Handle non-ASCII characters consistently in <filename>HISTORY</> file
6222        (Peter Eisentraut)
6223       </para>
6224
6225       <para>
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.
6230       </para>
6231      </listitem>
6232
6233     </itemizedlist>
6234
6235    </sect3>
6236
6237   </sect2>
6238  </sect1>