]> granicus.if.org Git - postgresql/blob - doc/src/sgml/release-9.1.sgml
577b9b852e62cf74ab58b4d29153434b22e4bd0a
[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-10">
5   <title>Release 9.1.10</title>
6
7   <note>
8   <title>Release Date</title>
9   <simpara>2013-10-10</simpara>
10   </note>
11
12   <para>
13    This release contains a variety of fixes from 9.1.9.
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.10</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.9,
27     see the release notes for 9.1.9.
28    </para>
29
30   </sect2>
31
32   <sect2>
33    <title>Changes</title>
34
35    <itemizedlist>
36
37     <listitem>
38      <para>
39       Prevent corruption of multi-byte characters when attempting to
40       case-fold identifiers (Andrew Dunstan)
41      </para>
42
43      <para>
44       <productname>PostgreSQL</> case-folds non-ASCII characters only
45       when using a single-byte server encoding.
46      </para>
47     </listitem>
48
49     <listitem>
50      <para>
51       Fix checkpoint memory leak in background writer when <literal>wal_level =
52       hot_standby</> (Naoya Anzai)
53      </para>
54     </listitem>
55
56     <listitem>
57      <para>
58       Fix memory leak caused by <function>lo_open()</function> failure
59       (Heikki Linnakangas)
60      </para>
61     </listitem>
62
63     <listitem>
64      <para>
65       Fix memory overcommit bug when <varname>work_mem</> is using more
66       than 24GB of memory (Stephen Frost)
67      </para>
68     </listitem>
69
70     <listitem>
71      <para>
72       Serializable snapshot fixes (Kevin Grittner, Heikki Linnakangas)
73      </para>
74     </listitem>
75
76     <listitem>
77      <para>
78       Fix deadlock bug in libpq when using SSL (Stephen Frost)
79      </para>
80     </listitem>
81
82     <listitem>
83      <para>
84       Fix possible SSL state corruption in threaded libpq applications
85       (Nick Phillips, Stephen Frost)
86      </para>
87     </listitem>
88
89     <listitem>
90      <para>
91       Properly compute row estimates for boolean columns containing many NULL
92       values (Andrew Gierth)
93      </para>
94
95      <para>
96       Previously tests like <literal>col IS NOT TRUE</> and <literal>col IS
97       NOT FALSE</> did not properly factor in NULL values when estimating
98       plan costs.
99      </para>
100     </listitem>
101
102     <listitem>
103      <para>
104       Prevent pushing down <literal>WHERE</> clauses into unsafe
105       <literal>UNION/INTERSECT</> subqueries (Tom Lane)
106      </para>
107
108      <para>
109       Subqueries of a <literal>UNION</> or <literal>INTERSECT</> that
110       contain set-returning functions or volatile functions in their
111       <literal>SELECT</> lists could be improperly optimized, leading to
112       run-time errors or incorrect query results.
113      </para>
114     </listitem>
115
116     <listitem>
117      <para>
118       Fix rare case of <quote>failed to locate grouping columns</>
119       planner failure (Tom Lane)
120      </para>
121     </listitem>
122
123     <listitem>
124      <para>
125       Fix <application>pg_dump</> of foreign tables with dropped columns (Andrew Dunstan)
126      </para>
127
128      <para>
129       Previously such cases could cause a <application>pg_upgrade</> error.
130      </para>
131     </listitem>
132
133     <listitem>
134      <para>
135       Reorder <application>pg_dump</> processing of extension-related
136       rules and event triggers (Joe Conway)
137      </para>
138     </listitem>
139
140     <listitem>
141      <para>
142       Force dumping of extension tables if specified by <command>pg_dump
143       -t</> or <literal>-n</> (Joe Conway)
144      </para>
145     </listitem>
146
147     <listitem>
148      <para>
149       Improve view dumping code's handling of dropped columns in referenced
150       tables (Tom Lane)
151      </para>
152     </listitem>
153
154     <listitem>
155      <para>
156       Fix <command>pg_restore -l</> with the directory archive to display
157       the correct format name (Fujii Masao)
158      </para>
159     </listitem>
160
161     <listitem>
162      <para>
163       Properly record index comments created using <literal>UNIQUE</>
164       and <literal>PRIMARY KEY</> syntax (Andres Freund)
165      </para>
166
167      <para>
168       This fixes a parallel <application>pg_restore</> failure.
169      </para>
170     </listitem>
171
172     <listitem>
173      <para>
174       Properly guarantee transmission of WAL files before clean switchover
175       (Fujii Masao)
176      </para>
177
178      <para>
179       Previously, the streaming replication connection might close before all
180       WAL files had been replayed on the standby.
181      </para>
182     </listitem>
183
184     <listitem>
185      <para>
186       Fix WAL segment timeline handling during recovery (Mitsumasa Kondo,
187       Heikki Linnakangas)
188      </para>
189
190      <para>
191       WAL file recycling during standby recovery could lead to premature
192       recovery completion, resulting in data loss.
193      </para>
194     </listitem>
195
196     <listitem>
197      <para>
198       Fix <command>REINDEX TABLE</> and <command>REINDEX DATABASE</>
199       to properly revalidate constraints and mark invalidated indexes as
200       valid (Noah Misch)
201      </para>
202
203      <para>
204       <command>REINDEX INDEX</> has always worked properly.
205      </para>
206     </listitem>
207
208     <listitem>
209      <para>
210       Fix possible deadlock during concurrent <command>CREATE INDEX
211       CONCURRENTLY</> operations (Tom Lane)
212      </para>
213     </listitem>
214
215     <listitem>
216      <para>
217       Fix <function>regexp_matches()</> handling of zero-length matches
218       (Jeevan Chalke)
219      </para>
220
221      <para>
222       Previously, zero-length matches like '^' could return too many matches.
223      </para>
224     </listitem>
225
226     <listitem>
227      <para>
228       Fix crash for overly-complex regular expressions (Heikki Linnakangas)
229      </para>
230     </listitem>
231
232     <listitem>
233      <para>
234       Fix regular expression match failures for back references combined with
235       non-greedy quantifiers (Jeevan Chalke)
236      </para>
237     </listitem>
238
239     <listitem>
240      <para>
241       Prevent <command>CREATE FUNCTION</> from checking <command>SET</>
242       variables unless function body checking is enabled (Tom Lane)
243      </para>
244     </listitem>
245
246     <listitem>
247      <para>
248       Allow <command>ALTER DEFAULT PRIVILEGES</> to operate on schemas
249       without requiring CREATE permission (Tom Lane)
250      </para>
251     </listitem>
252
253     <listitem>
254      <para>
255       Loosen restriction on keywords used in queries (Tom Lane)
256      </para>
257
258      <para>
259       Specifically, lessen keyword restrictions for role names, language
260       names, <command>EXPLAIN</> and <command>COPY</> options, and
261       <command>SET</> values.  This allows <literal>COPY ... (FORMAT
262       BINARY)</> to work as expected; previously <literal>BINARY</> needed
263       to be quoted.
264      </para>
265     </listitem>
266
267     <listitem>
268      <para>
269       Fix <function>pgp_pub_decrypt()</> so it works for secret keys with
270       passwords (Marko Kreen)
271      </para>
272     </listitem>
273
274     <listitem>
275      <para>
276       Make <application>pg_upgrade</> use <literal>pg_dump
277       --quote-all-identifiers</> to avoid problems with keyword changes
278       between releases (Tom Lane)
279      </para>
280     </listitem>
281
282     <listitem>
283      <para>
284       Remove rare inaccurate warning during vacuum of index-less tables
285       (Heikki Linnakangas)
286      </para>
287     </listitem>
288
289     <listitem>
290      <para>
291       Ensure that <command>VACUUM ANALYZE</> still runs the ANALYZE phase
292       if its attempt to truncate the file is cancelled due to lock conflicts
293       (Kevin Grittner)
294      </para>
295     </listitem>
296
297     <listitem>
298      <para>
299       Avoid possible failure when performing transaction control commands (e.g
300       <command>ROLLBACK</>) in prepared queries (Tom Lane)
301      </para>
302     </listitem>
303
304     <listitem>
305      <para>
306       Ensure that floating-point data input accepts standard spellings
307       of <quote>infinity</> on all platforms (Tom Lane)
308      </para>
309
310      <para>
311       The C99 standard says that allowable spellings are <literal>inf</>,
312       <literal>+inf</>, <literal>-inf</>, <literal>infinity</>,
313       <literal>+infinity</>, and <literal>-infinity</>.  Make sure we
314       recognize these even if the platform's <function>strtod</> function
315       doesn't.
316      </para>
317     </listitem>
318
319     <listitem>
320      <para>
321       Expand ability to compare rows to records and arrays (Rafal Rzepecki,
322       Tom Lane)
323      </para>
324     </listitem>
325
326     <listitem>
327      <para>
328       Update time zone data files to <application>tzdata</> release 2013d
329       for DST law changes in Israel, Morocco, Palestine, and Paraguay.
330       Also, historical zone data corrections for Macquarie Island.
331      </para>
332     </listitem>
333
334    </itemizedlist>
335
336   </sect2>
337  </sect1>
338
339  <sect1 id="release-9-1-9">
340   <title>Release 9.1.9</title>
341
342   <note>
343   <title>Release Date</title>
344   <simpara>2013-04-04</simpara>
345   </note>
346
347   <para>
348    This release contains a variety of fixes from 9.1.8.
349    For information about new features in the 9.1 major release, see
350    <xref linkend="release-9-1">.
351   </para>
352
353   <sect2>
354    <title>Migration to Version 9.1.9</title>
355
356    <para>
357     A dump/restore is not required for those running 9.1.X.
358    </para>
359
360    <para>
361     However, this release corrects several errors in management of GiST
362     indexes.  After installing this update, it is advisable to
363     <command>REINDEX</> any GiST indexes that meet one or more of the
364     conditions described below.
365    </para>
366
367    <para>
368     Also, if you are upgrading from a version earlier than 9.1.6,
369     see the release notes for 9.1.6.
370    </para>
371
372   </sect2>
373
374   <sect2>
375    <title>Changes</title>
376
377    <itemizedlist>
378
379     <listitem>
380      <para>
381       Fix insecure parsing of server command-line switches (Mitsumasa
382       Kondo, Kyotaro Horiguchi)
383      </para>
384
385      <para>
386       A connection request containing a database name that begins with
387       <quote><literal>-</></quote> could be crafted to damage or destroy
388       files within the server's data directory, even if the request is
389       eventually rejected.  (CVE-2013-1899)
390      </para>
391     </listitem>
392
393     <listitem>
394      <para>
395       Reset OpenSSL randomness state in each postmaster child process
396       (Marko Kreen)
397      </para>
398
399      <para>
400       This avoids a scenario wherein random numbers generated by
401       <filename>contrib/pgcrypto</> functions might be relatively easy for
402       another database user to guess.  The risk is only significant when
403       the postmaster is configured with <varname>ssl</> = <literal>on</>
404       but most connections don't use SSL encryption.  (CVE-2013-1900)
405      </para>
406     </listitem>
407
408     <listitem>
409      <para>
410       Make REPLICATION privilege checks test current user not authenticated
411       user (Noah Misch)
412      </para>
413
414      <para>
415       An unprivileged database user could exploit this mistake to call
416       <function>pg_start_backup()</> or <function>pg_stop_backup()</>,
417       thus possibly interfering with creation of routine backups.
418       (CVE-2013-1901)
419      </para>
420     </listitem>
421
422     <listitem>
423      <para>
424       Fix GiST indexes to not use <quote>fuzzy</> geometric comparisons when
425       it's not appropriate to do so (Alexander Korotkov)
426      </para>
427
428      <para>
429       The core geometric types perform comparisons using <quote>fuzzy</>
430       equality, but <function>gist_box_same</> must do exact comparisons,
431       else GiST indexes using it might become inconsistent.  After installing
432       this update, users should <command>REINDEX</> any GiST indexes on
433       <type>box</>, <type>polygon</>, <type>circle</>, or <type>point</>
434       columns, since all of these use <function>gist_box_same</>.
435      </para>
436     </listitem>
437
438     <listitem>
439      <para>
440       Fix erroneous range-union and penalty logic in GiST indexes that use
441       <filename>contrib/btree_gist</> for variable-width data types, that is
442       <type>text</>, <type>bytea</>, <type>bit</>, and <type>numeric</>
443       columns (Tom Lane)
444      </para>
445
446      <para>
447       These errors could result in inconsistent indexes in which some keys
448       that are present would not be found by searches, and also in useless
449       index bloat.  Users are advised to <command>REINDEX</> such indexes
450       after installing this update.
451      </para>
452     </listitem>
453
454     <listitem>
455      <para>
456       Fix bugs in GiST page splitting code for multi-column indexes
457       (Tom Lane)
458      </para>
459
460      <para>
461       These errors could result in inconsistent indexes in which some keys
462       that are present would not be found by searches, and also in indexes
463       that are unnecessarily inefficient to search.  Users are advised to
464       <command>REINDEX</> multi-column GiST indexes after installing this
465       update.
466      </para>
467     </listitem>
468
469     <listitem>
470      <para>
471       Fix <function>gist_point_consistent</>
472       to handle fuzziness consistently (Alexander Korotkov)
473      </para>
474
475      <para>
476       Index scans on GiST indexes on <type>point</> columns would sometimes
477       yield results different from a sequential scan, because
478       <function>gist_point_consistent</> disagreed with the underlying
479       operator code about whether to do comparisons exactly or fuzzily.
480      </para>
481     </listitem>
482
483     <listitem>
484      <para>
485       Fix buffer leak in WAL replay (Heikki Linnakangas)
486      </para>
487
488      <para>
489       This bug could result in <quote>incorrect local pin count</> errors
490       during replay, making recovery impossible.
491      </para>
492     </listitem>
493
494     <listitem>
495      <para>
496       Fix race condition in <command>DELETE RETURNING</> (Tom Lane)
497      </para>
498
499      <para>
500       Under the right circumstances, <command>DELETE RETURNING</> could
501       attempt to fetch data from a shared buffer that the current process
502       no longer has any pin on.  If some other process changed the buffer
503       meanwhile, this would lead to garbage <literal>RETURNING</> output, or
504       even a crash.
505      </para>
506     </listitem>
507
508     <listitem>
509      <para>
510       Fix infinite-loop risk in regular expression compilation (Tom Lane,
511       Don Porter)
512      </para>
513     </listitem>
514
515     <listitem>
516      <para>
517       Fix potential null-pointer dereference in regular expression compilation
518       (Tom Lane)
519      </para>
520     </listitem>
521
522     <listitem>
523      <para>
524       Fix <function>to_char()</> to use ASCII-only case-folding rules where
525       appropriate (Tom Lane)
526      </para>
527
528      <para>
529       This fixes misbehavior of some template patterns that should be
530       locale-independent, but mishandled <quote><literal>I</></quote> and
531       <quote><literal>i</></quote> in Turkish locales.
532      </para>
533     </listitem>
534
535     <listitem>
536      <para>
537       Fix unwanted rejection of timestamp <literal>1999-12-31 24:00:00</>
538       (Tom Lane)
539      </para>
540     </listitem>
541
542     <listitem>
543      <para>
544       Fix logic error when a single transaction does <command>UNLISTEN</>
545       then <command>LISTEN</> (Tom Lane)
546      </para>
547
548      <para>
549       The session wound up not listening for notify events at all, though it
550       surely should listen in this case.
551      </para>
552     </listitem>
553
554     <listitem>
555      <para>
556       Fix possible planner crash after columns have been added to a view
557       that's depended on by another view (Tom Lane)
558      </para>
559     </listitem>
560
561     <listitem>
562      <para>
563       Remove useless <quote>picksplit doesn't support secondary split</> log
564       messages (Josh Hansen, Tom Lane)
565      </para>
566
567      <para>
568       This message seems to have been added in expectation of code that was
569       never written, and probably never will be, since GiST's default
570       handling of secondary splits is actually pretty good.  So stop nagging
571       end users about it.
572      </para>
573     </listitem>
574
575     <listitem>
576      <para>
577       Fix possible failure to send a session's last few transaction
578       commit/abort counts to the statistics collector (Tom Lane)
579      </para>
580     </listitem>
581
582     <listitem>
583      <para>
584       Eliminate memory leaks in PL/Perl's <function>spi_prepare()</> function
585       (Alex Hunsaker, Tom Lane)
586      </para>
587     </listitem>
588
589     <listitem>
590      <para>
591       Fix <application>pg_dumpall</> to handle database names containing
592       <quote><literal>=</></quote> correctly (Heikki Linnakangas)
593      </para>
594     </listitem>
595
596     <listitem>
597      <para>
598       Avoid crash in <application>pg_dump</> when an incorrect connection
599       string is given (Heikki Linnakangas)
600      </para>
601     </listitem>
602
603     <listitem>
604      <para>
605       Ignore invalid indexes in <application>pg_dump</> and
606       <application>pg_upgrade</> (Michael Paquier, Bruce Momjian)
607      </para>
608
609      <para>
610       Dumping invalid indexes can cause problems at restore time, for example
611       if the reason the index creation failed was because it tried to enforce
612       a uniqueness condition not satisfied by the table's data.  Also, if the
613       index creation is in fact still in progress, it seems reasonable to
614       consider it to be an uncommitted DDL change, which
615       <application>pg_dump</> wouldn't be expected to dump anyway.
616       <application>pg_upgrade</> now also skips invalid indexes rather than
617       failing.
618      </para>
619     </listitem>
620
621     <listitem>
622      <para>
623       In <application>pg_basebackup</>, include only the current server
624       version's subdirectory when backing up a tablespace (Heikki
625       Linnakangas)
626      </para>
627     </listitem>
628
629     <listitem>
630      <para>
631       Add a server version check in <application>pg_basebackup</> and
632       <application>pg_receivexlog</>, so they fail cleanly with version
633       combinations that won't work (Heikki Linnakangas)
634      </para>
635     </listitem>
636
637     <listitem>
638      <para>
639       Fix <filename>contrib/pg_trgm</>'s <function>similarity()</> function
640       to return zero for trigram-less strings (Tom Lane)
641      </para>
642
643      <para>
644       Previously it returned <literal>NaN</> due to internal division by zero.
645      </para>
646     </listitem>
647
648     <listitem>
649      <para>
650       Update time zone data files to <application>tzdata</> release 2013b
651       for DST law changes in Chile, Haiti, Morocco, Paraguay, and some
652       Russian areas.  Also, historical zone data corrections for numerous
653       places.
654      </para>
655
656      <para>
657       Also, update the time zone abbreviation files for recent changes in
658       Russia and elsewhere: <literal>CHOT</>, <literal>GET</>,
659       <literal>IRKT</>, <literal>KGT</>, <literal>KRAT</>, <literal>MAGT</>,
660       <literal>MAWT</>, <literal>MSK</>, <literal>NOVT</>, <literal>OMST</>,
661       <literal>TKT</>, <literal>VLAT</>, <literal>WST</>, <literal>YAKT</>,
662       <literal>YEKT</> now follow their current meanings, and
663       <literal>VOLT</> (Europe/Volgograd) and <literal>MIST</>
664       (Antarctica/Macquarie) are added to the default abbreviations list.
665      </para>
666     </listitem>
667
668    </itemizedlist>
669
670   </sect2>
671  </sect1>
672
673  <sect1 id="release-9-1-8">
674   <title>Release 9.1.8</title>
675
676   <note>
677   <title>Release Date</title>
678   <simpara>2013-02-07</simpara>
679   </note>
680
681   <para>
682    This release contains a variety of fixes from 9.1.7.
683    For information about new features in the 9.1 major release, see
684    <xref linkend="release-9-1">.
685   </para>
686
687   <sect2>
688    <title>Migration to Version 9.1.8</title>
689
690    <para>
691     A dump/restore is not required for those running 9.1.X.
692    </para>
693
694    <para>
695     However, if you are upgrading from a version earlier than 9.1.6,
696     see the release notes for 9.1.6.
697    </para>
698
699   </sect2>
700
701   <sect2>
702    <title>Changes</title>
703
704    <itemizedlist>
705
706     <listitem>
707      <para>
708       Prevent execution of <function>enum_recv</> from SQL (Tom Lane)
709      </para>
710
711      <para>
712       The function was misdeclared, allowing a simple SQL command to crash the
713       server.  In principle an attacker might be able to use it to examine the
714       contents of server memory.  Our thanks to Sumit Soni (via Secunia SVCRP)
715       for reporting this issue.  (CVE-2013-0255)
716      </para>
717     </listitem>
718
719     <listitem>
720      <para>
721       Fix multiple problems in detection of when a consistent database
722       state has been reached during WAL replay (Fujii Masao, Heikki
723       Linnakangas, Simon Riggs, Andres Freund)
724      </para>
725     </listitem>
726
727     <listitem>
728      <para>
729       Update minimum recovery point when truncating a relation file (Heikki
730       Linnakangas)
731      </para>
732
733      <para>
734       Once data has been discarded, it's no longer safe to stop recovery at
735       an earlier point in the timeline.
736      </para>
737     </listitem>
738
739     <listitem>
740      <para>
741       Fix recycling of WAL segments after changing recovery target timeline
742       (Heikki Linnakangas)
743      </para>
744     </listitem>
745
746     <listitem>
747      <para>
748       Fix missing cancellations in hot standby mode (Noah Misch, Simon Riggs)
749      </para>
750
751      <para>
752       The need to cancel conflicting hot-standby queries would sometimes be
753       missed, allowing those queries to see inconsistent data.
754      </para>
755     </listitem>
756
757     <listitem>
758      <para>
759       Prevent recovery pause feature from pausing before users can connect
760       (Tom Lane)
761      </para>
762     </listitem>
763
764     <listitem>
765      <para>
766       Fix SQL grammar to allow subscripting or field selection from a
767       sub-SELECT result (Tom Lane)
768      </para>
769     </listitem>
770
771     <listitem>
772      <para>
773       Fix performance problems with autovacuum truncation in busy workloads
774       (Jan Wieck)
775      </para>
776
777      <para>
778       Truncation of empty pages at the end of a table requires exclusive
779       lock, but autovacuum was coded to fail (and release the table lock)
780       when there are conflicting lock requests.  Under load, it is easily
781       possible that truncation would never occur, resulting in table bloat.
782       Fix by performing a partial truncation, releasing the lock, then
783       attempting to re-acquire the lock and continue.  This fix also greatly
784       reduces the average time before autovacuum releases the lock after a
785       conflicting request arrives.
786      </para>
787     </listitem>
788
789     <listitem>
790      <para>
791       Protect against race conditions when scanning
792       <structname>pg_tablespace</> (Stephen Frost, Tom Lane)
793      </para>
794
795      <para>
796       <command>CREATE DATABASE</> and <command>DROP DATABASE</> could
797       misbehave if there were concurrent updates of
798       <structname>pg_tablespace</> entries.
799      </para>
800     </listitem>
801
802     <listitem>
803      <para>
804       Prevent <command>DROP OWNED</> from trying to drop whole databases or
805       tablespaces (&Aacute;lvaro Herrera)
806      </para>
807
808      <para>
809       For safety, ownership of these objects must be reassigned, not dropped.
810      </para>
811     </listitem>
812
813     <listitem>
814      <para>
815       Fix error in <link
816       linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link>
817       implementation (Andres Freund)
818      </para>
819
820      <para>
821       In installations that have existed for more than <link
822       linkend="guc-vacuum-freeze-min-age"><varname>vacuum_freeze_min_age</></link>
823       transactions, this mistake prevented autovacuum from using partial-table
824       scans, so that a full-table scan would always happen instead.
825      </para>
826     </listitem>
827
828     <listitem>
829      <para>
830       Prevent misbehavior when a <symbol>RowExpr</> or <symbol>XmlExpr</>
831       is parse-analyzed twice (Andres Freund, Tom Lane)
832      </para>
833
834      <para>
835       This mistake could be user-visible in contexts such as
836       <literal>CREATE TABLE LIKE INCLUDING INDEXES</>.
837      </para>
838     </listitem>
839
840     <listitem>
841      <para>
842       Improve defenses against integer overflow in hashtable sizing
843       calculations (Jeff Davis)
844      </para>
845     </listitem>
846
847     <listitem>
848      <para>
849       Fix failure to ignore leftover temporary tables after a server crash
850       (Tom Lane)
851      </para>
852     </listitem>
853
854     <listitem>
855      <para>
856       Reject out-of-range dates in <function>to_date()</> (Hitoshi Harada)
857      </para>
858     </listitem>
859
860     <listitem>
861      <para>
862       Fix <function>pg_extension_config_dump()</> to handle
863       extension-update cases properly (Tom Lane)
864      </para>
865
866      <para>
867       This function will now replace any existing entry for the target
868       table, making it usable in extension update scripts.
869      </para>
870     </listitem>
871
872     <listitem>
873      <para>
874       Fix PL/Python's handling of functions used as triggers on multiple
875       tables (Andres Freund)
876      </para>
877     </listitem>
878
879     <listitem>
880      <para>
881       Ensure that non-ASCII prompt strings are translated to the correct
882       code page on Windows (Alexander Law, Noah Misch)
883      </para>
884
885      <para>
886       This bug affected <application>psql</> and some other client programs.
887      </para>
888     </listitem>
889
890     <listitem>
891      <para>
892       Fix possible crash in <application>psql</>'s <command>\?</> command
893       when not connected to a database (Meng Qingzhong)
894      </para>
895     </listitem>
896
897     <listitem>
898      <para>
899       Fix possible error if a relation file is removed while
900       <application>pg_basebackup</> is running (Heikki Linnakangas)
901      </para>
902     </listitem>
903
904     <listitem>
905      <para>
906       Make <application>pg_dump</> exclude data of unlogged tables when
907       running on a hot-standby server (Magnus Hagander)
908      </para>
909
910      <para>
911       This would fail anyway because the data is not available on the standby
912       server, so it seems most convenient to assume
913       <option>--no-unlogged-table-data</> automatically.
914      </para>
915     </listitem>
916
917     <listitem>
918      <para>
919       Fix <application>pg_upgrade</> to deal with invalid indexes safely
920       (Bruce Momjian)
921      </para>
922     </listitem>
923
924     <listitem>
925      <para>
926       Fix one-byte buffer overrun in <application>libpq</>'s
927       <function>PQprintTuples</> (Xi Wang)
928      </para>
929
930      <para>
931       This ancient function is not used anywhere by
932       <productname>PostgreSQL</> itself, but it might still be used by some
933       client code.
934      </para>
935     </listitem>
936
937     <listitem>
938      <para>
939       Make <application>ecpglib</> use translated messages properly
940       (Chen Huajun)
941      </para>
942     </listitem>
943
944     <listitem>
945      <para>
946       Properly install <application>ecpg_compat</> and
947       <application>pgtypes</> libraries on MSVC (Jiang Guiqing)
948      </para>
949     </listitem>
950
951     <listitem>
952      <para>
953       Include our version of <function>isinf()</> in
954       <application>libecpg</> if it's not provided by the system
955       (Jiang Guiqing)
956      </para>
957     </listitem>
958
959     <listitem>
960      <para>
961       Rearrange configure's tests for supplied functions so it is not
962       fooled by bogus exports from libedit/libreadline (Christoph Berg)
963      </para>
964     </listitem>
965
966     <listitem>
967      <para>
968       Ensure Windows build number increases over time (Magnus Hagander)
969      </para>
970     </listitem>
971
972     <listitem>
973      <para>
974       Make <application>pgxs</> build executables with the right
975       <literal>.exe</> suffix when cross-compiling for Windows
976       (Zoltan Boszormenyi)
977      </para>
978     </listitem>
979
980     <listitem>
981      <para>
982       Add new timezone abbreviation <literal>FET</> (Tom Lane)
983      </para>
984
985      <para>
986       This is now used in some eastern-European time zones.
987      </para>
988     </listitem>
989
990    </itemizedlist>
991
992   </sect2>
993  </sect1>
994
995  <sect1 id="release-9-1-7">
996   <title>Release 9.1.7</title>
997
998   <note>
999   <title>Release Date</title>
1000   <simpara>2012-12-06</simpara>
1001   </note>
1002
1003   <para>
1004    This release contains a variety of fixes from 9.1.6.
1005    For information about new features in the 9.1 major release, see
1006    <xref linkend="release-9-1">.
1007   </para>
1008
1009   <sect2>
1010    <title>Migration to Version 9.1.7</title>
1011
1012    <para>
1013     A dump/restore is not required for those running 9.1.X.
1014    </para>
1015
1016    <para>
1017     However, if you are upgrading from a version earlier than 9.1.6,
1018     see the release notes for 9.1.6.
1019    </para>
1020
1021   </sect2>
1022
1023   <sect2>
1024    <title>Changes</title>
1025
1026    <itemizedlist>
1027
1028     <listitem>
1029      <para>
1030       Fix multiple bugs associated with <command>CREATE INDEX
1031       CONCURRENTLY</> (Andres Freund, Tom Lane)
1032      </para>
1033
1034      <para>
1035       Fix <command>CREATE INDEX CONCURRENTLY</> to use
1036       in-place updates when changing the state of an index's
1037       <structname>pg_index</> row.  This prevents race conditions that could
1038       cause concurrent sessions to miss updating the target index, thus
1039       resulting in corrupt concurrently-created indexes.
1040      </para>
1041
1042      <para>
1043       Also, fix various other operations to ensure that they ignore
1044       invalid indexes resulting from a failed <command>CREATE INDEX
1045       CONCURRENTLY</> command.  The most important of these is
1046       <command>VACUUM</>, because an auto-vacuum could easily be launched
1047       on the table before corrective action can be taken to fix or remove
1048       the invalid index.
1049      </para>
1050     </listitem>
1051
1052     <listitem>
1053      <para>
1054       Fix buffer locking during WAL replay (Tom Lane)
1055      </para>
1056
1057      <para>
1058       The WAL replay code was insufficiently careful about locking buffers
1059       when replaying WAL records that affect more than one page.  This could
1060       result in hot standby queries transiently seeing inconsistent states,
1061       resulting in wrong answers or unexpected failures.
1062      </para>
1063     </listitem>
1064
1065     <listitem>
1066      <para>
1067       Fix an error in WAL generation logic for GIN indexes (Tom Lane)
1068      </para>
1069
1070      <para>
1071       This could result in index corruption, if a torn-page failure occurred.
1072      </para>
1073     </listitem>
1074
1075     <listitem>
1076      <para>
1077       Properly remove startup process's virtual XID lock when promoting a
1078       hot standby server to normal running (Simon Riggs)
1079      </para>
1080
1081      <para>
1082       This oversight could prevent subsequent execution of certain
1083       operations such as <command>CREATE INDEX CONCURRENTLY</>.
1084      </para>
1085     </listitem>
1086
1087     <listitem>
1088      <para>
1089       Avoid bogus <quote>out-of-sequence timeline ID</> errors in standby
1090       mode (Heikki Linnakangas)
1091      </para>
1092     </listitem>
1093
1094     <listitem>
1095      <para>
1096       Prevent the postmaster from launching new child processes after it's
1097       received a shutdown signal (Tom Lane)
1098      </para>
1099
1100      <para>
1101       This mistake could result in shutdown taking longer than it should, or
1102       even never completing at all without additional user action.
1103      </para>
1104     </listitem>
1105
1106     <listitem>
1107      <para>
1108       Avoid corruption of internal hash tables when out of memory
1109       (Hitoshi Harada)
1110      </para>
1111     </listitem>
1112
1113     <listitem>
1114      <para>
1115       Prevent file descriptors for dropped tables from being held open past
1116       transaction end (Tom Lane)
1117      </para>
1118
1119      <para>
1120       This should reduce problems with long-since-dropped tables continuing
1121       to occupy disk space.
1122      </para>
1123     </listitem>
1124
1125     <listitem>
1126      <para>
1127       Prevent database-wide crash and restart when a new child process is
1128       unable to create a pipe for its latch (Tom Lane)
1129      </para>
1130
1131      <para>
1132       Although the new process must fail, there is no good reason to force a
1133       database-wide restart, so avoid that.  This improves robustness when
1134       the kernel is nearly out of file descriptors.
1135      </para>
1136     </listitem>
1137
1138     <listitem>
1139      <para>
1140       Fix planning of non-strict equivalence clauses above outer joins
1141       (Tom Lane)
1142      </para>
1143
1144      <para>
1145       The planner could derive incorrect constraints from a clause equating
1146       a non-strict construct to something else, for example
1147       <literal>WHERE COALESCE(foo, 0) = 0</>
1148       when <literal>foo</> is coming from the nullable side of an outer join.
1149      </para>
1150     </listitem>
1151
1152     <listitem>
1153      <para>
1154       Fix <command>SELECT DISTINCT</> with index-optimized
1155       <function>MIN</>/<function>MAX</> on an inheritance tree (Tom Lane)
1156      </para>
1157
1158      <para>
1159       The planner would fail with <quote>failed to re-find MinMaxAggInfo
1160       record</> given this combination of factors.
1161      </para>
1162     </listitem>
1163
1164     <listitem>
1165      <para>
1166       Improve planner's ability to prove exclusion constraints from
1167       equivalence classes (Tom Lane)
1168      </para>
1169     </listitem>
1170
1171     <listitem>
1172      <para>
1173       Fix partial-row matching in hashed subplans to handle cross-type cases
1174       correctly (Tom Lane)
1175      </para>
1176
1177      <para>
1178       This affects multicolumn <literal>NOT IN</> subplans, such as
1179       <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</>
1180       when for instance <literal>b</> and <literal>y</> are <type>int4</>
1181       and <type>int8</> respectively.  This mistake led to wrong answers
1182       or crashes depending on the specific datatypes involved.
1183      </para>
1184     </listitem>
1185
1186     <listitem>
1187      <para>
1188       Acquire buffer lock when re-fetching the old tuple for an
1189       <literal>AFTER ROW UPDATE/DELETE</> trigger (Andres Freund)
1190      </para>
1191
1192      <para>
1193       In very unusual circumstances, this oversight could result in passing
1194       incorrect data to a trigger <literal>WHEN</> condition, or to the
1195       precheck logic for a foreign-key enforcement trigger.  That could
1196       result in a crash, or in an incorrect decision about whether to
1197       fire the trigger.
1198      </para>
1199     </listitem>
1200
1201     <listitem>
1202      <para>
1203       Fix <command>ALTER COLUMN TYPE</> to handle inherited check
1204       constraints properly (Pavan Deolasee)
1205      </para>
1206
1207      <para>
1208       This worked correctly in pre-8.4 releases, and now works correctly
1209       in 8.4 and later.
1210      </para>
1211     </listitem>
1212
1213     <listitem>
1214      <para>
1215       Fix <command>ALTER EXTENSION SET SCHEMA</>'s failure  to move some
1216       subsidiary objects into the new schema (&Aacute;lvaro Herrera, Dimitri
1217       Fontaine)
1218      </para>
1219     </listitem>
1220
1221     <listitem>
1222      <para>
1223       Fix <command>REASSIGN OWNED</> to handle grants on tablespaces
1224       (&Aacute;lvaro Herrera)
1225      </para>
1226     </listitem>
1227
1228     <listitem>
1229      <para>
1230       Ignore incorrect <structname>pg_attribute</> entries for system
1231       columns for views (Tom Lane)
1232      </para>
1233
1234      <para>
1235       Views do not have any system columns.  However, we forgot to
1236       remove such entries when converting a table to a view.  That's fixed
1237       properly for 9.3 and later, but in previous branches we need to defend
1238       against existing mis-converted views.
1239      </para>
1240     </listitem>
1241
1242     <listitem>
1243      <para>
1244       Fix rule printing to dump <literal>INSERT INTO <replaceable>table</>
1245       DEFAULT VALUES</literal> correctly (Tom Lane)
1246      </para>
1247     </listitem>
1248
1249     <listitem>
1250      <para>
1251       Guard against stack overflow when there are too many
1252       <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> clauses
1253       in a query (Tom Lane)
1254      </para>
1255     </listitem>
1256
1257     <listitem>
1258      <para>
1259       Prevent platform-dependent failures when dividing the minimum possible
1260       integer value by -1 (Xi Wang, Tom Lane)
1261      </para>
1262     </listitem>
1263
1264     <listitem>
1265      <para>
1266       Fix possible access past end of string in date parsing
1267       (Hitoshi Harada)
1268      </para>
1269     </listitem>
1270
1271     <listitem>
1272      <para>
1273       Fix failure to advance XID epoch if XID wraparound happens during a
1274       checkpoint and <varname>wal_level</> is <literal>hot_standby</>
1275       (Tom Lane, Andres Freund)
1276      </para>
1277
1278      <para>
1279       While this mistake had no particular impact on
1280       <productname>PostgreSQL</productname> itself, it was bad for
1281       applications that rely on <function>txid_current()</> and related
1282       functions: the TXID value would appear to go backwards.
1283      </para>
1284     </listitem>
1285
1286     <listitem>
1287      <para>
1288       Fix display of
1289       <structname>pg_stat_replication</>.<structfield>sync_state</> at a
1290       page boundary (Kyotaro Horiguchi)
1291      </para>
1292     </listitem>
1293
1294     <listitem>
1295      <para>
1296       Produce an understandable error message if the length of the path name
1297       for a Unix-domain socket exceeds the platform-specific limit
1298       (Tom Lane, Andrew Dunstan)
1299      </para>
1300
1301      <para>
1302       Formerly, this would result in something quite unhelpful, such as
1303       <quote>Non-recoverable failure in name resolution</>.
1304      </para>
1305     </listitem>
1306
1307     <listitem>
1308      <para>
1309       Fix memory leaks when sending composite column values to the client
1310       (Tom Lane)
1311      </para>
1312     </listitem>
1313
1314     <listitem>
1315      <para>
1316       Make <application>pg_ctl</> more robust about reading the
1317       <filename>postmaster.pid</> file (Heikki Linnakangas)
1318      </para>
1319
1320      <para>
1321       Fix race conditions and possible file descriptor leakage.
1322      </para>
1323     </listitem>
1324
1325     <listitem>
1326      <para>
1327       Fix possible crash in <application>psql</> if incorrectly-encoded data
1328       is presented and the <varname>client_encoding</> setting is a
1329       client-only encoding, such as SJIS (Jiang Guiqing)
1330      </para>
1331     </listitem>
1332
1333     <listitem>
1334      <para>
1335       Make <application>pg_dump</> dump <literal>SEQUENCE SET</> items in
1336       the data not pre-data section of the archive (Tom Lane)
1337      </para>
1338
1339      <para>
1340       This change fixes dumping of sequences that are marked as extension
1341       configuration tables.
1342      </para>
1343     </listitem>
1344
1345     <listitem>
1346      <para>
1347       Fix bugs in the <filename>restore.sql</> script emitted by
1348       <application>pg_dump</> in <literal>tar</> output format (Tom Lane)
1349      </para>
1350
1351      <para>
1352       The script would fail outright on tables whose names include
1353       upper-case characters.  Also, make the script capable of restoring
1354       data in <option>--inserts</> mode as well as the regular COPY mode.
1355      </para>
1356     </listitem>
1357
1358     <listitem>
1359      <para>
1360       Fix <application>pg_restore</> to accept POSIX-conformant
1361       <literal>tar</> files (Brian Weaver, Tom Lane)
1362      </para>
1363
1364      <para>
1365       The original coding of <application>pg_dump</>'s <literal>tar</>
1366       output mode produced files that are not fully conformant with the
1367       POSIX standard.  This has been corrected for version 9.3.  This
1368       patch updates previous branches so that they will accept both the
1369       incorrect and the corrected formats, in hopes of avoiding
1370       compatibility problems when 9.3 comes out.
1371      </para>
1372     </listitem>
1373
1374     <listitem>
1375      <para>
1376       Fix <literal>tar</> files emitted by <application>pg_basebackup</> to
1377       be POSIX conformant (Brian Weaver, Tom Lane)
1378      </para>
1379     </listitem>
1380
1381     <listitem>
1382      <para>
1383       Fix <application>pg_resetxlog</> to locate <filename>postmaster.pid</>
1384       correctly when given a relative path to the data directory (Tom Lane)
1385      </para>
1386
1387      <para>
1388       This mistake could lead to <application>pg_resetxlog</> not noticing
1389       that there is an active postmaster using the data directory.
1390      </para>
1391     </listitem>
1392
1393     <listitem>
1394      <para>
1395       Fix <application>libpq</>'s <function>lo_import()</> and
1396       <function>lo_export()</> functions to report file I/O errors properly
1397       (Tom Lane)
1398      </para>
1399     </listitem>
1400
1401     <listitem>
1402      <para>
1403       Fix <application>ecpg</>'s processing of nested structure pointer
1404       variables (Muhammad Usama)
1405      </para>
1406     </listitem>
1407
1408     <listitem>
1409      <para>
1410       Fix <application>ecpg</>'s <function>ecpg_get_data</> function to
1411       handle arrays properly (Michael Meskes)
1412      </para>
1413     </listitem>
1414
1415     <listitem>
1416      <para>
1417       Make <filename>contrib/pageinspect</>'s btree page inspection
1418       functions take buffer locks while examining pages (Tom Lane)
1419      </para>
1420     </listitem>
1421
1422     <listitem>
1423      <para>
1424       Ensure that <literal>make install</> for an extension creates the
1425       <filename>extension</> installation directory (C&eacute;dric Villemain)
1426      </para>
1427
1428      <para>
1429       Previously, this step was missed if <varname>MODULEDIR</> was set in
1430       the extension's Makefile.
1431      </para>
1432     </listitem>
1433
1434     <listitem>
1435      <para>
1436       Fix <application>pgxs</> support for building loadable modules on AIX
1437       (Tom Lane)
1438      </para>
1439
1440      <para>
1441       Building modules outside the original source tree didn't work on AIX.
1442      </para>
1443     </listitem>
1444
1445     <listitem>
1446      <para>
1447       Update time zone data files to <application>tzdata</> release 2012j
1448       for DST law changes in Cuba, Israel, Jordan, Libya, Palestine, Western
1449       Samoa, and portions of Brazil.
1450      </para>
1451     </listitem>
1452
1453    </itemizedlist>
1454
1455   </sect2>
1456  </sect1>
1457
1458  <sect1 id="release-9-1-6">
1459   <title>Release 9.1.6</title>
1460
1461   <note>
1462   <title>Release Date</title>
1463   <simpara>2012-09-24</simpara>
1464   </note>
1465
1466   <para>
1467    This release contains a variety of fixes from 9.1.5.
1468    For information about new features in the 9.1 major release, see
1469    <xref linkend="release-9-1">.
1470   </para>
1471
1472   <sect2>
1473    <title>Migration to Version 9.1.6</title>
1474
1475    <para>
1476     A dump/restore is not required for those running 9.1.X.
1477    </para>
1478
1479    <para>
1480     However, you may need to perform <command>REINDEX</> operations to
1481     recover from the effects of the data corruption bug described in the
1482     first changelog item below.
1483    </para>
1484
1485    <para>
1486     Also, if you are upgrading from a version earlier than 9.1.4,
1487     see the release notes for 9.1.4.
1488    </para>
1489
1490   </sect2>
1491
1492   <sect2>
1493    <title>Changes</title>
1494
1495    <itemizedlist>
1496
1497     <listitem>
1498      <para>
1499       Fix persistence marking of shared buffers during WAL replay
1500       (Jeff Davis)
1501      </para>
1502
1503      <para>
1504       This mistake can result in buffers not being written out during
1505       checkpoints, resulting in data corruption if the server later crashes
1506       without ever having written those buffers.  Corruption can occur on
1507       any server following crash recovery, but it is significantly more
1508       likely to occur on standby slave servers since those perform much
1509       more WAL replay.  There is a low probability of corruption of btree
1510       and GIN indexes.  There is a much higher probability of corruption of
1511       table <quote>visibility maps</>.  Fortunately, visibility maps are
1512       non-critical data in 9.1, so the worst consequence of such corruption
1513       in 9.1 installations is transient inefficiency of vacuuming.  Table
1514       data proper cannot be corrupted by this bug.
1515      </para>
1516
1517      <para>
1518       While no index corruption due to this bug is known to have occurred
1519       in the field, as a precautionary measure it is recommended that
1520       production installations <command>REINDEX</> all btree and GIN
1521       indexes at a convenient time after upgrading to 9.1.6.
1522      </para>
1523
1524      <para>
1525       Also, if you intend to do an in-place upgrade to 9.2.X, before doing
1526       so it is recommended to perform a <command>VACUUM</> of all tables
1527       while having <link
1528       linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link>
1529       set to zero.  This will ensure that any lingering wrong data in the
1530       visibility maps is corrected before 9.2.X can depend on it.  <link
1531       linkend="guc-vacuum-cost-delay"><varname>vacuum_cost_delay</></link>
1532       can be adjusted to reduce the performance impact of vacuuming, while
1533       causing it to take longer to finish.
1534      </para>
1535     </listitem>
1536
1537     <listitem>
1538      <para>
1539       Fix planner's assignment of executor parameters, and fix executor's
1540       rescan logic for CTE plan nodes (Tom Lane)
1541      </para>
1542
1543      <para>
1544       These errors could result in wrong answers from queries that scan the
1545       same <literal>WITH</> subquery multiple times.
1546      </para>
1547     </listitem>
1548
1549     <listitem>
1550      <para>
1551       Fix misbehavior when <link
1552       linkend="guc-default-transaction-isolation"><varname>default_transaction_isolation</></link>
1553       is set to <literal>serializable</> (Kevin Grittner, Tom Lane, Heikki
1554       Linnakangas)
1555      </para>
1556
1557      <para>
1558       Symptoms include crashes at process start on Windows, and crashes in
1559       hot standby operation.
1560      </para>
1561     </listitem>
1562
1563     <listitem>
1564      <para>
1565       Improve selectivity estimation for text search queries involving
1566       prefixes, i.e. <replaceable>word</><literal>:*</> patterns  (Tom Lane)
1567      </para>
1568
1569      <para>
1570      </para>
1571     </listitem>
1572
1573     <listitem>
1574      <para>
1575       Improve page-splitting decisions in GiST indexes (Alexander Korotkov,
1576       Robert Haas, Tom Lane)
1577      </para>
1578
1579      <para>
1580       Multi-column GiST indexes might suffer unexpected bloat due to this
1581       error.
1582      </para>
1583     </listitem>
1584
1585     <listitem>
1586      <para>
1587       Fix cascading privilege revoke to stop if privileges are still held
1588       (Tom Lane)
1589      </para>
1590
1591      <para>
1592       If we revoke a grant option from some role <replaceable>X</>, but
1593       <replaceable>X</> still holds that option via a grant from someone
1594       else, we should not recursively revoke the corresponding privilege
1595       from role(s) <replaceable>Y</> that <replaceable>X</> had granted it
1596       to.
1597      </para>
1598     </listitem>
1599
1600     <listitem>
1601      <para>
1602       Disallow extensions from containing the schema they are assigned to
1603       (Thom Brown)
1604      </para>
1605
1606      <para>
1607       This situation creates circular dependencies that confuse
1608       <application>pg_dump</> and probably other things.  It's confusing
1609       for humans too, so disallow it.
1610      </para>
1611     </listitem>
1612
1613     <listitem>
1614      <para>
1615       Improve error messages for Hot Standby misconfiguration errors
1616       (Gurjeet Singh)
1617      </para>
1618     </listitem>
1619
1620     <listitem>
1621      <para>
1622       Make <application>configure</> probe for <function>mbstowcs_l</> (Tom
1623       Lane)
1624      </para>
1625
1626      <para>
1627       This fixes build failures on some versions of AIX.
1628      </para>
1629     </listitem>
1630
1631     <listitem>
1632      <para>
1633       Fix handling of <literal>SIGFPE</> when PL/Perl is in use (Andres Freund)
1634      </para>
1635
1636      <para>
1637       Perl resets the process's <literal>SIGFPE</> handler to
1638       <literal>SIG_IGN</>, which could result in crashes later on.  Restore
1639       the normal Postgres signal handler after initializing PL/Perl.
1640      </para>
1641     </listitem>
1642
1643     <listitem>
1644      <para>
1645       Prevent PL/Perl from crashing if a recursive PL/Perl function is
1646       redefined while being executed (Tom Lane)
1647      </para>
1648     </listitem>
1649
1650     <listitem>
1651      <para>
1652       Work around possible misoptimization in PL/Perl (Tom Lane)
1653      </para>
1654
1655      <para>
1656       Some Linux distributions contain an incorrect version of
1657       <filename>pthread.h</> that results in incorrect compiled code in
1658       PL/Perl, leading to crashes if a PL/Perl function calls another one
1659       that throws an error.
1660      </para>
1661     </listitem>
1662
1663     <listitem>
1664      <para>
1665       Fix bugs in <filename>contrib/pg_trgm</>'s <literal>LIKE</> pattern
1666       analysis code (Fujii Masao)
1667      </para>
1668
1669      <para>
1670       <literal>LIKE</> queries using a trigram index could produce wrong
1671       results if the pattern contained <literal>LIKE</> escape characters.
1672      </para>
1673     </listitem>
1674
1675     <listitem>
1676      <para>
1677       Fix <application>pg_upgrade</>'s handling of line endings on Windows
1678       (Andrew Dunstan)
1679      </para>
1680
1681      <para>
1682       Previously, <application>pg_upgrade</> might add or remove carriage
1683       returns in places such as function bodies.
1684      </para>
1685     </listitem>
1686
1687     <listitem>
1688      <para>
1689       On Windows, make <application>pg_upgrade</> use backslash path
1690       separators in the scripts it emits (Andrew Dunstan)
1691      </para>
1692     </listitem>
1693
1694     <listitem>
1695      <para>
1696       Remove unnecessary dependency on <application>pg_config</> from
1697       <application>pg_upgrade</> (Peter Eisentraut)
1698      </para>
1699     </listitem>
1700
1701     <listitem>
1702      <para>
1703       Update time zone data files to <application>tzdata</> release 2012f
1704       for DST law changes in Fiji
1705      </para>
1706     </listitem>
1707
1708    </itemizedlist>
1709
1710   </sect2>
1711  </sect1>
1712
1713  <sect1 id="release-9-1-5">
1714   <title>Release 9.1.5</title>
1715
1716   <note>
1717   <title>Release Date</title>
1718   <simpara>2012-08-17</simpara>
1719   </note>
1720
1721   <para>
1722    This release contains a variety of fixes from 9.1.4.
1723    For information about new features in the 9.1 major release, see
1724    <xref linkend="release-9-1">.
1725   </para>
1726
1727   <sect2>
1728    <title>Migration to Version 9.1.5</title>
1729
1730    <para>
1731     A dump/restore is not required for those running 9.1.X.
1732    </para>
1733
1734    <para>
1735     However, if you are upgrading from a version earlier than 9.1.4,
1736     see the release notes for 9.1.4.
1737    </para>
1738
1739   </sect2>
1740
1741   <sect2>
1742    <title>Changes</title>
1743
1744    <itemizedlist>
1745
1746     <listitem>
1747      <para>
1748       Prevent access to external files/URLs via XML entity references
1749       (Noah Misch, Tom Lane)
1750      </para>
1751
1752      <para>
1753       <function>xml_parse()</> would attempt to fetch external files or
1754       URLs as needed to resolve DTD and entity references in an XML value,
1755       thus allowing unprivileged database users to attempt to fetch data
1756       with the privileges of the database server.  While the external data
1757       wouldn't get returned directly to the user, portions of it could be
1758       exposed in error messages if the data didn't parse as valid XML; and
1759       in any case the mere ability to check existence of a file might be
1760       useful to an attacker.  (CVE-2012-3489)
1761      </para>
1762     </listitem>
1763
1764     <listitem>
1765      <para>
1766       Prevent access to external files/URLs via <filename>contrib/xml2</>'s
1767       <function>xslt_process()</> (Peter Eisentraut)
1768      </para>
1769
1770      <para>
1771       <application>libxslt</> offers the ability to read and write both
1772       files and URLs through stylesheet commands, thus allowing
1773       unprivileged database users to both read and write data with the
1774       privileges of the database server.  Disable that through proper use
1775       of <application>libxslt</>'s security options.  (CVE-2012-3488)
1776      </para>
1777
1778      <para>
1779       Also, remove <function>xslt_process()</>'s ability to fetch documents
1780       and stylesheets from external files/URLs.  While this was a
1781       documented <quote>feature</>, it was long regarded as a bad idea.
1782       The fix for CVE-2012-3489 broke that capability, and rather than
1783       expend effort on trying to fix it, we're just going to summarily
1784       remove it.
1785      </para>
1786     </listitem>
1787
1788     <listitem>
1789      <para>
1790       Prevent too-early recycling of btree index pages (Noah Misch)
1791      </para>
1792
1793      <para>
1794       When we allowed read-only transactions to skip assigning XIDs, we
1795       introduced the possibility that a deleted btree page could be
1796       recycled while a read-only transaction was still in flight to it.
1797       This would result in incorrect index search results.  The probability
1798       of such an error occurring in the field seems very low because of the
1799       timing requirements, but nonetheless it should be fixed.
1800      </para>
1801     </listitem>
1802
1803     <listitem>
1804      <para>
1805       Fix crash-safety bug with newly-created-or-reset sequences (Tom Lane)
1806      </para>
1807
1808      <para>
1809       If <command>ALTER SEQUENCE</> was executed on a freshly created or
1810       reset sequence, and then precisely one <function>nextval()</> call
1811       was made on it, and then the server crashed, WAL replay would restore
1812       the sequence to a state in which it appeared that no
1813       <function>nextval()</> had been done, thus allowing the first
1814       sequence value to be returned again by the next
1815       <function>nextval()</> call.  In particular this could manifest for
1816       <type>serial</> columns, since creation of a serial column's sequence
1817       includes an <command>ALTER SEQUENCE OWNED BY</> step.
1818      </para>
1819     </listitem>
1820
1821     <listitem>
1822      <para>
1823       Fix race condition in <literal>enum</>-type value comparisons (Robert
1824       Haas, Tom Lane)
1825      </para>
1826
1827      <para>
1828       Comparisons could fail when encountering an enum value added since
1829       the current query started.
1830      </para>
1831     </listitem>
1832
1833     <listitem>
1834      <para>
1835       Fix <function>txid_current()</> to report the correct epoch when not
1836       in hot standby (Heikki Linnakangas)
1837      </para>
1838
1839      <para>
1840       This fixes a regression introduced in the previous minor release.
1841      </para>
1842     </listitem>
1843
1844     <listitem>
1845      <para>
1846       Prevent selection of unsuitable replication connections as
1847       the synchronous standby (Fujii Masao)
1848      </para>
1849
1850      <para>
1851       The master might improperly choose pseudo-servers such as
1852       <application>pg_receivexlog</> or <application>pg_basebackup</>
1853       as the synchronous standby, and then wait indefinitely for them.
1854      </para>
1855     </listitem>
1856
1857     <listitem>
1858      <para>
1859       Fix bug in startup of Hot Standby when a master transaction has many
1860       subtransactions (Andres Freund)
1861      </para>
1862
1863      <para>
1864       This mistake led to failures reported as <quote>out-of-order XID
1865       insertion in KnownAssignedXids</>.
1866      </para>
1867     </listitem>
1868
1869     <listitem>
1870      <para>
1871       Ensure the <filename>backup_label</> file is fsync'd after
1872       <function>pg_start_backup()</> (Dave Kerr)
1873      </para>
1874     </listitem>
1875
1876     <listitem>
1877      <para>
1878       Fix timeout handling in walsender processes (Tom Lane)
1879      </para>
1880
1881      <para>
1882       WAL sender background processes neglected to establish a
1883       <systemitem>SIGALRM</> handler, meaning they would wait forever in
1884       some corner cases where a timeout ought to happen.
1885      </para>
1886     </listitem>
1887
1888     <listitem>
1889      <para>
1890       Wake walsenders after each background flush by walwriter (Andres
1891       Freund, Simon Riggs)
1892      </para>
1893
1894      <para>
1895       This greatly reduces replication delay when the workload contains
1896       only asynchronously-committed transactions.
1897      </para>
1898     </listitem>
1899
1900     <listitem>
1901      <para>
1902       Fix <literal>LISTEN</>/<literal>NOTIFY</> to cope better with I/O
1903       problems, such as out of disk space (Tom Lane)
1904      </para>
1905
1906      <para>
1907       After a write failure, all subsequent attempts to send more
1908       <literal>NOTIFY</> messages would fail with messages like
1909       <quote>Could not read from file "pg_notify/<replaceable>nnnn</>" at
1910       offset <replaceable>nnnnn</>: Success</quote>.
1911      </para>
1912     </listitem>
1913
1914     <listitem>
1915      <para>
1916       Only allow autovacuum to be auto-canceled by a directly blocked
1917       process (Tom Lane)
1918      </para>
1919
1920      <para>
1921       The original coding could allow inconsistent behavior in some cases;
1922       in particular, an autovacuum could get canceled after less than
1923       <literal>deadlock_timeout</> grace period.
1924      </para>
1925     </listitem>
1926
1927     <listitem>
1928      <para>
1929       Improve logging of autovacuum cancels (Robert Haas)
1930      </para>
1931     </listitem>
1932
1933     <listitem>
1934      <para>
1935       Fix log collector so that <literal>log_truncate_on_rotation</> works
1936       during the very first log rotation after server start (Tom Lane)
1937      </para>
1938     </listitem>
1939
1940     <listitem>
1941      <para>
1942       Fix <literal>WITH</> attached to a nested set operation
1943       (<literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>)
1944       (Tom Lane)
1945      </para>
1946     </listitem>
1947
1948     <listitem>
1949      <para>
1950       Ensure that a whole-row reference to a subquery doesn't include any
1951       extra <literal>GROUP BY</> or <literal>ORDER BY</> columns (Tom Lane)
1952      </para>
1953     </listitem>
1954
1955     <listitem>
1956      <para>
1957       Fix dependencies generated during <literal>ALTER TABLE ... ADD
1958       CONSTRAINT USING INDEX</> (Tom Lane)
1959      </para>
1960
1961      <para>
1962       This command left behind a redundant <structname>pg_depend</> entry
1963       for the index, which could confuse later operations, notably
1964       <literal>ALTER TABLE ... ALTER COLUMN TYPE</> on one of the indexed
1965       columns.
1966      </para>
1967     </listitem>
1968
1969     <listitem>
1970      <para>
1971       Fix <command>REASSIGN OWNED</> to work on extensions (Alvaro Herrera)
1972      </para>
1973     </listitem>
1974
1975     <listitem>
1976      <para>
1977       Disallow copying whole-row references in <literal>CHECK</>
1978       constraints and index definitions during <command>CREATE TABLE</>
1979       (Tom Lane)
1980      </para>
1981
1982      <para>
1983       This situation can arise in <command>CREATE TABLE</> with
1984       <literal>LIKE</> or <literal>INHERITS</>.  The copied whole-row
1985       variable was incorrectly labeled with the row type of the original
1986       table not the new one.  Rejecting the case seems reasonable for
1987       <literal>LIKE</>, since the row types might well diverge later.  For
1988       <literal>INHERITS</> we should ideally allow it, with an implicit
1989       coercion to the parent table's row type; but that will require more
1990       work than seems safe to back-patch.
1991      </para>
1992     </listitem>
1993
1994     <listitem>
1995      <para>
1996       Fix memory leak in <literal>ARRAY(SELECT ...)</> subqueries (Heikki
1997       Linnakangas, Tom Lane)
1998      </para>
1999     </listitem>
2000
2001     <listitem>
2002      <para>
2003       Fix planner to pass correct collation to operator selectivity
2004       estimators (Tom Lane)
2005      </para>
2006
2007      <para>
2008       This was not previously required by any core selectivity estimation
2009       function, but third-party code might need it.
2010      </para>
2011     </listitem>
2012
2013     <listitem>
2014      <para>
2015       Fix extraction of common prefixes from regular expressions (Tom Lane)
2016      </para>
2017
2018      <para>
2019       The code could get confused by quantified parenthesized
2020       subexpressions, such as <literal>^(foo)?bar</>.  This would lead to
2021       incorrect index optimization of searches for such patterns.
2022      </para>
2023     </listitem>
2024
2025     <listitem>
2026      <para>
2027       Fix bugs with parsing signed
2028       <replaceable>hh</><literal>:</><replaceable>mm</> and
2029       <replaceable>hh</><literal>:</><replaceable>mm</><literal>:</><replaceable>ss</>
2030       fields in <type>interval</> constants (Amit Kapila, Tom Lane)
2031      </para>
2032     </listitem>
2033
2034     <listitem>
2035      <para>
2036       Fix <application>pg_dump</> to better handle views containing partial
2037       <literal>GROUP BY</> lists (Tom Lane)
2038      </para>
2039
2040      <para>
2041       A view that lists only a primary key column in <literal>GROUP BY</>,
2042       but uses other table columns as if they were grouped, gets marked as
2043       depending on the primary key.  Improper handling of such primary key
2044       dependencies in <application>pg_dump</> resulted in poorly-ordered
2045       dumps, which at best would be inefficient to restore and at worst
2046       could result in outright failure of a parallel
2047       <application>pg_restore</> run.
2048      </para>
2049     </listitem>
2050
2051     <listitem>
2052      <para>
2053       In PL/Perl, avoid setting UTF8 flag when in SQL_ASCII encoding
2054       (Alex Hunsaker, Kyotaro Horiguchi, Alvaro Herrera)
2055      </para>
2056     </listitem>
2057
2058     <listitem>
2059      <para>
2060       Use Postgres' encoding conversion functions, not Python's, when
2061       converting a Python Unicode string to the server encoding in
2062       PL/Python (Jan Urbanski)
2063      </para>
2064
2065      <para>
2066       This avoids some corner-case problems, notably that Python doesn't
2067       support all the encodings Postgres does.  A notable functional change
2068       is that if the server encoding is SQL_ASCII, you will get the UTF-8
2069       representation of the string; formerly, any non-ASCII characters in
2070       the string would result in an error.
2071      </para>
2072     </listitem>
2073
2074     <listitem>
2075      <para>
2076       Fix mapping of PostgreSQL encodings to Python encodings in PL/Python
2077       (Jan Urbanski)
2078      </para>
2079     </listitem>
2080
2081     <listitem>
2082      <para>
2083       Report errors properly in <filename>contrib/xml2</>'s
2084       <function>xslt_process()</> (Tom Lane)
2085      </para>
2086     </listitem>
2087
2088     <listitem>
2089      <para>
2090       Update time zone data files to <application>tzdata</> release 2012e
2091       for DST law changes in Morocco and Tokelau
2092      </para>
2093     </listitem>
2094
2095    </itemizedlist>
2096
2097   </sect2>
2098  </sect1>
2099
2100  <sect1 id="release-9-1-4">
2101   <title>Release 9.1.4</title>
2102
2103   <note>
2104   <title>Release Date</title>
2105   <simpara>2012-06-04</simpara>
2106   </note>
2107
2108   <para>
2109    This release contains a variety of fixes from 9.1.3.
2110    For information about new features in the 9.1 major release, see
2111    <xref linkend="release-9-1">.
2112   </para>
2113
2114   <sect2>
2115    <title>Migration to Version 9.1.4</title>
2116
2117    <para>
2118     A dump/restore is not required for those running 9.1.X.
2119    </para>
2120
2121    <para>
2122     However, if you use the <type>citext</> data type, and you upgraded
2123     from a previous major release by running <application>pg_upgrade</>,
2124     you should run <literal>CREATE EXTENSION citext FROM unpackaged</>
2125     to avoid collation-related failures in <type>citext</> operations.
2126     The same is necessary if you restore a dump from a pre-9.1 database
2127     that contains an instance of the <type>citext</> data type.
2128     If you've already run the <command>CREATE EXTENSION</> command before
2129     upgrading to 9.1.4, you will instead need to do manual catalog updates
2130     as explained in the third changelog item below.
2131    </para>
2132
2133    <para>
2134     Also, if you are upgrading from a version earlier than 9.1.2,
2135     see the release notes for 9.1.2.
2136    </para>
2137
2138   </sect2>
2139
2140   <sect2>
2141    <title>Changes</title>
2142
2143    <itemizedlist>
2144
2145     <listitem>
2146      <para>
2147       Fix incorrect password transformation in
2148       <filename>contrib/pgcrypto</>'s DES <function>crypt()</> function
2149       (Solar Designer)
2150      </para>
2151
2152      <para>
2153       If a password string contained the byte value <literal>0x80</>, the
2154       remainder of the password was ignored, causing the password to be much
2155       weaker than it appeared.  With this fix, the rest of the string is
2156       properly included in the DES hash.  Any stored password values that are
2157       affected by this bug will thus no longer match, so the stored values may
2158       need to be updated.  (CVE-2012-2143)
2159      </para>
2160     </listitem>
2161
2162     <listitem>
2163      <para>
2164       Ignore <literal>SECURITY DEFINER</> and <literal>SET</> attributes for
2165       a procedural language's call handler (Tom Lane)
2166      </para>
2167
2168      <para>
2169       Applying such attributes to a call handler could crash the server.
2170       (CVE-2012-2655)
2171      </para>
2172     </listitem>
2173
2174     <listitem>
2175      <para>
2176       Make <filename>contrib/citext</>'s upgrade script fix collations of
2177       <type>citext</> arrays and domains over <type>citext</>
2178       (Tom Lane)
2179      </para>
2180
2181      <para>
2182       Release 9.1.2 provided a fix for collations of <type>citext</> columns
2183       and indexes in databases upgraded or reloaded from pre-9.1
2184       installations, but that fix was incomplete: it neglected to handle arrays
2185       and domains over <type>citext</>.  This release extends the module's
2186       upgrade script to handle these cases.  As before, if you have already
2187       run the upgrade script, you'll need to run the collation update
2188       commands by hand instead.  See the 9.1.2 release notes for more
2189       information about doing this.
2190      </para>
2191     </listitem>
2192
2193     <listitem>
2194      <para>
2195       Allow numeric timezone offsets in <type>timestamp</> input to be up to
2196       16 hours away from UTC (Tom Lane)
2197      </para>
2198
2199      <para>
2200       Some historical time zones have offsets larger than 15 hours, the
2201       previous limit.  This could result in dumped data values being rejected
2202       during reload.
2203      </para>
2204     </listitem>
2205
2206     <listitem>
2207      <para>
2208       Fix timestamp conversion to cope when the given time is exactly the
2209       last DST transition time for the current timezone (Tom Lane)
2210      </para>
2211
2212      <para>
2213       This oversight has been there a long time, but was not noticed
2214       previously because most DST-using zones are presumed to have an
2215       indefinite sequence of future DST transitions.
2216      </para>
2217     </listitem>
2218
2219     <listitem>
2220      <para>
2221       Fix <type>text</> to <type>name</> and <type>char</> to <type>name</>
2222       casts to perform string truncation correctly in multibyte encodings
2223       (Karl Schnaitter)
2224      </para>
2225     </listitem>
2226
2227     <listitem>
2228      <para>
2229       Fix memory copying bug in <function>to_tsquery()</> (Heikki Linnakangas)
2230      </para>
2231     </listitem>
2232
2233     <listitem>
2234      <para>
2235       Ensure <function>txid_current()</> reports the correct epoch when
2236       executed in hot standby (Simon Riggs)
2237      </para>
2238     </listitem>
2239
2240     <listitem>
2241      <para>
2242       Fix planner's handling of outer PlaceHolderVars within subqueries (Tom
2243       Lane)
2244      </para>
2245
2246      <para>
2247       This bug concerns sub-SELECTs that reference variables coming from the
2248       nullable side of an outer join of the surrounding query.
2249       In 9.1, queries affected by this bug would fail with <quote>ERROR:
2250       Upper-level PlaceHolderVar found where not expected</>.  But in 9.0 and
2251       8.4, you'd silently get possibly-wrong answers, since the value
2252       transmitted into the subquery wouldn't go to null when it should.
2253      </para>
2254     </listitem>
2255
2256     <listitem>
2257      <para>
2258       Fix planning of <literal>UNION ALL</> subqueries with output columns
2259       that are not simple variables (Tom Lane)
2260      </para>
2261
2262      <para>
2263       Planning of such cases got noticeably worse in 9.1 as a result of a
2264       misguided fix for <quote>MergeAppend child's targetlist doesn't match
2265       MergeAppend</> errors.  Revert that fix and do it another way.
2266      </para>
2267     </listitem>
2268
2269     <listitem>
2270      <para>
2271       Fix slow session startup when <structname>pg_attribute</> is very large
2272       (Tom Lane)
2273      </para>
2274
2275      <para>
2276       If <structname>pg_attribute</> exceeds one-fourth of
2277       <varname>shared_buffers</>, cache rebuilding code that is sometimes
2278       needed during session start would trigger the synchronized-scan logic,
2279       causing it to take many times longer than normal.  The problem was
2280       particularly acute if many new sessions were starting at once.
2281      </para>
2282     </listitem>
2283
2284     <listitem>
2285      <para>
2286       Ensure sequential scans check for query cancel reasonably often (Merlin
2287       Moncure)
2288      </para>
2289
2290      <para>
2291       A scan encountering many consecutive pages that contain no live tuples
2292       would not respond to interrupts meanwhile.
2293      </para>
2294     </listitem>
2295
2296     <listitem>
2297      <para>
2298       Ensure the Windows implementation of <function>PGSemaphoreLock()</>
2299       clears <varname>ImmediateInterruptOK</> before returning (Tom Lane)
2300      </para>
2301
2302      <para>
2303       This oversight meant that a query-cancel interrupt received later
2304       in the same query could be accepted at an unsafe time, with
2305       unpredictable but not good consequences.
2306      </para>
2307     </listitem>
2308
2309     <listitem>
2310      <para>
2311       Show whole-row variables safely when printing views or rules
2312       (Abbas Butt, Tom Lane)
2313      </para>
2314
2315      <para>
2316       Corner cases involving ambiguous names (that is, the name could be
2317       either a table or column name of the query) were printed in an
2318       ambiguous way, risking that the view or rule would be interpreted
2319       differently after dump and reload.  Avoid the ambiguous case by
2320       attaching a no-op cast.
2321      </para>
2322     </listitem>
2323
2324     <listitem>
2325      <para>
2326       Fix <command>COPY FROM</> to properly handle null marker strings that
2327       correspond to invalid encoding (Tom Lane)
2328      </para>
2329
2330      <para>
2331       A null marker string such as <literal>E'\\0'</> should work, and did
2332       work in the past, but the case got broken in 8.4.
2333      </para>
2334     </listitem>
2335
2336     <listitem>
2337      <para>
2338       Fix <command>EXPLAIN VERBOSE</> for writable CTEs containing
2339       <literal>RETURNING</> clauses (Tom Lane)
2340      </para>
2341     </listitem>
2342
2343     <listitem>
2344      <para>
2345       Fix <command>PREPARE TRANSACTION</> to work correctly in the presence
2346       of advisory locks (Tom Lane)
2347      </para>
2348
2349      <para>
2350       Historically, <command>PREPARE TRANSACTION</> has simply ignored any
2351       session-level advisory locks the session holds, but this case was
2352       accidentally broken in 9.1.
2353      </para>
2354     </listitem>
2355
2356     <listitem>
2357      <para>
2358       Fix truncation of unlogged tables (Robert Haas)
2359      </para>
2360     </listitem>
2361
2362     <listitem>
2363      <para>
2364       Ignore missing schemas during non-interactive assignments of
2365       <varname>search_path</> (Tom Lane)
2366      </para>
2367
2368      <para>
2369       This re-aligns 9.1's behavior with that of older branches.  Previously
2370       9.1 would throw an error for nonexistent schemas mentioned in
2371       <varname>search_path</> settings obtained from places such as
2372       <command>ALTER DATABASE SET</>.
2373      </para>
2374     </listitem>
2375
2376     <listitem>
2377      <para>
2378       Fix bugs with temporary or transient tables used in extension scripts
2379       (Tom Lane)
2380      </para>
2381
2382      <para>
2383       This includes cases such as a rewriting <command>ALTER TABLE</> within
2384       an extension update script, since that uses a transient table behind
2385       the scenes.
2386      </para>
2387     </listitem>
2388
2389     <listitem>
2390      <para>
2391       Ensure autovacuum worker processes perform stack depth checking
2392       properly (Heikki Linnakangas)
2393      </para>
2394
2395      <para>
2396       Previously, infinite recursion in a function invoked by
2397       auto-<command>ANALYZE</> could crash worker processes.
2398      </para>
2399     </listitem>
2400
2401     <listitem>
2402      <para>
2403       Fix logging collector to not lose log coherency under high load (Andrew
2404       Dunstan)
2405      </para>
2406
2407      <para>
2408       The collector previously could fail to reassemble large messages if it
2409       got too busy.
2410      </para>
2411     </listitem>
2412
2413     <listitem>
2414      <para>
2415       Fix logging collector to ensure it will restart file rotation
2416       after receiving <systemitem>SIGHUP</> (Tom Lane)
2417      </para>
2418     </listitem>
2419
2420     <listitem>
2421      <para>
2422       Fix <quote>too many LWLocks taken</> failure in GiST indexes (Heikki
2423       Linnakangas)
2424      </para>
2425     </listitem>
2426
2427     <listitem>
2428      <para>
2429       Fix WAL replay logic for GIN indexes to not fail if the index was
2430       subsequently dropped (Tom Lane)
2431      </para>
2432     </listitem>
2433
2434     <listitem>
2435      <para>
2436       Correctly detect SSI conflicts of prepared transactions after a crash
2437       (Dan Ports)
2438      </para>
2439     </listitem>
2440
2441     <listitem>
2442      <para>
2443       Avoid synchronous replication delay when committing a transaction that
2444       only modified temporary tables (Heikki Linnakangas)
2445      </para>
2446
2447      <para>
2448       In such a case the transaction's commit record need not be flushed to
2449       standby servers, but some of the code didn't know that and waited for
2450       it to happen anyway.
2451      </para>
2452     </listitem>
2453
2454     <listitem>
2455      <para>
2456       Fix error handling in <application>pg_basebackup</>
2457       (Thomas Ogrisegg, Fujii Masao)
2458      </para>
2459     </listitem>
2460
2461     <listitem>
2462      <para>
2463       Fix <application>walsender</> to not go into a busy loop if connection
2464       is terminated (Fujii Masao)
2465      </para>
2466     </listitem>
2467
2468     <listitem>
2469      <para>
2470       Fix memory leak in PL/pgSQL's <command>RETURN NEXT</> command (Joe
2471       Conway)
2472      </para>
2473     </listitem>
2474
2475     <listitem>
2476      <para>
2477       Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target
2478       is the function's first variable (Tom Lane)
2479      </para>
2480     </listitem>
2481
2482     <listitem>
2483      <para>
2484       Ensure that PL/Perl package-qualifies the <varname>_TD</> variable
2485       (Alex Hunsaker)
2486      </para>
2487
2488      <para>
2489       This bug caused trigger invocations to fail when they are nested
2490       within a function invocation that changes the current package.
2491      </para>
2492     </listitem>
2493
2494     <listitem>
2495      <para>
2496       Fix PL/Python functions returning composite types to accept a string
2497       for their result value (Jan Urbanski)
2498      </para>
2499
2500      <para>
2501       This case was accidentally broken by the 9.1 additions to allow a
2502       composite result value to be supplied in other formats, such as
2503       dictionaries.
2504      </para>
2505     </listitem>
2506
2507     <listitem>
2508      <para>
2509       Fix potential access off the end of memory in <application>psql</>'s
2510       expanded display (<command>\x</>) mode (Peter Eisentraut)
2511      </para>
2512     </listitem>
2513
2514     <listitem>
2515      <para>
2516       Fix several performance problems in <application>pg_dump</> when
2517       the database contains many objects (Jeff Janes, Tom Lane)
2518      </para>
2519
2520      <para>
2521       <application>pg_dump</> could get very slow if the database contained
2522       many schemas, or if many objects are in dependency loops, or if there
2523       are many owned sequences.
2524      </para>
2525     </listitem>
2526
2527     <listitem>
2528      <para>
2529       Fix memory and file descriptor leaks in <application>pg_restore</>
2530       when reading a directory-format archive (Peter Eisentraut)
2531      </para>
2532     </listitem>
2533
2534     <listitem>
2535      <para>
2536       Fix <application>pg_upgrade</> for the case that a database stored in a
2537       non-default tablespace contains a table in the cluster's default
2538       tablespace (Bruce Momjian)
2539      </para>
2540     </listitem>
2541
2542     <listitem>
2543      <para>
2544       In <application>ecpg</>, fix rare memory leaks and possible overwrite
2545       of one byte after the <structname>sqlca_t</> structure (Peter Eisentraut)
2546      </para>
2547     </listitem>
2548
2549     <listitem>
2550      <para>
2551       Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak
2552       temporary database connections upon error (Tom Lane)
2553      </para>
2554     </listitem>
2555
2556     <listitem>
2557      <para>
2558       Fix <filename>contrib/dblink</> to report the correct connection name in
2559       error messages (Kyotaro Horiguchi)
2560      </para>
2561     </listitem>
2562
2563     <listitem>
2564      <para>
2565       Fix <filename>contrib/vacuumlo</> to use multiple transactions when
2566       dropping many large objects (Tim Lewis, Robert Haas, Tom Lane)
2567      </para>
2568
2569      <para>
2570       This change avoids exceeding <varname>max_locks_per_transaction</> when
2571       many objects need to be dropped.  The behavior can be adjusted with the
2572       new <literal>-l</> (limit) option.
2573      </para>
2574     </listitem>
2575
2576     <listitem>
2577      <para>
2578       Update time zone data files to <application>tzdata</> release 2012c
2579       for DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland
2580       Islands, Gaza, Haiti, Hebron, Morocco, Syria, and Tokelau Islands;
2581       also historical corrections for Canada.
2582      </para>
2583     </listitem>
2584
2585    </itemizedlist>
2586
2587   </sect2>
2588  </sect1>
2589
2590  <sect1 id="release-9-1-3">
2591   <title>Release 9.1.3</title>
2592
2593   <note>
2594   <title>Release Date</title>
2595   <simpara>2012-02-27</simpara>
2596   </note>
2597
2598   <para>
2599    This release contains a variety of fixes from 9.1.2.
2600    For information about new features in the 9.1 major release, see
2601    <xref linkend="release-9-1">.
2602   </para>
2603
2604   <sect2>
2605    <title>Migration to Version 9.1.3</title>
2606
2607    <para>
2608     A dump/restore is not required for those running 9.1.X.
2609    </para>
2610
2611    <para>
2612     However, if you are upgrading from a version earlier than 9.1.2,
2613     see the release notes for 9.1.2.
2614    </para>
2615
2616   </sect2>
2617
2618   <sect2>
2619    <title>Changes</title>
2620
2621    <itemizedlist>
2622
2623     <listitem>
2624      <para>
2625       Require execute permission on the trigger function for
2626       <command>CREATE TRIGGER</> (Robert Haas)
2627      </para>
2628
2629      <para>
2630       This missing check could allow another user to execute a trigger
2631       function with forged input data, by installing it on a table he owns.
2632       This is only of significance for trigger functions marked
2633       <literal>SECURITY DEFINER</>, since otherwise trigger functions run
2634       as the table owner anyway.  (CVE-2012-0866)
2635      </para>
2636     </listitem>
2637
2638     <listitem>
2639      <para>
2640       Remove arbitrary limitation on length of common name in SSL
2641       certificates (Heikki Linnakangas)
2642      </para>
2643
2644      <para>
2645       Both <application>libpq</> and the server truncated the common name
2646       extracted from an SSL certificate at 32 bytes.  Normally this would
2647       cause nothing worse than an unexpected verification failure, but there
2648       are some rather-implausible scenarios in which it might allow one
2649       certificate holder to impersonate another.  The victim would have to
2650       have a common name exactly 32 bytes long, and the attacker would have
2651       to persuade a trusted CA to issue a certificate in which the common
2652       name has that string as a prefix.  Impersonating a server would also
2653       require some additional exploit to redirect client connections.
2654       (CVE-2012-0867)
2655      </para>
2656     </listitem>
2657
2658     <listitem>
2659      <para>
2660       Convert newlines to spaces in names written in <application>pg_dump</>
2661       comments (Robert Haas)
2662      </para>
2663
2664      <para>
2665       <application>pg_dump</> was incautious about sanitizing object names
2666       that are emitted within SQL comments in its output script.  A name
2667       containing a newline would at least render the script syntactically
2668       incorrect.  Maliciously crafted object names could present a SQL
2669       injection risk when the script is reloaded.  (CVE-2012-0868)
2670      </para>
2671     </listitem>
2672
2673     <listitem>
2674      <para>
2675       Fix btree index corruption from insertions concurrent with vacuuming
2676       (Tom Lane)
2677      </para>
2678
2679      <para>
2680       An index page split caused by an insertion could sometimes cause a
2681       concurrently-running <command>VACUUM</> to miss removing index entries
2682       that it should remove.  After the corresponding table rows are removed,
2683       the dangling index entries would cause errors (such as <quote>could not
2684       read block N in file ...</>) or worse, silently wrong query results
2685       after unrelated rows are re-inserted at the now-free table locations.
2686       This bug has been present since release 8.2, but occurs so infrequently
2687       that it was not diagnosed until now.  If you have reason to suspect
2688       that it has happened in your database, reindexing the affected index
2689       will fix things.
2690      </para>
2691     </listitem>
2692
2693     <listitem>
2694      <para>
2695       Fix transient zeroing of shared buffers during WAL replay (Tom Lane)
2696      </para>
2697
2698      <para>
2699       The replay logic would sometimes zero and refill a shared buffer, so
2700       that the contents were transiently invalid.  In hot standby mode this
2701       can result in a query that's executing in parallel seeing garbage data.
2702       Various symptoms could result from that, but the most common one seems
2703       to be <quote>invalid memory alloc request size</>.
2704      </para>
2705     </listitem>
2706
2707     <listitem>
2708      <para>
2709       Fix handling of data-modifying <literal>WITH</> subplans in
2710       <literal>READ COMMITTED</> rechecking (Tom Lane)
2711      </para>
2712
2713      <para>
2714       A <literal>WITH</> clause containing
2715       <command>INSERT</>/<command>UPDATE</>/<command>DELETE</> would crash
2716       if the parent <command>UPDATE</> or <command>DELETE</> command needed
2717       to be re-evaluated at one or more rows due to concurrent updates
2718       in <literal>READ COMMITTED</> mode.
2719      </para>
2720     </listitem>
2721
2722     <listitem>
2723      <para>
2724       Fix corner case in SSI transaction cleanup
2725       (Dan Ports)
2726      </para>
2727
2728      <para>
2729       When finishing up a read-write serializable transaction,
2730       a crash could occur if all remaining active serializable transactions
2731       are read-only.
2732      </para>
2733     </listitem>
2734
2735     <listitem>
2736      <para>
2737       Fix postmaster to attempt restart after a hot-standby crash (Tom Lane)
2738      </para>
2739
2740      <para>
2741       A logic error caused the postmaster to terminate, rather than attempt
2742       to restart the cluster, if any backend process crashed while operating
2743       in hot standby mode.
2744      </para>
2745     </listitem>
2746
2747     <listitem>
2748      <para>
2749       Fix <command>CLUSTER</>/<command>VACUUM FULL</> handling of toast
2750       values owned by recently-updated rows (Tom Lane)
2751      </para>
2752
2753      <para>
2754       This oversight could lead to <quote>duplicate key value violates unique
2755       constraint</> errors being reported against the toast table's index
2756       during one of these commands.
2757      </para>
2758     </listitem>
2759
2760     <listitem>
2761      <para>
2762       Update per-column permissions, not only per-table permissions, when
2763       changing table owner (Tom Lane)
2764      </para>
2765
2766      <para>
2767       Failure to do this meant that any previously granted column permissions
2768       were still shown as having been granted by the old owner.  This meant
2769       that neither the new owner nor a superuser could revoke the
2770       now-untraceable-to-table-owner permissions.
2771      </para>
2772     </listitem>
2773
2774     <listitem>
2775      <para>
2776       Support foreign data wrappers and foreign servers in
2777       <command>REASSIGN OWNED</> (Alvaro Herrera)
2778      </para>
2779
2780      <para>
2781       This command failed with <quote>unexpected classid</> errors if
2782       it needed to change the ownership of any such objects.
2783      </para>
2784     </listitem>
2785
2786     <listitem>
2787      <para>
2788       Allow non-existent values for some settings in <command>ALTER
2789       USER/DATABASE SET</> (Heikki Linnakangas)
2790      </para>
2791
2792      <para>
2793       Allow <varname>default_text_search_config</>,
2794       <varname>default_tablespace</>, and <varname>temp_tablespaces</> to be
2795       set to names that are not known.  This is because they might be known
2796       in another database where the setting is intended to be used, or for the
2797       tablespace cases because the tablespace might not be created yet.  The
2798       same issue was previously recognized for <varname>search_path</>, and
2799       these settings now act like that one.
2800      </para>
2801     </listitem>
2802
2803     <listitem>
2804      <para>
2805       Fix <quote>unsupported node type</> error caused by <literal>COLLATE</>
2806       in an <command>INSERT</> expression (Tom Lane)
2807      </para>
2808     </listitem>
2809
2810     <listitem>
2811      <para>
2812       Avoid crashing when we have problems deleting table files post-commit
2813       (Tom Lane)
2814      </para>
2815
2816      <para>
2817       Dropping a table should lead to deleting the underlying disk files only
2818       after the transaction commits.  In event of failure then (for instance,
2819       because of wrong file permissions) the code is supposed to just emit a
2820       warning message and go on, since it's too late to abort the
2821       transaction.  This logic got broken as of release 8.4, causing such
2822       situations to result in a PANIC and an unrestartable database.
2823      </para>
2824     </listitem>
2825
2826     <listitem>
2827      <para>
2828       Recover from errors occurring during WAL replay of <command>DROP
2829       TABLESPACE</> (Tom Lane)
2830      </para>
2831
2832      <para>
2833       Replay will attempt to remove the tablespace's directories, but there
2834       are various reasons why this might fail (for example, incorrect
2835       ownership or permissions on those directories).  Formerly the replay
2836       code would panic, rendering the database unrestartable without manual
2837       intervention.  It seems better to log the problem and continue, since
2838       the only consequence of failure to remove the directories is some
2839       wasted disk space.
2840      </para>
2841     </listitem>
2842
2843     <listitem>
2844      <para>
2845       Fix race condition in logging AccessExclusiveLocks for hot standby
2846       (Simon Riggs)
2847      </para>
2848
2849      <para>
2850       Sometimes a lock would be logged as being held by <quote>transaction
2851       zero</>.  This is at least known to produce assertion failures on
2852       slave servers, and might be the cause of more serious problems.
2853      </para>
2854     </listitem>
2855
2856     <listitem>
2857      <para>
2858       Track the OID counter correctly during WAL replay, even when it wraps
2859       around (Tom Lane)
2860      </para>
2861
2862      <para>
2863       Previously the OID counter would remain stuck at a high value until the
2864       system exited replay mode.  The practical consequences of that are
2865       usually nil, but there are scenarios wherein a standby server that's
2866       been promoted to master might take a long time to advance the OID
2867       counter to a reasonable value once values are needed.
2868      </para>
2869     </listitem>
2870
2871     <listitem>
2872      <para>
2873       Prevent emitting misleading <quote>consistent recovery state reached</>
2874       log message at the beginning of crash recovery (Heikki Linnakangas)
2875      </para>
2876     </listitem>
2877
2878     <listitem>
2879      <para>
2880       Fix initial value of
2881       <structname>pg_stat_replication</>.<structfield>replay_location</>
2882       (Fujii Masao)
2883      </para>
2884
2885      <para>
2886       Previously, the value shown would be wrong until at least one WAL
2887       record had been replayed.
2888      </para>
2889     </listitem>
2890
2891     <listitem>
2892      <para>
2893       Fix regular expression back-references with <literal>*</> attached
2894       (Tom Lane)
2895      </para>
2896
2897      <para>
2898       Rather than enforcing an exact string match, the code would effectively
2899       accept any string that satisfies the pattern sub-expression referenced
2900       by the back-reference symbol.
2901      </para>
2902
2903      <para>
2904       A similar problem still afflicts back-references that are embedded in a
2905       larger quantified expression, rather than being the immediate subject
2906       of the quantifier.  This will be addressed in a future
2907       <productname>PostgreSQL</> release.
2908      </para>
2909     </listitem>
2910
2911     <listitem>
2912      <para>
2913       Fix recently-introduced memory leak in processing of
2914       <type>inet</>/<type>cidr</> values (Heikki Linnakangas)
2915      </para>
2916
2917      <para>
2918       A patch in the December 2011 releases of <productname>PostgreSQL</>
2919       caused memory leakage in these operations, which could be significant
2920       in scenarios such as building a btree index on such a column.
2921      </para>
2922     </listitem>
2923
2924     <listitem>
2925      <para>
2926       Fix planner's ability to push down index-expression restrictions
2927       through <literal>UNION ALL</> (Tom Lane)
2928      </para>
2929
2930      <para>
2931       This type of optimization was inadvertently disabled by a fix for
2932       another problem in 9.1.2.
2933      </para>
2934     </listitem>
2935
2936     <listitem>
2937      <para>
2938       Fix planning of <literal>WITH</> clauses referenced in
2939       <command>UPDATE</>/<command>DELETE</> on an inherited table
2940       (Tom Lane)
2941      </para>
2942
2943      <para>
2944       This bug led to <quote>could not find plan for CTE</> failures.
2945      </para>
2946     </listitem>
2947
2948     <listitem>
2949      <para>
2950       Fix GIN cost estimation to handle <literal>column IN (...)</>
2951       index conditions (Marti Raudsepp)
2952      </para>
2953
2954      <para>
2955       This oversight would usually lead to crashes if such a condition could
2956       be used with a GIN index.
2957      </para>
2958     </listitem>
2959
2960     <listitem>
2961      <para>
2962       Prevent assertion failure when exiting a session with an open, failed
2963       transaction (Tom Lane)
2964      </para>
2965
2966      <para>
2967       This bug has no impact on normal builds with asserts not enabled.
2968      </para>
2969     </listitem>
2970
2971     <listitem>
2972      <para>
2973       Fix dangling pointer after <command>CREATE TABLE AS</>/<command>SELECT
2974       INTO</> in a SQL-language function (Tom Lane)
2975      </para>
2976
2977      <para>
2978       In most cases this only led to an assertion failure in assert-enabled
2979       builds, but worse consequences seem possible.
2980      </para>
2981     </listitem>
2982
2983     <listitem>
2984      <para>
2985       Avoid double close of file handle in syslogger on Windows (MauMau)
2986      </para>
2987
2988      <para>
2989       Ordinarily this error was invisible, but it would cause an exception
2990       when running on a debug version of Windows.
2991      </para>
2992     </listitem>
2993
2994     <listitem>
2995      <para>
2996       Fix I/O-conversion-related memory leaks in plpgsql
2997       (Andres Freund, Jan Urbanski, Tom Lane)
2998      </para>
2999
3000      <para>
3001       Certain operations would leak memory until the end of the current
3002       function.
3003      </para>
3004     </listitem>
3005
3006     <listitem>
3007      <para>
3008       Work around bug in perl's SvPVutf8() function (Andrew Dunstan)
3009      </para>
3010
3011      <para>
3012       This function crashes when handed a typeglob or certain read-only
3013       objects such as <literal>$^V</>.  Make plperl avoid passing those to
3014       it.
3015      </para>
3016     </listitem>
3017
3018     <listitem>
3019      <para>
3020       In <application>pg_dump</>, don't dump contents of an extension's
3021       configuration tables if the extension itself is not being dumped
3022       (Tom Lane)
3023      </para>
3024     </listitem>
3025
3026     <listitem>
3027      <para>
3028       Improve <application>pg_dump</>'s handling of inherited table columns
3029       (Tom Lane)
3030      </para>
3031
3032      <para>
3033       <application>pg_dump</> mishandled situations where a child column has
3034       a different default expression than its parent column.  If the default
3035       is textually identical to the parent's default, but not actually the
3036       same (for instance, because of schema search path differences) it would
3037       not be recognized as different, so that after dump and restore the
3038       child would be allowed to inherit the parent's default.  Child columns
3039       that are <literal>NOT NULL</> where their parent is not could also be
3040       restored subtly incorrectly.
3041      </para>
3042     </listitem>
3043
3044     <listitem>
3045      <para>
3046       Fix <application>pg_restore</>'s direct-to-database mode for
3047       INSERT-style table data (Tom Lane)
3048      </para>
3049
3050      <para>
3051       Direct-to-database restores from archive files made with
3052       <option>--inserts</> or <option>--column-inserts</> options fail when
3053       using <application>pg_restore</> from a release dated September or
3054       December 2011, as a result of an oversight in a fix for another
3055       problem.  The archive file itself is not at fault, and text-mode
3056       output is okay.
3057      </para>
3058     </listitem>
3059
3060     <listitem>
3061      <para>
3062       Teach <application>pg_upgrade</> to handle renaming of
3063       <application>plpython</>'s shared library (Bruce Momjian)
3064      </para>
3065
3066      <para>
3067       Upgrading a pre-9.1 database that included plpython would fail because
3068       of this oversight.
3069      </para>
3070     </listitem>
3071
3072     <listitem>
3073      <para>
3074       Allow <application>pg_upgrade</> to process tables containing
3075       <type>regclass</> columns (Bruce Momjian)
3076      </para>
3077
3078      <para>
3079       Since <application>pg_upgrade</> now takes care to preserve
3080       <structname>pg_class</> OIDs, there was no longer any reason for this
3081       restriction.
3082      </para>
3083     </listitem>
3084
3085     <listitem>
3086      <para>
3087       Make <application>libpq</> ignore <literal>ENOTDIR</> errors
3088       when looking for an SSL client certificate file
3089       (Magnus Hagander)
3090      </para>
3091
3092      <para>
3093       This allows SSL connections to be established, though without a
3094       certificate, even when the user's home directory is set to something
3095       like <literal>/dev/null</>.
3096      </para>
3097     </listitem>
3098
3099     <listitem>
3100      <para>
3101       Fix some more field alignment issues in <application>ecpg</>'s SQLDA area
3102       (Zoltan Boszormenyi)
3103      </para>
3104     </listitem>
3105
3106     <listitem>
3107      <para>
3108       Allow <literal>AT</> option in <application>ecpg</>
3109       <literal>DEALLOCATE</> statements (Michael Meskes)
3110      </para>
3111
3112      <para>
3113       The infrastructure to support this has been there for awhile, but
3114       through an oversight there was still an error check rejecting the case.
3115      </para>
3116     </listitem>
3117
3118     <listitem>
3119      <para>
3120       Do not use the variable name when defining a varchar structure in ecpg
3121       (Michael Meskes)
3122      </para>
3123     </listitem>
3124
3125     <listitem>
3126      <para>
3127       Fix <filename>contrib/auto_explain</>'s JSON output mode to produce
3128       valid JSON (Andrew Dunstan)
3129      </para>
3130
3131      <para>
3132       The output used brackets at the top level, when it should have used
3133       braces.
3134      </para>
3135     </listitem>
3136
3137     <listitem>
3138      <para>
3139       Fix error in <filename>contrib/intarray</>'s <literal>int[] &amp;
3140       int[]</> operator (Guillaume Lelarge)
3141      </para>
3142
3143      <para>
3144       If the smallest integer the two input arrays have in common is 1,
3145       and there are smaller values in either array, then 1 would be
3146       incorrectly omitted from the result.
3147      </para>
3148     </listitem>
3149
3150     <listitem>
3151      <para>
3152       Fix error detection in <filename>contrib/pgcrypto</>'s
3153       <function>encrypt_iv()</> and <function>decrypt_iv()</>
3154       (Marko Kreen)
3155      </para>
3156
3157      <para>
3158       These functions failed to report certain types of invalid-input errors,
3159       and would instead return random garbage values for incorrect input.
3160      </para>
3161     </listitem>
3162
3163     <listitem>
3164      <para>
3165       Fix one-byte buffer overrun in <filename>contrib/test_parser</>
3166       (Paul Guyot)
3167      </para>
3168
3169      <para>
3170       The code would try to read one more byte than it should, which would
3171       crash in corner cases.
3172       Since <filename>contrib/test_parser</> is only example code, this is
3173       not a security issue in itself, but bad example code is still bad.
3174      </para>
3175     </listitem>
3176
3177     <listitem>
3178      <para>
3179       Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if
3180       available (Martin Pitt)
3181      </para>
3182
3183      <para>
3184       This function replaces our previous use of the <literal>SWPB</>
3185       instruction, which is deprecated and not available on ARMv6 and later.
3186       Reports suggest that the old code doesn't fail in an obvious way on
3187       recent ARM boards, but simply doesn't interlock concurrent accesses,
3188       leading to bizarre failures in multiprocess operation.
3189      </para>
3190     </listitem>
3191
3192     <listitem>
3193      <para>
3194       Use <option>-fexcess-precision=standard</> option when building with
3195       gcc versions that accept it (Andrew Dunstan)
3196      </para>
3197
3198      <para>
3199       This prevents assorted scenarios wherein recent versions of gcc will
3200       produce creative results.
3201      </para>
3202     </listitem>
3203
3204     <listitem>
3205      <para>
3206       Allow use of threaded Python on FreeBSD (Chris Rees)
3207      </para>
3208
3209      <para>
3210       Our configure script previously believed that this combination wouldn't
3211       work; but FreeBSD fixed the problem, so remove that error check.
3212      </para>
3213     </listitem>
3214
3215     <listitem>
3216      <para>
3217       Allow MinGW builds to use standardly-named OpenSSL libraries
3218       (Tomasz Ostrowski)
3219      </para>
3220     </listitem>
3221
3222    </itemizedlist>
3223
3224   </sect2>
3225  </sect1>
3226
3227  <sect1 id="release-9-1-2">
3228   <title>Release 9.1.2</title>
3229
3230   <note>
3231   <title>Release Date</title>
3232   <simpara>2011-12-05</simpara>
3233   </note>
3234
3235   <para>
3236    This release contains a variety of fixes from 9.1.1.
3237    For information about new features in the 9.1 major release, see
3238    <xref linkend="release-9-1">.
3239   </para>
3240
3241   <sect2>
3242    <title>Migration to Version 9.1.2</title>
3243
3244    <para>
3245     A dump/restore is not required for those running 9.1.X.
3246    </para>
3247
3248    <para>
3249     However, a longstanding error was discovered in the definition of the
3250     <literal>information_schema.referential_constraints</> view.  If you
3251     rely on correct results from that view, you should replace its
3252     definition as explained in the first changelog item below.
3253    </para>
3254
3255    <para>
3256     Also, if you use the <type>citext</> data type, and you upgraded
3257     from a previous major release by running <application>pg_upgrade</>,
3258     you should run <literal>CREATE EXTENSION citext FROM unpackaged</>
3259     to avoid collation-related failures in <type>citext</> operations.
3260     The same is necessary if you restore a dump from a pre-9.1 database
3261     that contains an instance of the <type>citext</> data type.
3262     If you've already run the <command>CREATE EXTENSION</> command before
3263     upgrading to 9.1.2, you will instead need to do manual catalog updates
3264     as explained in the second changelog item.
3265    </para>
3266
3267   </sect2>
3268
3269   <sect2>
3270    <title>Changes</title>
3271
3272    <itemizedlist>
3273
3274     <listitem>
3275      <para>
3276       Fix bugs in <literal>information_schema.referential_constraints</> view
3277       (Tom Lane)
3278      </para>
3279
3280      <para>
3281       This view was being insufficiently careful about matching the
3282       foreign-key constraint to the depended-on primary or unique key
3283       constraint.  That could result in failure to show a foreign key
3284       constraint at all, or showing it multiple times, or claiming that it
3285       depends on a different constraint than the one it really does.
3286      </para>
3287
3288      <para>
3289       Since the view definition is installed by <application>initdb</>,
3290       merely upgrading will not fix the problem.  If you need to fix this
3291       in an existing installation, you can (as a superuser) drop the
3292       <literal>information_schema</> schema then re-create it by sourcing
3293       <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>.
3294       (Run <literal>pg_config --sharedir</> if you're uncertain where
3295       <replaceable>SHAREDIR</> is.)  This must be repeated in each database
3296       to be fixed.
3297      </para>
3298     </listitem>
3299
3300     <listitem>
3301      <para>
3302       Make <filename>contrib/citext</>'s upgrade script fix collations of
3303       <type>citext</> columns and indexes (Tom Lane)
3304      </para>
3305
3306      <para>
3307       Existing <type>citext</> columns and indexes aren't correctly marked as
3308       being of a collatable data type during <application>pg_upgrade</> from
3309       a pre-9.1 server, or when a pre-9.1 dump containing the <type>citext</>
3310       type is loaded into a 9.1 server.
3311       That leads to operations on these columns failing with errors
3312       such as <quote>could not determine which collation to use for string
3313       comparison</>.  This change allows them to be fixed by the same
3314       script that upgrades the <type>citext</> module into a proper 9.1
3315       extension during <literal>CREATE EXTENSION citext FROM unpackaged</>.
3316      </para>
3317
3318      <para>
3319       If you have a previously-upgraded database that is suffering from this
3320       problem, and you already ran the <command>CREATE EXTENSION</> command,
3321       you can manually run (as superuser) the <command>UPDATE</> commands
3322       found at the end of
3323       <filename><replaceable>SHAREDIR</>/extension/citext--unpackaged--1.0.sql</filename>.
3324       (Run <literal>pg_config --sharedir</> if you're uncertain where
3325       <replaceable>SHAREDIR</> is.)
3326       There is no harm in doing this again if unsure.
3327      </para>
3328     </listitem>
3329
3330     <listitem>
3331      <para>
3332       Fix possible crash during <command>UPDATE</> or <command>DELETE</> that
3333       joins to the output of a scalar-returning function (Tom Lane)
3334      </para>
3335
3336      <para>
3337       A crash could only occur if the target row had been concurrently
3338       updated, so this problem surfaced only intermittently.
3339      </para>
3340     </listitem>
3341
3342     <listitem>
3343      <para>
3344       Fix incorrect replay of WAL records for GIN index updates
3345       (Tom Lane)
3346      </para>
3347
3348      <para>
3349       This could result in transiently failing to find index entries after
3350       a crash, or on a hot-standby server.  The problem would be repaired
3351       by the next <command>VACUUM</> of the index, however.
3352      </para>
3353     </listitem>
3354
3355     <listitem>
3356      <para>
3357       Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS
3358       SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</>
3359       (Tom Lane)
3360      </para>
3361
3362      <para>
3363       If a table has been modified by <command>ALTER TABLE ADD COLUMN</>,
3364       attempts to copy its data verbatim to another table could produce
3365       corrupt results in certain corner cases.
3366       The problem can only manifest in this precise form in 8.4 and later,
3367       but we patched earlier versions as well in case there are other code
3368       paths that could trigger the same bug.
3369      </para>
3370     </listitem>
3371
3372     <listitem>
3373      <para>
3374       Fix possible failures during hot standby startup (Simon Riggs)
3375      </para>
3376     </listitem>
3377
3378     <listitem>
3379      <para>
3380       Start hot standby faster when initial snapshot is incomplete
3381       (Simon Riggs)
3382      </para>
3383     </listitem>
3384
3385     <listitem>
3386      <para>
3387       Fix race condition during toast table access from stale syscache entries
3388       (Tom Lane)
3389      </para>
3390
3391      <para>
3392       The typical symptom was transient errors like <quote>missing chunk
3393       number 0 for toast value NNNNN in pg_toast_2619</>, where the cited
3394       toast table would always belong to a system catalog.
3395      </para>
3396     </listitem>
3397
3398     <listitem>
3399      <para>
3400       Track dependencies of functions on items used in parameter default
3401       expressions (Tom Lane)
3402      </para>
3403
3404      <para>
3405       Previously, a referenced object could be dropped without having dropped
3406       or modified the function, leading to misbehavior when the function was
3407       used.  Note that merely installing this update will not fix the missing
3408       dependency entries; to do that, you'd need to <command>CREATE OR
3409       REPLACE</> each such function afterwards.  If you have functions whose
3410       defaults depend on non-built-in objects, doing so is recommended.
3411      </para>
3412     </listitem>
3413
3414     <listitem>
3415      <para>
3416       Fix incorrect management of placeholder variables in nestloop joins
3417       (Tom Lane)
3418      </para>
3419
3420      <para>
3421       This bug is known to lead to <quote>variable not found in subplan target
3422       list</> planner errors, and could possibly result in wrong query output
3423       when outer joins are involved.
3424      </para>
3425     </listitem>
3426
3427     <listitem>
3428      <para>
3429       Fix window functions that sort by expressions involving aggregates
3430       (Tom Lane)
3431      </para>
3432
3433      <para>
3434       Previously these could fail with <quote>could not find pathkey item to
3435       sort</> planner errors.
3436      </para>
3437     </listitem>
3438
3439     <listitem>
3440      <para>
3441       Fix <quote>MergeAppend child's targetlist doesn't match MergeAppend</>
3442       planner errors (Tom Lane)
3443      </para>
3444     </listitem>
3445
3446     <listitem>
3447      <para>
3448       Fix index matching for operators with both collatable and noncollatable
3449       inputs (Tom Lane)
3450      </para>
3451
3452      <para>
3453       In 9.1.0, an indexable operator that has a non-collatable left-hand
3454       input type and a collatable right-hand input type would not be
3455       recognized as matching the left-hand column's index.  An example is
3456       the <type>hstore</> <literal>?</> <type>text</> operator.
3457      </para>
3458     </listitem>
3459
3460     <listitem>
3461      <para>
3462       Allow inlining of set-returning SQL functions with multiple OUT
3463       parameters (Tom Lane)
3464      </para>
3465     </listitem>
3466
3467     <listitem>
3468      <para>
3469       Don't trust deferred-unique indexes for join removal (Tom Lane and Marti
3470       Raudsepp)
3471      </para>
3472
3473      <para>
3474       A deferred uniqueness constraint might not hold intra-transaction,
3475       so assuming that it does could give incorrect query results.
3476      </para>
3477     </listitem>
3478
3479     <listitem>
3480      <para>
3481       Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte
3482       header, and add a new macro, <function>DatumGetInetPP()</>, that does
3483       not (Heikki Linnakangas)
3484      </para>
3485
3486      <para>
3487       This change affects no core code, but might prevent crashes in add-on
3488       code that expects <function>DatumGetInetP()</> to produce an unpacked
3489       datum as per usual convention.
3490      </para>
3491     </listitem>
3492
3493     <listitem>
3494      <para>
3495       Improve locale support in <type>money</> type's input and output
3496       (Tom Lane)
3497      </para>
3498
3499      <para>
3500       Aside from not supporting all standard
3501       <link linkend="guc-lc-monetary"><varname>lc_monetary</></link>
3502       formatting options, the input and output functions were inconsistent,
3503       meaning there were locales in which dumped <type>money</> values could
3504       not be re-read.
3505      </para>
3506     </listitem>
3507
3508     <listitem>
3509      <para>
3510       Don't let <link
3511       linkend="guc-transform-null-equals"><varname>transform_null_equals</></link>
3512       affect <literal>CASE foo WHEN NULL ...</> constructs
3513       (Heikki Linnakangas)
3514      </para>
3515
3516      <para>
3517       <varname>transform_null_equals</> is only supposed to affect
3518       <literal>foo = NULL</> expressions written directly by the user, not
3519       equality checks generated internally by this form of <literal>CASE</>.
3520      </para>
3521     </listitem>
3522
3523     <listitem>
3524      <para>
3525       Change foreign-key trigger creation order to better support
3526       self-referential foreign keys (Tom Lane)
3527      </para>
3528
3529      <para>
3530       For a cascading foreign key that references its own table, a row update
3531       will fire both the <literal>ON UPDATE</> trigger and the
3532       <literal>CHECK</> trigger as one event.  The <literal>ON UPDATE</>
3533       trigger must execute first, else the <literal>CHECK</> will check a
3534       non-final state of the row and possibly throw an inappropriate error.
3535       However, the firing order of these triggers is determined by their
3536       names, which generally sort in creation order since the triggers have
3537       auto-generated names following the convention
3538       <quote>RI_ConstraintTrigger_NNNN</>.  A proper fix would require
3539       modifying that convention, which we will do in 9.2, but it seems risky
3540       to change it in existing releases.  So this patch just changes the
3541       creation order of the triggers.  Users encountering this type of error
3542       should drop and re-create the foreign key constraint to get its
3543       triggers into the right order.
3544      </para>
3545     </listitem>
3546
3547     <listitem>
3548      <para>
3549       Fix <literal>IF EXISTS</> to work correctly in <command>DROP OPERATOR
3550       FAMILY</> (Robert Haas)
3551      </para>
3552     </listitem>
3553
3554     <listitem>
3555      <para>
3556       Disallow dropping of an extension from within its own script
3557       (Tom Lane)
3558      </para>
3559
3560      <para>
3561       This prevents odd behavior in case of incorrect management of extension
3562       dependencies.
3563      </para>
3564     </listitem>
3565
3566     <listitem>
3567      <para>
3568       Don't mark auto-generated types as extension members (Robert Haas)
3569      </para>
3570
3571      <para>
3572       Relation rowtypes and automatically-generated array types do not need to
3573       have their own extension membership entries in <structname>pg_depend</>,
3574       and creating such entries complicates matters for extension upgrades.
3575      </para>
3576     </listitem>
3577
3578     <listitem>
3579      <para>
3580       Cope with invalid pre-existing <varname>search_path</> settings during
3581       <command>CREATE EXTENSION</> (Tom Lane)
3582      </para>
3583     </listitem>
3584
3585     <listitem>
3586      <para>
3587       Avoid floating-point underflow while tracking buffer allocation rate
3588       (Greg Matthews)
3589      </para>
3590
3591      <para>
3592       While harmless in itself, on certain platforms this would result in
3593       annoying kernel log messages.
3594      </para>
3595     </listitem>
3596
3597     <listitem>
3598      <para>
3599       Prevent autovacuum transactions from running in serializable mode
3600       (Tom Lane)
3601      </para>
3602
3603      <para>
3604       Autovacuum formerly used the cluster-wide default transaction isolation
3605       level, but there is no need for it to use anything higher than READ
3606       COMMITTED, and using SERIALIZABLE could result in unnecessary delays
3607       for other processes.
3608      </para>
3609     </listitem>
3610
3611     <listitem>
3612      <para>
3613       Ensure walsender processes respond promptly to <systemitem>SIGTERM</>
3614       (Magnus Hagander)
3615      </para>
3616     </listitem>
3617
3618     <listitem>
3619      <para>
3620       Exclude <filename>postmaster.opts</> from base backups
3621       (Magnus Hagander)
3622      </para>
3623     </listitem>
3624
3625     <listitem>
3626      <para>
3627       Preserve configuration file name and line number values when starting
3628       child processes under Windows (Tom Lane)
3629      </para>
3630
3631      <para>
3632       Formerly, these would not be displayed correctly in the
3633       <structname>pg_settings</> view.
3634      </para>
3635     </listitem>
3636
3637     <listitem>
3638      <para>
3639       Fix incorrect field alignment in <application>ecpg</>'s SQLDA area
3640       (Zoltan Boszormenyi)
3641      </para>
3642     </listitem>
3643
3644     <listitem>
3645      <para>
3646       Preserve blank lines within commands in <application>psql</>'s command
3647       history (Robert Haas)
3648      </para>
3649
3650      <para>
3651       The former behavior could cause problems if an empty line was removed
3652       from within a string literal, for example.
3653      </para>
3654     </listitem>
3655
3656     <listitem>
3657      <para>
3658       Avoid platform-specific infinite loop in <application>pg_dump</>
3659       (Steve Singer)
3660      </para>
3661     </listitem>
3662
3663     <listitem>
3664      <para>
3665       Fix compression of plain-text output format in <application>pg_dump</>
3666       (Adrian Klaver and Tom Lane)
3667      </para>
3668
3669      <para>
3670       <application>pg_dump</> has historically understood <literal>-Z</> with
3671       no <literal>-F</> switch to mean that it should emit a gzip-compressed
3672       version of its plain text output.  Restore that behavior.
3673      </para>
3674     </listitem>
3675
3676     <listitem>
3677      <para>
3678       Fix <application>pg_dump</> to dump user-defined casts between
3679       auto-generated types, such as table rowtypes (Tom Lane)
3680      </para>
3681     </listitem>
3682
3683     <listitem>
3684      <para>
3685       Fix missed quoting of foreign server names in <application>pg_dump</>
3686       (Tom Lane)
3687      </para>
3688     </listitem>
3689
3690     <listitem>
3691      <para>
3692       Assorted fixes for <application>pg_upgrade</> (Bruce Momjian)
3693      </para>
3694
3695      <para>
3696       Handle exclusion constraints correctly, avoid failures on Windows,
3697       don't complain about mismatched toast table names in 8.4 databases.
3698      </para>
3699     </listitem>
3700
3701     <listitem>
3702      <para>
3703       In PL/pgSQL, allow foreign tables to define row types
3704       (Alexander Soudakov)
3705      </para>
3706     </listitem>
3707
3708     <listitem>
3709      <para>
3710       Fix up conversions of PL/Perl functions' results
3711       (Alex Hunsaker and Tom Lane)
3712      </para>
3713
3714      <para>
3715       Restore the pre-9.1 behavior that PL/Perl functions returning
3716       <type>void</> ignore the result value of their last Perl statement;
3717       9.1.0 would throw an error if that statement returned a reference.
3718       Also, make sure it works to return a string value for a composite type,
3719       so long as the string meets the type's input format.
3720       In addition, throw errors for attempts to return Perl arrays or hashes
3721       when the function's declared result type is not an array or composite
3722       type, respectively.  (Pre-9.1 versions rather uselessly returned
3723       strings like <literal>ARRAY(0x221a9a0)</> or
3724       <literal>HASH(0x221aa90)</> in such cases.)
3725      </para>
3726     </listitem>
3727
3728     <listitem>
3729      <para>
3730       Ensure PL/Perl strings are always correctly UTF8-encoded
3731       (Amit Khandekar and Alex Hunsaker)
3732      </para>
3733     </listitem>
3734
3735     <listitem>
3736      <para>
3737       Use the preferred version of <application>xsubpp</> to build PL/Perl,
3738       not necessarily the operating system's main copy
3739       (David Wheeler and Alex Hunsaker)
3740      </para>
3741     </listitem>
3742
3743     <listitem>
3744      <para>
3745       Correctly propagate SQLSTATE in PL/Python exceptions
3746       (Mika Eloranta and Jan Urbanski)
3747      </para>
3748     </listitem>
3749
3750     <listitem>
3751      <para>
3752       Do not install PL/Python extension files for Python major versions
3753       other than the one built against (Peter Eisentraut)
3754      </para>
3755     </listitem>
3756
3757     <listitem>
3758      <para>
3759       Change all the <filename>contrib</> extension script files to report
3760       a useful error message if they are fed to <application>psql</>
3761       (Andrew Dunstan and Tom Lane)
3762      </para>
3763
3764      <para>
3765       This should help teach people about the new method of using
3766       <command>CREATE EXTENSION</> to load these files.  In most cases,
3767       sourcing the scripts directly would fail anyway, but with
3768       harder-to-interpret messages.
3769      </para>
3770     </listitem>
3771
3772     <listitem>
3773      <para>
3774       Fix incorrect coding in <filename>contrib/dict_int</> and
3775       <filename>contrib/dict_xsyn</> (Tom Lane)
3776      </para>
3777
3778      <para>
3779       Some functions incorrectly assumed that memory returned by
3780       <function>palloc()</> is guaranteed zeroed.
3781      </para>
3782     </listitem>
3783
3784     <listitem>
3785      <para>
3786       Remove <filename>contrib/sepgsql</> tests from the regular regression
3787       test mechanism (Tom Lane)
3788      </para>
3789
3790      <para>
3791       Since these tests require root privileges for setup, they're impractical
3792       to run automatically.  Switch over to a manual approach instead, and
3793       provide a testing script to help with that.
3794      </para>
3795     </listitem>
3796
3797     <listitem>
3798      <para>
3799       Fix assorted errors in <filename>contrib/unaccent</>'s configuration
3800       file parsing (Tom Lane)
3801      </para>
3802     </listitem>
3803
3804     <listitem>
3805      <para>
3806       Honor query cancel interrupts promptly in <function>pgstatindex()</>
3807       (Robert Haas)
3808      </para>
3809     </listitem>
3810
3811     <listitem>
3812      <para>
3813       Fix incorrect quoting of log file name in Mac OS X start script
3814       (Sidar Lopez)
3815      </para>
3816     </listitem>
3817
3818     <listitem>
3819      <para>
3820       Revert unintentional enabling of <literal>WAL_DEBUG</> (Robert Haas)
3821      </para>
3822
3823      <para>
3824       Fortunately, as debugging tools go, this one is pretty cheap;
3825       but it's not intended to be enabled by default, so revert.
3826      </para>
3827     </listitem>
3828
3829     <listitem>
3830      <para>
3831       Ensure VPATH builds properly install all server header files
3832       (Peter Eisentraut)
3833      </para>
3834     </listitem>
3835
3836     <listitem>
3837      <para>
3838       Shorten file names reported in verbose error messages (Peter Eisentraut)
3839      </para>
3840
3841      <para>
3842       Regular builds have always reported just the name of the C file
3843       containing the error message call, but VPATH builds formerly
3844       reported an absolute path name.
3845      </para>
3846     </listitem>
3847
3848     <listitem>
3849      <para>
3850       Fix interpretation of Windows timezone names for Central America
3851       (Tom Lane)
3852      </para>
3853
3854      <para>
3855       Map <quote>Central America Standard Time</> to <literal>CST6</>, not
3856       <literal>CST6CDT</>, because DST is generally not observed anywhere in
3857       Central America.
3858      </para>
3859     </listitem>
3860
3861     <listitem>
3862      <para>
3863       Update time zone data files to <application>tzdata</> release 2011n
3864       for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa;
3865       also historical corrections for Alaska and British East Africa.
3866      </para>
3867     </listitem>
3868
3869    </itemizedlist>
3870
3871   </sect2>
3872  </sect1>
3873
3874  <sect1 id="release-9-1-1">
3875   <title>Release 9.1.1</title>
3876
3877   <note>
3878   <title>Release Date</title>
3879   <simpara>2011-09-26</simpara>
3880   </note>
3881
3882   <para>
3883    This release contains a small number of fixes from 9.1.0.
3884    For information about new features in the 9.1 major release, see
3885    <xref linkend="release-9-1">.
3886   </para>
3887
3888   <sect2>
3889    <title>Migration to Version 9.1.1</title>
3890
3891    <para>
3892     A dump/restore is not required for those running 9.1.X.
3893    </para>
3894
3895   </sect2>
3896
3897   <sect2>
3898    <title>Changes</title>
3899
3900    <itemizedlist>
3901
3902     <listitem>
3903      <para>
3904       Make <function>pg_options_to_table</> return NULL for an option with no
3905       value (Tom Lane)
3906      </para>
3907
3908      <para>
3909       Previously such cases would result in a server crash.
3910      </para>
3911     </listitem>
3912
3913     <listitem>
3914      <para>
3915       Fix memory leak at end of a GiST index scan (Tom Lane)
3916      </para>
3917
3918      <para>
3919       Commands that perform many separate GiST index scans, such as
3920       verification of a new GiST-based exclusion constraint on a table
3921       already containing many rows, could transiently require large amounts of
3922       memory due to this leak.
3923      </para>
3924     </listitem>
3925
3926     <listitem>
3927      <para>
3928       Fix explicit reference to <literal>pg_temp</> schema in <command>CREATE
3929       TEMPORARY TABLE</> (Robert Haas)
3930      </para>
3931
3932      <para>
3933       This used to be allowed, but failed in 9.1.0.
3934      </para>
3935     </listitem>
3936
3937    </itemizedlist>
3938
3939   </sect2>
3940  </sect1>
3941
3942  <sect1 id="release-9-1">
3943   <title>Release 9.1</title>
3944
3945   <note>
3946    <title>Release Date</title>
3947    <simpara>2011-09-12</simpara>
3948   </note>
3949
3950   <sect2>
3951    <title>Overview</title>
3952
3953    <para>
3954     This release shows <productname>PostgreSQL</> moving beyond the
3955     traditional relational-database feature set with new, ground-breaking
3956     functionality that is unique to <productname>PostgreSQL</>.
3957     The streaming replication feature introduced in release 9.0 is
3958     significantly enhanced by adding a synchronous-replication option,
3959     streaming backups, and monitoring improvements.
3960     Major enhancements include:
3961    </para>
3962
3963    <itemizedlist>
3964
3965     <!-- This list duplicates items below, but without authors or details-->
3966
3967     <listitem>
3968      <para>
3969       Allow <link linkend="synchronous-replication">synchronous
3970       replication</link>
3971      </para>
3972     </listitem>
3973
3974     <listitem>
3975      <para>
3976       Add support for <link linkend="SQL-CREATEFOREIGNTABLE">foreign
3977       tables</link>
3978      </para>
3979     </listitem>
3980
3981     <listitem>
3982      <para>
3983       Add per-column <link
3984       linkend="collation">collation</link> support
3985      </para>
3986     </listitem>
3987
3988     <listitem>
3989      <para>
3990       Add <link linkend="extend-extensions">extensions</link> which
3991       simplify packaging of additions to <productname>PostgreSQL</>
3992      </para>
3993     </listitem>
3994
3995     <listitem>
3996      <para>
3997       Add a true <link
3998       linkend="xact-serializable">serializable isolation level</link>
3999      </para>
4000     </listitem>
4001
4002     <listitem>
4003      <para>
4004       Support unlogged tables using the <literal>UNLOGGED</>
4005       option in <link linkend="SQL-CREATETABLE"><command>CREATE
4006       TABLE</></link>
4007      </para>
4008     </listitem>
4009
4010     <listitem>
4011      <para>
4012       Allow data-modification commands
4013       (<command>INSERT</>/<command>UPDATE</>/<command>DELETE</>) in
4014       <link linkend="queries-with"><literal>WITH</></link> clauses
4015      </para>
4016     </listitem>
4017
4018     <listitem>
4019      <para>
4020       Add nearest-neighbor (order-by-operator) searching to <link
4021       linkend="GiST"><acronym>GiST</> indexes</link>
4022      </para>
4023     </listitem>
4024
4025     <listitem>
4026      <para>
4027       Add a <link linkend="SQL-SECURITY-LABEL"><command>SECURITY
4028       LABEL</></link> command and support for
4029       <link linkend="sepgsql"><acronym>SELinux</> permissions control</link>
4030      </para>
4031     </listitem>
4032
4033     <listitem>
4034      <para>
4035       Update the <link linkend="plpython">PL/Python</link> server-side
4036       language
4037      </para>
4038     </listitem>
4039
4040    </itemizedlist>
4041
4042    <para>
4043     The above items are explained in more detail in the sections below.
4044    </para>
4045
4046   </sect2>
4047
4048   <sect2>
4049
4050   <title>Migration to Version 9.1</title>
4051
4052    <para>
4053     A dump/restore using <application>pg_dump</application>,
4054     or use of <application>pg_upgrade</application>, is required
4055     for those wishing to migrate data from any previous
4056     release.
4057    </para>
4058
4059    <para>
4060     Version 9.1 contains a number of changes that may affect compatibility
4061     with previous releases.  Observe the following incompatibilities:
4062    </para>
4063
4064    <sect3>
4065     <title>Strings</title>
4066
4067     <itemizedlist>
4068
4069      <listitem>
4070       <para>
4071        Change the default value of <link
4072        linkend="guc-standard-conforming-strings"><varname>standard_conforming_strings</></link>
4073        to on (Robert Haas)
4074       </para>
4075
4076       <para>
4077        By default, backslashes are now ordinary characters in string literals,
4078        not escape characters.  This change removes a long-standing
4079        incompatibility with the SQL standard.  <link
4080        linkend="guc-escape-string-warning"><varname>escape_string_warning</></link>
4081        has produced warnings about this usage for years.  <literal>E''</>
4082        strings are the proper way to embed backslash escapes in strings and are
4083        unaffected by this change.
4084       </para>
4085
4086       <warning>
4087        <para>
4088         This change can break applications that are not expecting it and
4089         do their own string escaping according to the old rules.  The
4090         consequences could be as severe as introducing SQL-injection security
4091         holes.  Be sure to test applications that are exposed to untrusted
4092         input, to ensure that they correctly handle single quotes and
4093         backslashes in text strings.
4094        </para>
4095       </warning>
4096      </listitem>
4097
4098     </itemizedlist>
4099
4100    </sect3>
4101
4102    <sect3>
4103     <title>Casting</title>
4104
4105     <itemizedlist>
4106
4107      <listitem>
4108       <para>
4109        Disallow function-style and attribute-style data type casts for
4110        composite types (Tom Lane)
4111       </para>
4112
4113       <para>
4114        For example, disallow
4115        <literal><replaceable>composite_value</>.text</literal> and
4116        <literal>text(<replaceable>composite_value</>)</literal>.
4117        Unintentional uses of this syntax have frequently resulted in bug
4118        reports; although it was not a bug, it seems better to go back to
4119        rejecting such expressions.
4120        The <literal>CAST</> and <literal>::</> syntaxes are still available
4121        for use when a cast of an entire composite value is actually intended.
4122       </para>
4123      </listitem>
4124
4125      <listitem>
4126       <para>
4127        Tighten casting checks for domains based on arrays (Tom Lane)
4128       </para>
4129
4130       <para>
4131        When a domain is based on an array type, it is allowed to <quote>look
4132        through</> the domain type to access the array elements, including
4133        subscripting the domain value to fetch or assign an element.
4134        Assignment to an element of such a domain value, for instance via
4135        <literal>UPDATE ... SET domaincol[5] = ...</>, will now result in
4136        rechecking the domain type's constraints, whereas before the checks
4137        were skipped.
4138       </para>
4139      </listitem>
4140
4141     </itemizedlist>
4142
4143    </sect3>
4144
4145    <sect3>
4146     <title>Arrays</title>
4147
4148     <itemizedlist>
4149
4150      <listitem>
4151       <para>
4152        Change <link
4153        linkend="array-functions-table"><function>string_to_array()</></link>
4154        to return an empty array for a zero-length string (Pavel
4155        Stehule)
4156       </para>
4157
4158       <para>
4159        Previously this returned a null value.
4160       </para>
4161      </listitem>
4162
4163      <listitem>
4164       <para>
4165        Change <link
4166        linkend="array-functions-table"><function>string_to_array()</></link>
4167        so a <literal>NULL</> separator splits the string into characters
4168        (Pavel Stehule)
4169       </para>
4170
4171       <para>
4172        Previously this returned a null value.
4173       </para>
4174      </listitem>
4175
4176     </itemizedlist>
4177
4178    </sect3>
4179
4180    <sect3>
4181     <title>Object Modification</title>
4182
4183     <itemizedlist>
4184
4185      <listitem>
4186       <para>
4187        Fix improper checks for before/after triggers (Tom Lane)
4188       </para>
4189
4190       <para>
4191        Triggers can now be fired in three cases: <literal>BEFORE</>,
4192        <literal>AFTER</>, or <literal>INSTEAD OF</> some action.
4193        Trigger function authors should verify that their logic behaves
4194        sanely in all three cases.
4195       </para>
4196      </listitem>
4197
4198      <listitem>
4199       <para>
4200         Require superuser or <literal>CREATEROLE</> permissions in order to
4201         set comments on roles (Tom Lane)
4202       </para>
4203      </listitem>
4204
4205     </itemizedlist>
4206
4207    </sect3>
4208
4209    <sect3>
4210     <title>Server Settings</title>
4211
4212     <itemizedlist>
4213
4214      <listitem>
4215       <para>
4216        Change <link
4217        linkend="functions-recovery-info-table"><function>pg_last_xlog_receive_location()</></link>
4218        so it never moves backwards (Fujii Masao)
4219       </para>
4220
4221       <para>
4222        Previously, the value of <function>pg_last_xlog_receive_location()</>
4223        could move backward when streaming replication is restarted.
4224       </para>
4225      </listitem>
4226
4227      <listitem>
4228       <para>
4229        Have logging of replication connections honor <link
4230        linkend="guc-log-connections"><varname>log_connections</></link>
4231        (Magnus Hagander)
4232       </para>
4233
4234       <para>
4235        Previously, replication connections were always logged.
4236       </para>
4237      </listitem>
4238
4239     </itemizedlist>
4240
4241    </sect3>
4242
4243    <sect3>
4244     <title><link linkend="plpgsql">PL/pgSQL</link> Server-Side Language</title>
4245
4246     <itemizedlist>
4247
4248      <listitem>
4249       <para>
4250        Change PL/pgSQL's <literal>RAISE</> command without parameters
4251        to be catchable by the attached exception block (Piyush Newe)
4252       </para>
4253
4254       <para>
4255        Previously <literal>RAISE</> in a code block was always scoped to
4256        an attached exception block, so it was uncatchable at the same
4257        scope.
4258       </para>
4259      </listitem>
4260
4261      <listitem>
4262       <para>
4263        Adjust PL/pgSQL's error line numbering code to be consistent
4264        with other PLs (Pavel Stehule)
4265       </para>
4266
4267       <para>
4268        Previously, PL/pgSQL would ignore (not count) an empty line at the
4269        start of the function body.  Since this was inconsistent with all
4270        other languages, the special case was removed.
4271       </para>
4272      </listitem>
4273
4274      <listitem>
4275       <para>
4276        Make PL/pgSQL complain about conflicting IN and OUT parameter names
4277        (Tom Lane)
4278       </para>
4279
4280       <para>
4281        Formerly, the collision was not detected, and the name would just
4282        silently refer to only the OUT parameter.
4283       </para>
4284      </listitem>
4285
4286      <listitem>
4287       <para>
4288        Type modifiers of PL/pgSQL variables are now visible to the SQL parser
4289        (Tom Lane)
4290       </para>
4291
4292       <para>
4293        A type modifier (such as a varchar length limit) attached to a PL/pgSQL
4294        variable was formerly enforced during assignments, but was ignored for
4295        all other purposes.  Such variables will now behave more like table
4296        columns declared with the same modifier.  This is not expected to make
4297        any visible difference in most cases, but it could result in subtle
4298        changes for some SQL commands issued by PL/pgSQL functions.
4299       </para>
4300      </listitem>
4301
4302     </itemizedlist>
4303
4304    </sect3>
4305
4306    <sect3>
4307     <title>Contrib</title>
4308
4309     <itemizedlist>
4310
4311      <listitem>
4312       <para>
4313        All contrib modules are now installed with <link
4314        linkend="SQL-CREATEEXTENSION"><command>CREATE EXTENSION</></link>
4315        rather than by manually invoking their SQL scripts
4316        (Dimitri Fontaine, Tom Lane)
4317       </para>
4318
4319       <para>
4320        To update an existing database containing the 9.0 version of a contrib
4321        module, use <literal>CREATE EXTENSION ... FROM unpackaged</literal>
4322        to wrap the existing contrib module's objects into an extension.  When
4323        updating from a pre-9.0 version, drop the contrib module's objects
4324        using its old uninstall script, then use <literal>CREATE EXTENSION</>.
4325       </para>
4326      </listitem>
4327
4328     </itemizedlist>
4329
4330    </sect3>
4331
4332    <sect3>
4333     <title>Other Incompatibilities</title>
4334
4335     <itemizedlist>
4336
4337      <listitem>
4338       <para>
4339        Make <link
4340        linkend="monitoring-stats-funcs-table"><function>pg_stat_reset()</></link>
4341        reset all database-level statistics (Tomas Vondra)
4342       </para>
4343
4344       <para>
4345        Some <structname>pg_stat_database</> counters were not being reset.
4346       </para>
4347      </listitem>
4348
4349      <listitem>
4350       <para>
4351         Fix some <link
4352         linkend="infoschema-triggers"><structname>information_schema.triggers</></link>
4353         column names to match the new SQL-standard names (Dean Rasheed)
4354       </para>
4355      </listitem>
4356
4357      <listitem>
4358       <para>
4359        Treat <application>ECPG</> cursor names as case-insensitive
4360        (Zoltan Boszormenyi)
4361       </para>
4362      </listitem>
4363
4364     </itemizedlist>
4365
4366    </sect3>
4367   </sect2>
4368
4369   <sect2>
4370    <title>Changes</title>
4371
4372    <para>
4373     Below you will find a detailed account of the changes between
4374     <productname>PostgreSQL</productname> 9.1 and the previous major
4375     release.
4376    </para>
4377
4378    <sect3>
4379     <title>Server</title>
4380
4381     <sect4>
4382      <title>Performance</title>
4383
4384      <itemizedlist>
4385
4386       <listitem>
4387        <para>
4388         Support unlogged tables using the <literal>UNLOGGED</>
4389         option in <link linkend="SQL-CREATETABLE"><command>CREATE
4390         TABLE</></link> (Robert Haas)
4391        </para>
4392
4393        <para>
4394         Such tables provide better update performance than regular tables,
4395         but are not crash-safe: their contents are automatically cleared in
4396         case of a server crash.  Their contents do not propagate to
4397         replication slaves, either.
4398        </para>
4399       </listitem>
4400
4401       <listitem>
4402        <para>
4403         Allow <literal>FULL OUTER JOIN</literal> to be implemented as a
4404         hash join, and allow either side of a <literal>LEFT OUTER JOIN</>
4405         or <literal>RIGHT OUTER JOIN</> to be hashed (Tom Lane)
4406        </para>
4407
4408        <para>
4409         Previously <literal>FULL OUTER JOIN</literal> could only be
4410         implemented as a merge join, and <literal>LEFT OUTER JOIN</literal>
4411         and <literal>RIGHT OUTER JOIN</literal> could hash only the nullable
4412         side of the join.  These changes provide additional query optimization
4413         possibilities.
4414        </para>
4415       </listitem>
4416
4417       <listitem>
4418        <para>
4419         Merge duplicate fsync requests (Robert Haas, Greg Smith)
4420        </para>
4421
4422        <para>
4423         This greatly improves performance under heavy write loads.
4424        </para>
4425       </listitem>
4426
4427       <listitem>
4428        <para>
4429         Improve performance of <link
4430         linkend="guc-commit-siblings"><varname>commit_siblings</></link>
4431         (Greg Smith)
4432        </para>
4433
4434        <para>
4435         This allows the use of <varname>commit_siblings</varname> with
4436         less overhead.
4437        </para>
4438       </listitem>
4439
4440       <listitem>
4441        <para>
4442         Reduce the memory requirement for large ispell dictionaries
4443         (Pavel Stehule, Tom Lane)
4444        </para>
4445       </listitem>
4446
4447       <listitem>
4448        <para>
4449         Avoid leaving data files open after <quote>blind writes</>
4450         (Alvaro Herrera)
4451        </para>
4452
4453        <para>
4454         This fixes scenarios in which backends might hold files open long
4455         after they were deleted, preventing the kernel from reclaiming
4456         disk space.
4457        </para>
4458       </listitem>
4459
4460      </itemizedlist>
4461
4462     </sect4>
4463
4464     <sect4>
4465      <title>Optimizer</title>
4466
4467      <itemizedlist>
4468
4469       <listitem>
4470        <para>
4471         Allow inheritance table scans to return meaningfully-sorted
4472         results (Greg Stark, Hans-Jurgen Schonig, Robert Haas, Tom Lane)
4473        </para>
4474
4475        <para>
4476         This allows better optimization of queries that use <literal>ORDER
4477         BY</>, <literal>LIMIT</>, or <literal>MIN</>/<literal>MAX</> with
4478         inherited tables.
4479        </para>
4480       </listitem>
4481
4482       <listitem>
4483        <para>
4484          Improve GIN index scan cost estimation (Teodor Sigaev)
4485        </para>
4486       </listitem>
4487
4488       <listitem>
4489        <para>
4490         Improve cost estimation for aggregates and window functions (Tom Lane)
4491        </para>
4492       </listitem>
4493
4494      </itemizedlist>
4495
4496     </sect4>
4497
4498     <sect4>
4499      <title>Authentication</title>
4500
4501      <itemizedlist>
4502
4503       <listitem>
4504        <para>
4505         Support host names and host suffixes
4506         (e.g. <literal>.example.com</>) in <link
4507         linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link>
4508         (Peter Eisentraut)
4509        </para>
4510
4511        <para>
4512         Previously only host <acronym>IP</> addresses and <acronym>CIDR</>
4513         values were supported.
4514        </para>
4515       </listitem>
4516
4517       <listitem>
4518        <para>
4519         Support the key word <literal>all</> in the host column of <link
4520         linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link>
4521         (Peter Eisentraut)
4522        </para>
4523
4524        <para>
4525         Previously people used <literal>0.0.0.0/0</> or <literal>::/0</>
4526         for this.
4527        </para>
4528       </listitem>
4529
4530       <listitem>
4531        <para>
4532         Reject <literal>local</> lines in <link
4533         linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link>
4534         on platforms that don't support Unix-socket connections
4535         (Magnus Hagander)
4536        </para>
4537
4538        <para>
4539         Formerly, such lines were silently ignored, which could be surprising.
4540         This makes the behavior more like other unsupported cases.
4541        </para>
4542       </listitem>
4543
4544       <listitem>
4545        <para>
4546         Allow <link linkend="gssapi-auth"><acronym>GSSAPI</></link>
4547         to be used to authenticate to servers via <link
4548         linkend="sspi-auth"><acronym>SSPI</></link> (Christian Ullrich)
4549        </para>
4550
4551        <para>
4552         Specifically this allows Unix-based <acronym>GSSAPI</> clients
4553         to do <acronym>SSPI</> authentication with Windows servers.
4554        </para>
4555       </listitem>
4556
4557       <listitem>
4558        <para>
4559         <link linkend="auth-ident"><literal>ident</literal></link>
4560         authentication over local sockets is now known as
4561         <link linkend="auth-peer"><literal>peer</literal></link>
4562         (Magnus Hagander)
4563        </para>
4564
4565        <para>
4566         The old term is still accepted for backward compatibility, but since
4567         the two methods are fundamentally different, it seemed better to adopt
4568         different names for them.
4569        </para>
4570       </listitem>
4571
4572       <listitem>
4573        <para>
4574         Rewrite <link linkend="auth-peer"><acronym>peer</></link>
4575         authentication to avoid use of credential control messages (Tom Lane)
4576        </para>
4577
4578        <para>
4579         This change makes the peer authentication code simpler and
4580         better-performing.  However, it requires the platform to provide the
4581         <function>getpeereid</> function or an equivalent socket operation.
4582         So far as is known, the only platform for which peer authentication
4583         worked before and now will not is pre-5.0 NetBSD.
4584        </para>
4585       </listitem>
4586
4587      </itemizedlist>
4588
4589     </sect4>
4590
4591     <sect4>
4592      <title>Monitoring</title>
4593
4594      <itemizedlist>
4595
4596       <listitem>
4597        <para>
4598         Add details to the logging of restartpoints and checkpoints,
4599         which is controlled by <link
4600         linkend="guc-log-checkpoints"><varname>log_checkpoints</></link>
4601         (Fujii Masao, Greg Smith)
4602        </para>
4603
4604        <para>
4605         New details include <acronym>WAL</> file and sync activity.
4606        </para>
4607       </listitem>
4608
4609       <listitem>
4610        <para>
4611          Add <link
4612          linkend="guc-log-file-mode"><varname>log_file_mode</></link>
4613          which controls the permissions on log files created by the
4614          logging collector (Martin Pihlak)
4615        </para>
4616       </listitem>
4617
4618       <listitem>
4619        <para>
4620         Reduce the default maximum line length for <application>syslog</>
4621         logging to 900 bytes plus prefixes (Noah Misch)
4622        </para>
4623
4624        <para>
4625         This avoids truncation of long log lines on syslog implementations
4626         that have a 1KB length limit, rather than the more common 2KB.
4627        </para>
4628       </listitem>
4629
4630      </itemizedlist>
4631
4632     </sect4>
4633
4634     <sect4>
4635      <title>Statistical Views</title>
4636
4637      <itemizedlist>
4638
4639       <listitem>
4640        <para>
4641         Add <structfield>client_hostname</structfield> column to <link
4642         linkend="monitoring-stats-views-table"><structname>pg_stat_activity</></link>
4643         (Peter Eisentraut)
4644        </para>
4645
4646        <para>
4647         Previously only the client address was reported.
4648        </para>
4649       </listitem>
4650
4651       <listitem>
4652        <para>
4653         Add <link
4654         linkend="monitoring-stats-views-table"><structname>pg_stat_xact_*</></link>
4655         statistics functions and views (Joel Jacobson)
4656        </para>
4657
4658        <para>
4659         These are like the database-wide statistics counter views, but
4660         reflect counts for only the current transaction.
4661        </para>
4662       </listitem>
4663
4664       <listitem>
4665        <para>
4666          Add time of last reset in database-level and background writer
4667          statistics views (Tomas Vondra)
4668        </para>
4669       </listitem>
4670
4671       <listitem>
4672        <para>
4673          Add columns showing the number of vacuum and analyze operations
4674          in <link
4675          linkend="monitoring-stats-views-table"><structname>pg_stat_*_tables</></link>
4676          views (Magnus Hagander)
4677        </para>
4678       </listitem>
4679
4680       <listitem>
4681        <para>
4682         Add <structfield>buffers_backend_fsync</> column to <link
4683         linkend="monitoring-stats-views-table"><structname>pg_stat_bgwriter</></link>
4684         (Greg Smith)
4685        </para>
4686
4687        <para>
4688         This new column counts the number of times a backend fsyncs a
4689         buffer.
4690        </para>
4691       </listitem>
4692
4693      </itemizedlist>
4694
4695     </sect4>
4696
4697     <sect4>
4698      <title>Server Settings</title>
4699
4700      <itemizedlist>
4701
4702       <listitem>
4703        <para>
4704         Provide auto-tuning of <link
4705         linkend="guc-wal-buffers"><varname>wal_buffers</></link> (Greg
4706         Smith)
4707        </para>
4708
4709        <para>
4710         By default, the value of <varname>wal_buffers</> is now chosen
4711         automatically based on the value of <varname>shared_buffers</>.
4712        </para>
4713       </listitem>
4714
4715       <listitem>
4716        <para>
4717         Increase the maximum values for
4718         <link linkend="guc-deadlock-timeout"><varname>deadlock_timeout</varname></link>,
4719         <link linkend="guc-log-min-duration-statement"><varname>log_min_duration_statement</varname></link>, and
4720         <link linkend="guc-log-autovacuum-min-duration"><varname>log_autovacuum_min_duration</varname></link>
4721         (Peter Eisentraut)
4722        </para>
4723
4724        <para>
4725         The maximum value for each of these parameters was previously
4726         only about 35 minutes.  Much larger values are now allowed.
4727        </para>
4728       </listitem>
4729
4730       </itemizedlist>
4731
4732     </sect4>
4733
4734    </sect3>
4735
4736    <sect3>
4737     <title>Replication and Recovery</title>
4738
4739    <sect4>
4740     <title>Streaming Replication and Continuous Archiving</title>
4741
4742     <itemizedlist>
4743
4744      <listitem>
4745       <para>
4746        Allow <link linkend="synchronous-replication">synchronous
4747        replication</link> (Simon Riggs, Fujii Masao)
4748       </para>
4749
4750       <para>
4751        This allows the primary server to wait for a standby to write a
4752        transaction's information to disk before acknowledging the commit.
4753        One standby at a time can take the role of the synchronous standby,
4754        as controlled by the
4755        <link linkend="guc-synchronous-standby-names"><varname>synchronous_standby_names</varname></link>
4756        setting.  Synchronous replication can be enabled or disabled on a
4757        per-transaction basis using the
4758        <link linkend="guc-synchronous-commit"><varname>synchronous_commit</></link>
4759        setting.
4760       </para>
4761      </listitem>
4762
4763      <listitem>
4764       <para>
4765        Add protocol support for sending file system backups to standby servers
4766        using the streaming replication network connection (Magnus Hagander,
4767        Heikki Linnakangas)
4768       </para>
4769
4770       <para>
4771        This avoids the requirement of manually transferring a file
4772        system backup when setting up a standby server.
4773       </para>
4774      </listitem>
4775
4776      <listitem>
4777       <para>
4778        Add
4779        <varname>replication_timeout</>
4780        setting (Fujii Masao, Heikki Linnakangas)
4781       </para>
4782
4783       <para>
4784        Replication connections that are idle for more than the
4785        <varname>replication_timeout</> interval will be terminated
4786        automatically.  Formerly, a failed connection was typically not
4787        detected until the TCP timeout elapsed, which is inconveniently
4788        long in many situations.
4789       </para>
4790      </listitem>
4791
4792      <listitem>
4793       <para>
4794        Add command-line tool <link
4795        linkend="app-pgbasebackup"><application>pg_basebackup</></link>
4796        for creating a new standby server or database backup (Magnus
4797        Hagander)
4798       </para>
4799      </listitem>
4800
4801      <listitem>
4802       <para>
4803        Add a <link linkend="SQL-CREATEROLE">replication permission</link>
4804        for roles (Magnus Hagander)
4805       </para>
4806
4807       <para>
4808        This is a read-only permission used for streaming replication.
4809        It allows a non-superuser role to be used for replication connections.
4810        Previously only superusers could initiate replication
4811        connections; superusers still have this permission by default.
4812       </para>
4813      </listitem>
4814
4815     </itemizedlist>
4816
4817     </sect4>
4818
4819     <sect4>
4820      <title>Replication Monitoring</title>
4821
4822      <itemizedlist>
4823
4824       <listitem>
4825        <para>
4826         Add system view <link
4827         linkend="monitoring-stats-views-table"><structname>pg_stat_replication</></link>
4828         which displays activity of <acronym>WAL</> sender processes (Itagaki
4829         Takahiro, Simon Riggs)
4830        </para>
4831
4832        <para>
4833         This reports the status of all connected standby servers.
4834        </para>
4835       </listitem>
4836
4837       <listitem>
4838        <para>
4839         Add monitoring function <link
4840         linkend="functions-recovery-info-table"><function>pg_last_xact_replay_timestamp()</></link>
4841         (Fujii Masao)
4842        </para>
4843
4844        <para>
4845         This returns the time at which the primary generated the most
4846         recent commit or abort record applied on the standby.
4847        </para>
4848       </listitem>
4849
4850      </itemizedlist>
4851
4852     </sect4>
4853
4854     <sect4>
4855      <title>Hot Standby</title>
4856
4857      <itemizedlist>
4858
4859      <listitem>
4860       <para>
4861        Add configuration parameter <link
4862        linkend="guc-hot-standby-feedback"><varname>hot_standby_feedback</></link>
4863        to enable standbys to postpone cleanup of old row versions on the
4864        primary (Simon Riggs)
4865       </para>
4866
4867       <para>
4868        This helps avoid canceling long-running queries on the standby.
4869       </para>
4870      </listitem>
4871
4872       <listitem>
4873        <para>
4874         Add the <link
4875         linkend="monitoring-stats-views-table"><structname>pg_stat_database_conflicts</></link>
4876         system view to show queries that have been canceled and the
4877         reason (Magnus Hagander)
4878        </para>
4879
4880        <para>
4881         Cancellations can occur because of dropped tablespaces, lock
4882         timeouts, old snapshots, pinned buffers, and deadlocks.
4883        </para>
4884       </listitem>
4885
4886       <listitem>
4887        <para>
4888         Add a <structfield>conflicts</> count to <link
4889         linkend="monitoring-stats-views-table"><structname>pg_stat_database</></link>
4890         (Magnus Hagander)
4891        </para>
4892
4893        <para>
4894         This is the number of conflicts that occurred in the database.
4895        </para>
4896       </listitem>
4897
4898       <listitem>
4899        <para>
4900         Increase the maximum values for
4901         <link linkend="guc-max-standby-archive-delay"><varname>max_standby_archive_delay</varname></link> and
4902         <link linkend="guc-max-standby-streaming-delay"><varname>max_standby_streaming_delay</varname></link>
4903        </para>
4904
4905        <para>
4906         The maximum value for each of these parameters was previously
4907         only about 35 minutes.  Much larger values are now allowed.
4908        </para>
4909       </listitem>
4910
4911       <listitem>
4912        <para>
4913         Add <link
4914         linkend="errcodes-table"><literal>ERRCODE_T_R_DATABASE_DROPPED</></link>
4915         error code to report recovery conflicts due to dropped databases
4916         (Tatsuo Ishii)
4917        </para>
4918
4919        <para>
4920         This is useful for connection pooling software.
4921        </para>
4922       </listitem>
4923
4924      </itemizedlist>
4925
4926     </sect4>
4927
4928     <sect4>
4929      <title>Recovery Control</title>
4930
4931      <itemizedlist>
4932
4933       <listitem>
4934        <para>
4935         Add functions to control streaming replication replay (Simon Riggs)
4936        </para>
4937
4938        <para>
4939         The new functions are <link
4940         linkend="functions-recovery-control-table"><function>pg_xlog_replay_pause()</></link>,
4941         <link
4942         linkend="functions-recovery-control-table"><function>pg_xlog_replay_resume()</></link>,
4943         and the status function <link
4944         linkend="functions-recovery-control-table"><function>pg_is_xlog_replay_paused()</></link>.
4945        </para>
4946       </listitem>
4947
4948       <listitem>
4949        <para>
4950         Add <filename>recovery.conf</> setting <link
4951         linkend="pause-at-recovery-target"><varname>pause_at_recovery_target</></link>
4952         to pause recovery at target (Simon Riggs)
4953        </para>
4954
4955        <para>
4956         This allows a recovery server to be queried to check whether
4957         the recovery point is the one desired.
4958        </para>
4959       </listitem>
4960
4961       <listitem>
4962        <para>
4963         Add the ability to create named restore points using <link
4964         linkend="functions-admin-backup-table"><function>pg_create_restore_point()</></link>
4965         (Jaime Casanova)
4966        </para>
4967
4968        <para>
4969         These named restore points can be specified as recovery
4970         targets using the new <filename>recovery.conf</> setting
4971         <link linkend="recovery-target-name"><varname>recovery_target_name</></link>.
4972        </para>
4973       </listitem>
4974
4975       <listitem>
4976        <para>
4977         Allow standby recovery to switch to a new timeline automatically
4978         (Heikki Linnakangas)
4979        </para>
4980
4981        <para>
4982         Now standby servers scan the archive directory for new
4983         timelines periodically.
4984        </para>
4985       </listitem>
4986
4987       <listitem>
4988        <para>
4989         Add <link
4990         linkend="guc-restart-after-crash"><varname>restart_after_crash</></link>
4991         setting which disables automatic server restart after a backend
4992         crash (Robert Haas)
4993        </para>
4994
4995        <para>
4996         This allows external cluster management software to control
4997         whether the database server restarts or not.
4998        </para>
4999       </listitem>
5000
5001       <listitem>
5002        <para>
5003         Allow <link
5004         linkend="recovery-config"><filename>recovery.conf</></link>
5005         to use the same quoting behavior as <filename>postgresql.conf</>
5006         (Dimitri Fontaine)
5007        </para>
5008
5009        <para>
5010         Previously all values had to be quoted.
5011        </para>
5012       </listitem>
5013
5014      </itemizedlist>
5015
5016     </sect4>
5017
5018    </sect3>
5019
5020    <sect3>
5021     <title>Queries</title>
5022
5023      <itemizedlist>
5024
5025       <listitem>
5026        <para>
5027         Add a true <link
5028         linkend="xact-serializable">serializable isolation level</link>
5029         (Kevin Grittner, Dan Ports)
5030        </para>
5031
5032        <para>
5033         Previously, asking for serializable isolation guaranteed only that a
5034         single MVCC snapshot would be used for the entire transaction, which
5035         allowed certain documented anomalies.  The old snapshot isolation
5036         behavior is still available by requesting the <link
5037         linkend="xact-repeatable-read"><literal>REPEATABLE READ</></link>
5038         isolation level.
5039        </para>
5040       </listitem>
5041
5042       <listitem>
5043        <para>
5044         Allow data-modification commands
5045         (<command>INSERT</>/<command>UPDATE</>/<command>DELETE</>) in
5046         <link linkend="queries-with"><literal>WITH</></link> clauses
5047         (Marko Tiikkaja, Hitoshi Harada)
5048        </para>
5049
5050        <para>
5051         These commands can use <literal>RETURNING</> to pass data up to the
5052         containing query.
5053        </para>
5054       </listitem>
5055
5056       <listitem>
5057        <para>
5058         Allow <link linkend="queries-with"><literal>WITH</></link>
5059         clauses to be attached to <command>INSERT</>, <command>UPDATE</>,
5060         <command>DELETE</> statements (Marko Tiikkaja, Hitoshi Harada)
5061        </para>
5062       </listitem>
5063
5064       <listitem>
5065        <para>
5066         Allow non-<link linkend="queries-group"><literal>GROUP
5067         BY</></link> columns in the query target list when the primary
5068         key is specified in the <literal>GROUP BY</> clause (Peter
5069         Eisentraut)
5070        </para>
5071
5072        <para>
5073         The SQL standard allows this behavior, and
5074         because of the primary key, the result is unambiguous.
5075        </para>
5076       </listitem>
5077
5078       <listitem>
5079        <para>
5080         Allow use of the key word <literal>DISTINCT</> in <link
5081         linkend="queries-union"><literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</></link>
5082         clauses (Tom Lane)
5083        </para>
5084
5085        <para>
5086         <literal>DISTINCT</> is the default behavior so use of this
5087         key word is redundant, but the SQL standard allows it.
5088        </para>
5089       </listitem>
5090
5091       <listitem>
5092        <para>
5093         Fix ordinary queries with rules to use the same snapshot behavior
5094         as <command>EXPLAIN ANALYZE</> (Marko Tiikkaja)
5095        </para>
5096
5097        <para>
5098         Previously <command>EXPLAIN ANALYZE</> used slightly different
5099         snapshot timing for queries involving rules.  The
5100         <command>EXPLAIN ANALYZE</> behavior was judged to be more logical.
5101        </para>
5102       </listitem>
5103
5104      </itemizedlist>
5105
5106     <sect4>
5107      <title>Strings</title>
5108
5109      <itemizedlist>
5110
5111       <listitem>
5112        <para>
5113         Add per-column <link
5114         linkend="collation">collation</link> support
5115         (Peter Eisentraut, Tom Lane)
5116        </para>
5117
5118        <para>
5119         Previously collation (the sort ordering of text strings) could only be
5120         chosen at database creation.
5121         Collation can now be set per column, domain, index, or
5122         expression, via the SQL-standard <literal>COLLATE</> clause.
5123        </para>
5124       </listitem>
5125
5126      </itemizedlist>
5127
5128     </sect4>
5129
5130    </sect3>
5131
5132    <sect3>
5133     <title>Object Manipulation</title>
5134
5135      <itemizedlist>
5136
5137       <listitem>
5138        <para>
5139         Add <link linkend="extend-extensions">extensions</link> which
5140         simplify packaging of additions to <productname>PostgreSQL</>
5141         (Dimitri Fontaine, Tom Lane)
5142        </para>
5143
5144        <para>
5145         Extensions are controlled by the new <link
5146         linkend="SQL-CREATEEXTENSION"><command>CREATE</></link>/<link
5147         linkend="SQL-ALTEREXTENSION"><command>ALTER</></link>/<link
5148         linkend="SQL-DROPEXTENSION"><command>DROP EXTENSION</></link>
5149         commands.  This replaces ad-hoc methods of grouping objects that
5150         are added to a <productname>PostgreSQL</> installation.
5151        </para>
5152       </listitem>
5153
5154       <listitem>
5155        <para>
5156         Add support for <link linkend="SQL-CREATEFOREIGNTABLE">foreign
5157         tables</link> (Shigeru Hanada, Robert Haas, Jan Urbanski,
5158         Heikki Linnakangas)
5159        </para>
5160
5161        <para>
5162         This allows data stored outside the database to be used like
5163         native <productname>PostgreSQL</>-stored data.  Foreign tables
5164         are currently read-only, however.
5165        </para>
5166       </listitem>
5167
5168      <listitem>
5169       <para>
5170          Allow new values to be added to an existing enum type via
5171          <link linkend="SQL-ALTERTYPE"><command>ALTER TYPE</></link> (Andrew
5172          Dunstan)
5173       </para>
5174      </listitem>
5175
5176       <listitem>
5177        <para>
5178         Add <link linkend="SQL-ALTERTYPE"><command>ALTER TYPE ...
5179         ADD/DROP/ALTER/RENAME ATTRIBUTE</></link> (Peter Eisentraut)
5180        </para>
5181
5182        <para>
5183         This allows modification of composite types.
5184        </para>
5185       </listitem>
5186
5187      </itemizedlist>
5188
5189     <sect4>
5190      <title><command>ALTER</> Object</title>
5191
5192      <itemizedlist>
5193
5194       <listitem>
5195        <para>
5196         Add <literal>RESTRICT</>/<literal>CASCADE</> to <link
5197         linkend="SQL-ALTERTYPE"><command>ALTER TYPE</></link> operations
5198         on typed tables (Peter Eisentraut)
5199        </para>
5200
5201        <para>
5202         This controls
5203         <literal>ADD</>/<literal>DROP</>/<literal>ALTER</>/<literal>RENAME
5204         ATTRIBUTE</> cascading behavior.
5205        </para>
5206       </listitem>
5207
5208       <listitem>
5209        <para>
5210         Support <literal>ALTER TABLE <replaceable>name</> {OF | NOT OF}
5211         <replaceable>type</></literal>
5212         (Noah Misch)
5213        </para>
5214
5215        <para>
5216         This syntax allows a standalone table to be made into a typed table,
5217         or a typed table to be made standalone.
5218        </para>
5219       </listitem>
5220
5221       <listitem>
5222        <para>
5223         Add support for more object types in <command>ALTER ... SET
5224         SCHEMA</> commands (Dimitri Fontaine)
5225        </para>
5226
5227        <para>
5228         This command is now supported for conversions, operators, operator
5229         classes, operator families, text search configurations, text search
5230         dictionaries, text search parsers, and text search templates.
5231        </para>
5232       </listitem>
5233
5234      </itemizedlist>
5235
5236     </sect4>
5237
5238     <sect4>
5239      <title><link linkend="SQL-CREATETABLE"><command>CREATE/ALTER TABLE</></link></title>
5240
5241      <itemizedlist>
5242
5243       <listitem>
5244        <para>
5245         Add <command>ALTER TABLE ...
5246         ADD UNIQUE/PRIMARY KEY USING INDEX</command>
5247         (Gurjeet Singh)
5248        </para>
5249
5250        <para>
5251         This allows a primary key or unique constraint to be defined using an
5252         existing unique index, including a concurrently created unique index.
5253        </para>
5254       </listitem>
5255
5256       <listitem>
5257        <para>
5258         Allow <command>ALTER TABLE</>
5259         to add foreign keys without validation (Simon Riggs)
5260        </para>
5261
5262        <para>
5263         The new option is called <literal>NOT VALID</>.  The constraint's
5264         state can later be modified to <literal>VALIDATED</> and validation
5265         checks performed. Together these allow you to add a foreign key
5266         with minimal impact on read and write operations.
5267        </para>
5268       </listitem>
5269
5270       <listitem>
5271        <para>
5272         Allow <link linkend="SQL-ALTERTABLE"><command>ALTER TABLE
5273         ... SET DATA TYPE</command></link> to avoid table rewrites in
5274         appropriate cases (Noah Misch, Robert Haas)
5275        </para>
5276
5277        <para>
5278         For example, converting a <type>varchar</> column to
5279         <type>text</> no longer requires a rewrite of the table.
5280         However, increasing the length constraint on a
5281         <type>varchar</> column still requires a table rewrite.
5282        </para>
5283       </listitem>
5284
5285       <listitem>
5286        <para>
5287         Add <link linkend="SQL-CREATETABLE"><command>CREATE TABLE IF
5288         NOT EXISTS</></link> syntax (Robert Haas)
5289        </para>
5290
5291        <para>
5292         This allows table creation without causing an error if the
5293         table already exists.
5294        </para>
5295       </listitem>
5296
5297       <listitem>
5298        <para>
5299         Fix possible <quote>tuple concurrently updated</quote> error
5300         when two backends attempt to add an inheritance
5301         child to the same table at the same time (Robert Haas)
5302        </para>
5303
5304        <para>
5305         <link linkend="sql-altertable"><command>ALTER TABLE</command></link>
5306         now takes a stronger lock on the parent table, so that the sessions
5307         cannot try to update it simultaneously.
5308        </para>
5309       </listitem>
5310
5311      </itemizedlist>
5312
5313     </sect4>
5314
5315     <sect4>
5316      <title>Object Permissions</title>
5317
5318      <itemizedlist>
5319
5320       <listitem>
5321        <para>
5322         Add a <link linkend="SQL-SECURITY-LABEL"><command>SECURITY
5323         LABEL</></link> command (KaiGai Kohei)
5324        </para>
5325
5326        <para>
5327         This allows security labels to be assigned to objects.
5328        </para>
5329       </listitem>
5330
5331      </itemizedlist>
5332
5333     </sect4>
5334
5335    </sect3>
5336
5337    <sect3>
5338     <title>Utility Operations</title>
5339
5340     <itemizedlist>
5341
5342      <listitem>
5343       <para>
5344        Add transaction-level <link linkend="advisory-locks">advisory
5345        locks</link> (Marko Tiikkaja)
5346       </para>
5347
5348       <para>
5349        These are similar to the existing session-level advisory locks,
5350        but such locks are automatically released at transaction end.
5351       </para>
5352      </listitem>
5353
5354      <listitem>
5355       <para>
5356        Make <link linkend="SQL-TRUNCATE"><command>TRUNCATE ... RESTART
5357        IDENTITY</></link> restart sequences transactionally (Steve
5358        Singer)
5359       </para>
5360
5361       <para>
5362        Previously the counter could have been left out of sync if a
5363        backend crashed between the on-commit truncation activity and
5364        commit completion.
5365       </para>
5366      </listitem>
5367
5368     </itemizedlist>
5369
5370     <sect4>
5371      <title><link linkend="SQL-COPY"><command>COPY</></link></title>
5372
5373      <itemizedlist>
5374
5375       <listitem>
5376        <para>
5377         Add <literal>ENCODING</> option to <link
5378         linkend="SQL-COPY"><command>COPY TO/FROM</></link> (Hitoshi
5379         Harada, Itagaki Takahiro)
5380        </para>
5381
5382        <para>
5383         This allows the encoding of the <command>COPY</> file to be
5384         specified separately from client encoding.
5385        </para>
5386       </listitem>
5387
5388       <listitem>
5389        <para>
5390         Add bidirectional <link linkend="SQL-COPY"><command>COPY</></link>
5391         protocol support (Fujii Masao)
5392        </para>
5393
5394        <para>
5395         This is currently only used by streaming replication.
5396        </para>
5397       </listitem>
5398
5399      </itemizedlist>
5400
5401     </sect4>
5402
5403     <sect4>
5404      <title><link linkend="SQL-EXPLAIN"><command>EXPLAIN</></link></title>
5405
5406       <itemizedlist>
5407
5408       <listitem>
5409        <para>
5410         Make <command>EXPLAIN VERBOSE</> show the function call expression
5411         in a <literal>FunctionScan</literal> node (Tom Lane)
5412        </para>
5413       </listitem>
5414
5415      </itemizedlist>
5416
5417     </sect4>
5418
5419     <sect4>
5420      <title><link linkend="SQL-VACUUM"><command>VACUUM</></link></title>
5421
5422      <itemizedlist>
5423
5424       <listitem>
5425        <para>
5426         Add additional details to the output of <link
5427         linkend="SQL-VACUUM"><command>VACUUM FULL VERBOSE</></link>
5428         and <link linkend="SQL-CLUSTER"><command>CLUSTER VERBOSE</></link>
5429         (Itagaki Takahiro)
5430        </para>
5431
5432        <para>
5433         New information includes the live and dead tuple count and
5434         whether <command>CLUSTER</> is using an index to rebuild.
5435        </para>
5436       </listitem>
5437
5438       <listitem>
5439        <para>
5440         Prevent <link linkend="autovacuum">autovacuum</link> from
5441         waiting if it cannot acquire a table lock (Robert Haas)
5442        </para>
5443
5444        <para>
5445         It will try to vacuum that table later.
5446        </para>
5447       </listitem>
5448
5449      </itemizedlist>
5450
5451     </sect4>
5452
5453     <sect4>
5454      <title><link linkend="SQL-CLUSTER"><command>CLUSTER</></link></title>
5455
5456      <itemizedlist>
5457
5458       <listitem>
5459        <para>
5460         Allow <command>CLUSTER</> to sort the table rather than scanning
5461         the index when it seems likely to be cheaper (Leonardo Francalanci)
5462        </para>
5463       </listitem>
5464
5465      </itemizedlist>
5466
5467     </sect4>
5468
5469     <sect4>
5470      <title>Indexes</title>
5471
5472      <itemizedlist>
5473
5474       <listitem>
5475        <para>
5476         Add nearest-neighbor (order-by-operator) searching to <link
5477         linkend="GiST"><acronym>GiST</> indexes</link> (Teodor Sigaev, Tom Lane)
5478        </para>
5479
5480        <para>
5481         This allows <acronym>GiST</> indexes to quickly return the
5482         <replaceable>N</> closest values in a query with <literal>LIMIT</>.
5483         For example
5484 <programlisting><![CDATA[
5485 SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10;
5486 ]]>
5487 </programlisting>
5488         finds the ten places closest to a given target point.
5489        </para>
5490       </listitem>
5491
5492       <listitem>
5493        <para>
5494         Allow <link linkend="GIN"><acronym>GIN</> indexes</link> to index null
5495         and empty values (Tom Lane)
5496        </para>
5497
5498        <para>
5499         This allows full <acronym>GIN</> index scans, and fixes various
5500         corner cases in which GIN scans would fail.
5501        </para>
5502       </listitem>
5503
5504       <listitem>
5505        <para>
5506         Allow <link linkend="GIN"><acronym>GIN</> indexes</link> to
5507         better recognize duplicate search entries (Tom Lane)
5508        </para>
5509
5510        <para>
5511         This reduces the cost of index scans, especially in cases where
5512         it avoids unnecessary full index scans.
5513        </para>
5514       </listitem>
5515
5516       <listitem>
5517        <para>
5518         Fix <link linkend="GiST"><acronym>GiST</> indexes</link> to be fully
5519         crash-safe (Heikki Linnakangas)
5520        </para>
5521
5522        <para>
5523         Previously there were rare cases where a <command>REINDEX</>
5524         would be required (you would be informed).
5525        </para>
5526       </listitem>
5527
5528      </itemizedlist>
5529
5530     </sect4>
5531
5532    </sect3>
5533
5534    <sect3>
5535     <title>Data Types</title>
5536
5537     <itemizedlist>
5538
5539      <listitem>
5540       <para>
5541        Allow <type>numeric</> to use a more compact, two-byte header
5542        in common cases (Robert Haas)
5543       </para>
5544
5545       <para>
5546        Previously all <type>numeric</> values had four-byte headers;
5547        this change saves on disk storage.
5548       </para>
5549      </listitem>
5550
5551      <listitem>
5552       <para>
5553         Add support for dividing <type>money</> by <type>money</>
5554         (Andy Balholm)
5555       </para>
5556      </listitem>
5557
5558      <listitem>
5559       <para>
5560        Allow binary I/O on type <type>void</type> (Radoslaw Smogura)
5561       </para>
5562      </listitem>
5563
5564      <listitem>
5565       <para>
5566        Improve hypotenuse calculations for geometric operators (Paul Matthews)
5567       </para>
5568
5569       <para>
5570        This avoids unnecessary overflows, and may also be more accurate.
5571       </para>
5572      </listitem>
5573
5574      <listitem>
5575       <para>
5576        Support hashing array values (Tom Lane)
5577       </para>
5578
5579       <para>
5580        This provides additional query optimization possibilities.
5581       </para>
5582      </listitem>
5583
5584      <listitem>
5585       <para>
5586        Don't treat a composite type as sortable unless all its column types
5587        are sortable (Tom Lane)
5588       </para>
5589
5590       <para>
5591        This avoids possible <quote>could not identify a comparison function</>
5592        failures at runtime, if it is possible to implement the query without
5593        sorting.  Also, <command>ANALYZE</> won't try to use inappropriate
5594        statistics-gathering methods for columns of such composite types.
5595       </para>
5596      </listitem>
5597
5598     </itemizedlist>
5599
5600     <sect4>
5601      <title>Casting</title>
5602
5603      <itemizedlist>
5604
5605      <listitem>
5606       <para>
5607         Add support for casting between <type>money</> and <type>numeric</>
5608         (Andy Balholm)
5609       </para>
5610      </listitem>
5611
5612      <listitem>
5613       <para>
5614        Add support for casting from <type>int4</> and <type>int8</>
5615        to <type>money</> (Joey Adams)
5616       </para>
5617      </listitem>
5618
5619       <listitem>
5620        <para>
5621         Allow casting a table's row type to the table's supertype if
5622         it's a typed table (Peter Eisentraut)
5623        </para>
5624
5625        <para>
5626         This is analogous to the existing facility that allows casting a row
5627         type to a supertable's row type.
5628        </para>
5629       </listitem>
5630
5631      </itemizedlist>
5632
5633     </sect4>
5634
5635     <sect4>
5636      <title><link linkend="functions-xml"><acronym>XML</></link></title>
5637
5638      <itemizedlist>
5639
5640       <listitem>
5641        <para>
5642         Add <acronym>XML</> function <link
5643         linkend="xml-exists"><literal>XMLEXISTS</></link> and <link
5644         linkend="xml-exists"><function>xpath_exists()</></link>
5645         functions (Mike Fowler)
5646        </para>
5647
5648        <para>
5649         These are used for XPath matching.
5650        </para>
5651       </listitem>
5652
5653       <listitem>
5654        <para>
5655         Add <acronym>XML</> functions <link
5656         linkend="xml-is-well-formed"><function>xml_is_well_formed()</></link>,
5657         <link
5658         linkend="xml-is-well-formed"><function>xml_is_well_formed_document()</></link>,
5659         <link
5660         linkend="xml-is-well-formed"><function>xml_is_well_formed_content()</></link>
5661         (Mike Fowler)
5662        </para>
5663
5664        <para>
5665         These check whether the input is properly-formed <acronym>XML</>.
5666         They provide functionality that was previously available only in
5667         the deprecated <filename>contrib/xml2</filename> module.
5668        </para>
5669       </listitem>
5670
5671      </itemizedlist>
5672
5673     </sect4>
5674
5675    </sect3>
5676
5677    <sect3>
5678     <title>Functions</title>
5679
5680      <itemizedlist>
5681
5682       <listitem>
5683        <para>
5684         Add SQL function <link
5685         linkend="format"><function>format(text, ...)</></link>, which
5686         behaves analogously to C's <function>printf()</> (Pavel Stehule,
5687         Robert Haas)
5688        </para>
5689
5690        <para>
5691         It currently supports formats for strings, SQL literals, and
5692         SQL identifiers.
5693        </para>
5694       </listitem>
5695
5696       <listitem>
5697        <para>
5698         Add string functions <link
5699         linkend="functions-string-other"><function>concat()</></link>,
5700         <link
5701         linkend="functions-string-other"><function>concat_ws()</></link>,
5702         <link linkend="functions-string-other"><function>left()</></link>,
5703         <link linkend="functions-string-other"><function>right()</></link>,
5704         and <link
5705         linkend="functions-string-other"><function>reverse()</></link>
5706         (Pavel Stehule)
5707        </para>
5708
5709        <para>
5710         These improve compatibility with other database products.
5711        </para>
5712       </listitem>
5713
5714       <listitem>
5715        <para>
5716          Add function <link
5717          linkend="functions-admin-genfile"><function>pg_read_binary_file()</></link>
5718          to read binary files (Dimitri Fontaine, Itagaki Takahiro)
5719        </para>
5720       </listitem>
5721
5722       <listitem>
5723        <para>
5724          Add a single-parameter version of function <link
5725          linkend="functions-admin-genfile"><function>pg_read_file()</></link>
5726          to read an entire file (Dimitri Fontaine, Itagaki Takahiro)
5727        </para>
5728       </listitem>
5729
5730       <listitem>
5731        <para>
5732          Add three-parameter forms of <link
5733          linkend="array-functions-table"><function>array_to_string()</></link>
5734          and <link
5735          linkend="array-functions-table"><function>string_to_array()</></link>
5736          for null value processing control (Pavel Stehule)
5737        </para>
5738       </listitem>
5739
5740      </itemizedlist>
5741
5742     <sect4>
5743      <title>Object Information Functions</title>
5744
5745      <itemizedlist>
5746
5747       <listitem>
5748        <para>
5749         Add the <link
5750         linkend="functions-info-catalog-table"><function>pg_describe_object()</></link>
5751         function (Alvaro Herrera)
5752        </para>
5753
5754        <para>
5755         This function is used to obtain a human-readable string describing
5756         an object, based on the <link
5757         linkend="catalog-pg-class"><structname>pg_class</structname></link>
5758         OID, object OID, and sub-object ID.  It can be used to help
5759         interpret the contents of <link
5760         linkend="catalog-pg-depend"><structname>pg_depend</structname></link>.
5761        </para>
5762       </listitem>
5763
5764       <listitem>
5765        <para>
5766          Update comments for built-in operators and their underlying
5767          functions (Tom Lane)
5768        </para>
5769
5770        <para>
5771         Functions that are meant to be used via an associated operator
5772         are now commented as such.
5773        </para>
5774       </listitem>
5775
5776       <listitem>
5777        <para>
5778         Add variable <link
5779         linkend="guc-quote-all-identifiers"><varname>quote_all_identifiers</></link>
5780         to force the quoting of all identifiers in <command>EXPLAIN</>
5781         and in system catalog functions like <link
5782         linkend="functions-info-catalog-table"><function>pg_get_viewdef()</></link>
5783         (Robert Haas)
5784        </para>
5785
5786        <para>
5787         This makes exporting schemas to tools and other databases with
5788         different quoting rules easier.
5789        </para>
5790       </listitem>
5791
5792       <listitem>
5793        <para>
5794         Add columns to the <link
5795         linkend="infoschema-sequences"><structname>information_schema.sequences</></link>
5796         system view (Peter Eisentraut)
5797        </para>
5798
5799        <para>
5800         Previously, though the view existed, the columns about the
5801         sequence parameters were unimplemented.
5802        </para>
5803       </listitem>
5804
5805       <listitem>
5806        <para>
5807         Allow <literal>public</> as a pseudo-role name in <link
5808         linkend="functions-info-access-table"><function>has_table_privilege()</></link>
5809         and related functions (Alvaro Herrera)
5810        </para>
5811
5812        <para>
5813         This allows checking for public permissions.
5814        </para>
5815       </listitem>
5816
5817      </itemizedlist>
5818
5819     </sect4>
5820
5821     <sect4>
5822      <title>Function and Trigger Creation</title>
5823
5824      <itemizedlist>
5825
5826       <listitem>
5827        <para>
5828         Support <link linkend="SQL-CREATETRIGGER"><literal>INSTEAD
5829         OF</></link> triggers on views (Dean Rasheed)
5830        </para>
5831
5832        <para>
5833         This feature can be used to implement fully updatable views.
5834        </para>
5835       </listitem>
5836
5837      </itemizedlist>
5838
5839     </sect4>
5840
5841    </sect3>
5842
5843    <sect3>
5844     <title>Server-Side Languages</title>
5845
5846     <sect4>
5847      <title><link linkend="plpgsql">PL/pgSQL</link> Server-Side Language</title>
5848
5849      <itemizedlist>
5850
5851       <listitem>
5852        <para>
5853         Add <link linkend="plpgsql-foreach-array"><command>FOREACH IN
5854         ARRAY</></link> to PL/pgSQL
5855         (Pavel Stehule)
5856        </para>
5857
5858        <para>
5859         This is more efficient and readable than previous methods of
5860         iterating through the elements of an array value.
5861        </para>
5862       </listitem>
5863
5864       <listitem>
5865        <para>
5866         Allow <command>RAISE</command> without parameters to be caught in
5867         the same places that could catch a <command>RAISE ERROR</command>
5868         from the same location (Piyush Newe)
5869        </para>
5870
5871        <para>
5872         The previous coding threw the error
5873         from the block containing the active exception handler.
5874         The new behavior is more consistent with other DBMS products.
5875        </para>
5876       </listitem>
5877
5878     </itemizedlist>
5879
5880     </sect4>
5881
5882     <sect4>
5883      <title><link linkend="plperl">PL/Perl</link> Server-Side Language</title>
5884
5885      <itemizedlist>
5886
5887       <listitem>
5888        <para>
5889         Allow generic record arguments to PL/Perl functions (Andrew
5890         Dunstan)
5891        </para>
5892
5893        <para>
5894         PL/Perl functions can now be declared to accept type <type>record</>.
5895         The behavior is the same as for any named composite type.
5896        </para>
5897       </listitem>
5898
5899       <listitem>
5900        <para>
5901         Convert PL/Perl array arguments to Perl arrays (Alexey Klyukin,
5902         Alex Hunsaker)
5903        </para>
5904
5905        <para>
5906         String representations are still available.
5907        </para>
5908       </listitem>
5909
5910       <listitem>
5911        <para>
5912         Convert PL/Perl composite-type arguments to Perl hashes
5913         (Alexey Klyukin, Alex Hunsaker)
5914        </para>
5915
5916        <para>
5917         String representations are still available.
5918        </para>
5919       </listitem>
5920
5921      </itemizedlist>
5922
5923     </sect4>
5924
5925     <sect4>
5926      <title><link linkend="plpython">PL/Python</link> Server-Side Language</title>
5927
5928      <itemizedlist>
5929
5930       <listitem>
5931        <para>
5932         Add table function support for PL/Python (Jan Urbanski)
5933        </para>
5934
5935        <para>
5936         PL/Python can now return multiple <literal>OUT</> parameters
5937         and record sets.
5938        </para>
5939       </listitem>
5940
5941       <listitem>
5942        <para>
5943         Add a validator to PL/Python (Jan Urbanski)
5944        </para>
5945
5946        <para>
5947         This allows PL/Python functions to be syntax-checked at function
5948         creation time.
5949        </para>
5950       </listitem>
5951
5952       <listitem>
5953        <para>
5954         Allow exceptions for SQL queries in PL/Python (Jan Urbanski)
5955        </para>
5956
5957        <para>
5958         This allows access to SQL-generated exception error codes from
5959         PL/Python exception blocks.
5960        </para>
5961       </listitem>
5962
5963       <listitem>
5964        <para>
5965         Add explicit subtransactions to PL/Python (Jan Urbanski)
5966        </para>
5967       </listitem>
5968
5969       <listitem>
5970        <para>
5971         Add PL/Python functions for quoting strings (Jan Urbanski)
5972        </para>
5973
5974        <para>
5975         These functions are <link
5976         linkend="plpython-util"><literal>plpy.quote_ident</></link>,
5977         <link linkend="plpython-util"><literal>plpy.quote_literal</></link>,
5978         and <link
5979         linkend="plpython-util"><literal>plpy.quote_nullable</></link>.
5980        </para>
5981       </listitem>
5982
5983       <listitem>
5984        <para>
5985          Add traceback information to PL/Python errors (Jan Urbanski)
5986        </para>
5987       </listitem>
5988
5989       <listitem>
5990        <para>
5991          Report PL/Python errors from iterators with <literal>PLy_elog</> (Jan
5992          Urbanski)
5993        </para>
5994       </listitem>
5995
5996       <listitem>
5997        <para>
5998         Fix exception handling with Python 3 (Jan Urbanski)
5999        </para>
6000
6001        <para>
6002         Exception classes were previously not available in
6003         <literal>plpy</> under Python 3.
6004        </para>
6005       </listitem>
6006
6007      </itemizedlist>
6008
6009     </sect4>
6010
6011    </sect3>
6012
6013    <sect3>
6014     <title>Client Applications</title>
6015
6016     <itemizedlist>
6017
6018      <listitem>
6019       <para>
6020         Mark <link
6021         linkend="APP-CREATELANG"><application>createlang</></link>
6022         and <link linkend="APP-DROPLANG"><application>droplang</></link>
6023         as deprecated now that they just invoke extension commands (Tom
6024         Lane)
6025       </para>
6026      </listitem>
6027
6028     </itemizedlist>
6029
6030     <sect4>
6031      <title><link linkend="APP-PSQL"><application>psql</></link></title>
6032
6033      <itemizedlist>
6034
6035       <listitem>
6036        <para>
6037          Add <application>psql</> command <literal>\conninfo</>
6038          to show current connection information (David Christensen)
6039        </para>
6040       </listitem>
6041
6042       <listitem>
6043        <para>
6044          Add <application>psql</> command <literal>\sf</> to
6045          show a function's definition (Pavel Stehule)
6046        </para>
6047       </listitem>
6048
6049       <listitem>
6050        <para>
6051          Add <application>psql</> command <literal>\dL</> to list
6052          languages (Fernando Ike)
6053        </para>
6054       </listitem>
6055
6056       <listitem>
6057        <para>
6058         Add the <option>S</> (<quote>system</>) option to <application>psql</>'s
6059         <literal>\dn</> (list schemas) command (Tom Lane)
6060        </para>
6061
6062        <para>
6063         <literal>\dn</> without <literal>S</> now suppresses system
6064         schemas.
6065        </para>
6066       </listitem>
6067
6068       <listitem>
6069        <para>
6070         Allow <application>psql</>'s <literal>\e</> and <literal>\ef</>
6071         commands to accept a line number to be used to position the
6072         cursor in the editor (Pavel Stehule)
6073        </para>
6074
6075        <para>
6076         This is passed to the editor according to the
6077         <envar>PSQL_EDITOR_LINENUMBER_ARG</> environment variable.
6078        </para>
6079       </listitem>
6080
6081       <listitem>
6082        <para>
6083         Have <application>psql</> set the client encoding from the
6084         operating system locale by default (Heikki Linnakangas)
6085        </para>
6086
6087        <para>
6088         This only happens if the <envar>PGCLIENTENCODING</> environment
6089         variable is not set.
6090        </para>
6091       </listitem>
6092
6093       <listitem>
6094        <para>
6095         Make <literal>\d</literal> distinguish between unique
6096         indexes and unique constraints (Josh Kupershmidt)
6097        </para>
6098       </listitem>
6099
6100       <listitem>
6101        <para>
6102         Make <literal>\dt+</literal> report <function>pg_table_size</>
6103         instead of <function>pg_relation_size</> when talking to 9.0 or
6104         later servers (Bernd Helmle)
6105        </para>
6106
6107        <para>
6108         This is a more useful measure of table size, but note that it is
6109         not identical to what was previously reported in the same display.
6110        </para>
6111       </listitem>
6112
6113       <listitem>
6114        <para>
6115         Additional tab completion support (Itagaki Takahiro, Pavel Stehule,
6116         Andrey Popp, Christoph Berg, David Fetter, Josh Kupershmidt)
6117        </para>
6118       </listitem>
6119
6120      </itemizedlist>
6121
6122     </sect4>
6123
6124     <sect4>
6125      <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title>
6126
6127      <itemizedlist>
6128
6129       <listitem>
6130        <para>
6131          Add <link linkend="APP-PGDUMP"><application>pg_dump</></link>
6132          and <link
6133          linkend="APP-PG-DUMPALL"><application>pg_dumpall</></link>
6134          option <option>--quote-all-identifiers</> to force quoting
6135          of all identifiers (Robert Haas)
6136        </para>
6137       </listitem>
6138
6139       <listitem>
6140        <para>
6141         Add <literal>directory</> format to <application>pg_dump</>
6142         (Joachim Wieland, Heikki Linnakangas)
6143        </para>
6144
6145        <para>
6146         This is internally similar to the <literal>tar</>
6147         <application>pg_dump</> format.
6148        </para>
6149       </listitem>
6150
6151      </itemizedlist>
6152
6153     </sect4>
6154
6155     <sect4>
6156      <title><link linkend="APP-PG-CTL"><application>pg_ctl</></link></title>
6157
6158      <itemizedlist>
6159
6160       <listitem>
6161        <para>
6162         Fix <application>pg_ctl</>
6163         so it no longer incorrectly reports that the server is not
6164         running (Bruce Momjian)
6165        </para>
6166
6167        <para>
6168         Previously this could happen if the server was running but
6169         <application>pg_ctl</> could not authenticate.
6170        </para>
6171       </listitem>
6172
6173       <listitem>
6174        <para>
6175         Improve <application>pg_ctl</> start's <quote>wait</quote>
6176         (<option>-w</>) option (Bruce Momjian, Tom Lane)
6177        </para>
6178
6179        <para>
6180         The wait mode is now significantly more robust.  It will not get
6181         confused by non-default postmaster port numbers, non-default
6182         Unix-domain socket locations, permission problems, or stale
6183         postmaster lock files.
6184        </para>
6185       </listitem>
6186
6187       <listitem>
6188        <para>
6189          Add <literal>promote</> option to <application>pg_ctl</> to
6190          switch a standby server to primary (Fujii Masao)
6191        </para>
6192       </listitem>
6193
6194      </itemizedlist>
6195
6196     </sect4>
6197
6198    </sect3>
6199
6200    <sect3>
6201     <title><application>Development Tools</></title>
6202
6203     <sect4>
6204      <title><link linkend="libpq"><application>libpq</></link></title>
6205
6206      <itemizedlist>
6207
6208       <listitem>
6209        <para>
6210         Add a libpq connection option <link
6211         linkend="libpq-connect-client-encoding"><literal>client_encoding</></link>
6212         which behaves like the <envar>PGCLIENTENCODING</> environment
6213         variable (Heikki Linnakangas)
6214        </para>
6215
6216        <para>
6217         The value <literal>auto</> sets the client encoding based on
6218         the operating system locale.
6219        </para>
6220       </listitem>
6221
6222       <listitem>
6223        <para>
6224         Add <link
6225         linkend="libpq-pqlibversion"><function>PQlibVersion()</></link>
6226         function which returns the libpq library version (Magnus
6227         Hagander)
6228        </para>
6229
6230        <para>
6231         libpq already had <function>PQserverVersion()</> which returns
6232         the server version.
6233        </para>
6234       </listitem>
6235
6236       <listitem>
6237        <para>
6238         Allow libpq-using clients to
6239         check the user name of the server process
6240         when connecting via Unix-domain sockets, with the new <link
6241         linkend="libpq-connect-requirepeer"><literal>requirepeer</></link>
6242         connection option
6243         (Peter Eisentraut)
6244        </para>
6245
6246        <para>
6247         <productname>PostgreSQL</> already allowed servers to check
6248         the client user name when connecting via Unix-domain sockets.
6249        </para>
6250       </listitem>
6251
6252       <listitem>
6253        <para>
6254         Add <link linkend="libpq-pqping"><function>PQping()</></link>
6255         and <link
6256         linkend="libpq-pqpingparams"><function>PQpingParams()</></link>
6257         to libpq (Bruce Momjian, Tom Lane)
6258        </para>
6259
6260        <para>
6261         These functions allow detection of the server's status without
6262         trying to open a new session.
6263        </para>
6264       </listitem>
6265
6266      </itemizedlist>
6267
6268     </sect4>
6269
6270     <sect4>
6271      <title><link linkend="ecpg"><application>ECPG</></link></title>
6272
6273      <itemizedlist>
6274
6275       <listitem>
6276        <para>
6277         Allow ECPG to accept dynamic cursor names even in
6278         <literal>WHERE CURRENT OF</literal> clauses
6279         (Zoltan Boszormenyi)
6280        </para>
6281       </listitem>
6282
6283       <listitem>
6284        <para>
6285         Make <application>ecpglib</> write <type>double</> values with a
6286         precision of 15 digits, not 14 as formerly (Akira Kurosawa)
6287        </para>
6288       </listitem>
6289
6290      </itemizedlist>
6291     </sect4>
6292
6293    </sect3>
6294
6295    <sect3>
6296     <title>Build Options</title>
6297
6298      <itemizedlist>
6299
6300       <listitem>
6301        <para>
6302         Use <literal>+Olibmerrno</> compile flag with HP-UX C compilers
6303         that accept it (Ibrar Ahmed)
6304        </para>
6305
6306        <para>
6307         This avoids possible misbehavior of math library calls on recent
6308         HP platforms.
6309        </para>
6310       </listitem>
6311
6312      </itemizedlist>
6313
6314     <sect4>
6315      <title>Makefiles</title>
6316
6317      <itemizedlist>
6318
6319       <listitem>
6320        <para>
6321         Improved parallel make support (Peter Eisentraut)
6322        </para>
6323
6324        <para>
6325         This allows for faster compiles.  Also, <literal>make -k</>
6326         now works more consistently.
6327        </para>
6328       </listitem>
6329
6330       <listitem>
6331        <para>
6332          Require <acronym>GNU</> <link
6333          linkend="install-requirements"><application>make</></link>
6334          3.80 or newer (Peter Eisentraut)
6335        </para>
6336
6337        <para>
6338         This is necessary because of the parallel-make improvements.
6339        </para>
6340       </listitem>
6341
6342       <listitem>
6343        <para>
6344         Add <literal>make maintainer-check</> target
6345         (Peter Eisentraut)
6346        </para>
6347
6348        <para>
6349         This target performs various source code checks that are not
6350         appropriate for either the build or the regression tests.  Currently:
6351         duplicate_oids, SGML syntax and tabs check, NLS syntax check.
6352        </para>
6353       </listitem>
6354
6355       <listitem>
6356        <para>
6357         Support <literal>make check</> in <filename>contrib</>
6358         (Peter Eisentraut)
6359        </para>
6360
6361        <para>
6362         Formerly only <literal>make installcheck</> worked, but now
6363         there is support for testing in a temporary installation.
6364         The top-level <literal>make check-world</> target now includes
6365         testing <filename>contrib</> this way.
6366        </para>
6367       </listitem>
6368
6369      </itemizedlist>
6370
6371     </sect4>
6372
6373     <sect4>
6374      <title>Windows</title>
6375
6376      <itemizedlist>
6377
6378       <listitem>
6379        <para>
6380          On Windows, allow <link
6381          linkend="app-pg-ctl"><application>pg_ctl</></link> to register
6382          the service as auto-start or start-on-demand (Quan Zongliang)
6383        </para>
6384       </listitem>
6385
6386       <listitem>
6387        <para>
6388         Add support for collecting <link linkend="windows-crash-dumps">crash
6389         dumps</link> on Windows (Craig Ringer, Magnus Hagander)
6390        </para>
6391
6392        <para>
6393         <productname>minidumps</> can now be generated by non-debug
6394         Windows binaries and analyzed by standard debugging tools.
6395        </para>
6396       </listitem>
6397
6398       <listitem>
6399        <para>
6400         Enable building with the MinGW64 compiler (Andrew Dunstan)
6401        </para>
6402
6403        <para>
6404         This allows building 64-bit Windows binaries even on non-Windows
6405         platforms via cross-compiling.
6406        </para>
6407       </listitem>
6408
6409      </itemizedlist>
6410
6411     </sect4>
6412
6413    </sect3>
6414
6415    <sect3>
6416     <title>Source Code</title>
6417
6418      <itemizedlist>
6419
6420       <listitem>
6421        <para>
6422         Revise the API for GUC variable assign hooks (Tom Lane)
6423        </para>
6424
6425        <para>
6426         The previous functions of assign hooks are now split between check
6427         hooks and assign hooks, where the former can fail but the latter
6428         shouldn't.  This change will impact add-on modules that define custom
6429         GUC parameters.
6430        </para>
6431       </listitem>
6432
6433       <listitem>
6434        <para>
6435         Add latches to the source code to support waiting for events (Heikki
6436         Linnakangas)
6437        </para>
6438       </listitem>
6439
6440       <listitem>
6441        <para>
6442          Centralize data modification permissions-checking logic
6443          (KaiGai Kohei)
6444        </para>
6445       </listitem>
6446
6447       <listitem>
6448        <para>
6449          Add missing <function>get_<replaceable>object</>_oid()</function> functions, for consistency
6450          (Robert Haas)
6451        </para>
6452       </listitem>
6453
6454       <listitem>
6455        <para>
6456          Improve ability to use C++ compilers for <link
6457          linkend="xfunc-c">compiling add-on modules</link> by removing
6458          conflicting key words (Tom Lane)
6459        </para>
6460       </listitem>
6461
6462       <listitem>
6463        <para>
6464          Add support for DragonFly <acronym>BSD</> (Rumko)
6465        </para>
6466       </listitem>
6467
6468       <listitem>
6469        <para>
6470          Expose <function>quote_literal_cstr()</> for backend use
6471          (Robert Haas)
6472        </para>
6473       </listitem>
6474
6475       <listitem>
6476        <para>
6477         Run <link linkend="build">regression tests</link> in the
6478         default encoding (Peter Eisentraut)
6479        </para>
6480
6481        <para>
6482         Regression tests were previously always run with
6483         <literal>SQL_ASCII</> encoding.
6484        </para>
6485       </listitem>
6486
6487       <listitem>
6488        <para>
6489          Add <application>src/tools/git_changelog</> to replace
6490          <application>cvs2cl</> and <application>pgcvslog</> (Robert
6491          Haas, Tom Lane)
6492        </para>
6493       </listitem>
6494
6495       <listitem>
6496        <para>
6497         Add <application>git-external-diff</> script to
6498         <filename>src/tools</> (Bruce Momjian)
6499        </para>
6500
6501        <para>
6502         This is used to generate context diffs from git.
6503        </para>
6504       </listitem>
6505
6506       <listitem>
6507        <para>
6508          Improve support for building with
6509          <application>Clang</application> (Peter Eisentraut)
6510        </para>
6511       </listitem>
6512
6513      </itemizedlist>
6514
6515     <sect4>
6516      <title>Server Hooks</title>
6517
6518      <itemizedlist>
6519
6520       <listitem>
6521        <para>
6522          Add source code hooks to check permissions (Robert Haas,
6523          Stephen Frost)
6524        </para>
6525       </listitem>
6526
6527       <listitem>
6528        <para>
6529          Add post-object-creation function hooks for use by security
6530          frameworks (KaiGai Kohei)
6531        </para>
6532       </listitem>
6533
6534       <listitem>
6535        <para>
6536          Add a client authentication hook (KaiGai Kohei)
6537        </para>
6538       </listitem>
6539
6540      </itemizedlist>
6541
6542     </sect4>
6543
6544    </sect3>
6545
6546    <sect3>
6547     <title>Contrib</title>
6548
6549     <itemizedlist>
6550
6551      <listitem>
6552       <para>
6553        Modify <filename>contrib</> modules and procedural
6554        languages to install via the new <link
6555        linkend="extend-extensions">extension</link> mechanism (Tom Lane,
6556        Dimitri Fontaine)
6557       </para>
6558      </listitem>
6559
6560      <listitem>
6561       <para>
6562        Add <link linkend="file-fdw"><filename>contrib/file_fdw</></link>
6563        foreign-data wrapper (Shigeru Hanada)
6564       </para>
6565
6566       <para>
6567        Foreign tables using this foreign data wrapper can read flat files
6568        in a manner very similar to <command>COPY</>.
6569       </para>
6570      </listitem>
6571
6572      <listitem>
6573       <para>
6574         Add nearest-neighbor search support to <link
6575         linkend="pgtrgm"><filename>contrib/pg_trgm</></link> and <link
6576         linkend="btree-gist"><filename>contrib/btree_gist</></link>
6577         (Teodor Sigaev)
6578       </para>
6579      </listitem>
6580
6581      <listitem>
6582       <para>
6583         Add <link
6584         linkend="btree-gist"><filename>contrib/btree_gist</></link>
6585         support for searching on not-equals (Jeff Davis)
6586       </para>
6587      </listitem>
6588
6589      <listitem>
6590       <para>
6591         Fix <link
6592         linkend="fuzzystrmatch"><filename>contrib/fuzzystrmatch</></link>'s
6593         <function>levenshtein()</> function to handle multibyte characters
6594         (Alexander Korotkov)
6595       </para>
6596      </listitem>
6597
6598      <listitem>
6599       <para>
6600         Add <function>ssl_cipher()</> and <function>ssl_version()</>
6601         functions to <link
6602         linkend="sslinfo"><filename>contrib/sslinfo</></link> (Robert
6603         Haas)
6604       </para>
6605      </listitem>
6606
6607      <listitem>
6608       <para>
6609        Fix <link linkend="intarray"><filename>contrib/intarray</></link>
6610        and <link linkend="hstore"><filename>contrib/hstore</></link>
6611        to give consistent results with indexed empty arrays (Tom Lane)
6612       </para>
6613
6614       <para>
6615        Previously an empty-array query that used an index might return
6616        different results from one that used a sequential scan.
6617       </para>
6618      </listitem>
6619
6620      <listitem>
6621       <para>
6622        Allow <link linkend="intarray"><filename>contrib/intarray</></link>
6623        to work properly on multidimensional arrays (Tom Lane)
6624       </para>
6625      </listitem>
6626
6627      <listitem>
6628       <para>
6629        In
6630        <link linkend="intarray"><filename>contrib/intarray</></link>,
6631        avoid errors complaining about the presence of nulls in cases where no
6632        nulls are actually present (Tom Lane)
6633       </para>
6634      </listitem>
6635
6636      <listitem>
6637       <para>
6638        In
6639        <link linkend="intarray"><filename>contrib/intarray</></link>,
6640        fix behavior of containment operators with respect to empty arrays
6641        (Tom Lane)
6642       </para>
6643
6644       <para>
6645        Empty arrays are now correctly considered to be contained in any other
6646        array.
6647       </para>
6648      </listitem>
6649
6650      <listitem>
6651       <para>
6652        Remove <link linkend="xml2"><filename>contrib/xml2</></link>'s
6653        arbitrary limit on the number of
6654        <replaceable>parameter</>=<replaceable>value</> pairs that can be
6655        handled by <function>xslt_process()</> (Pavel Stehule)
6656       </para>
6657
6658       <para>
6659        The previous limit was 10.
6660       </para>
6661      </listitem>
6662
6663      <listitem>
6664       <para>
6665        In <link linkend="pageinspect"><filename>contrib/pageinspect</></link>,
6666        fix heap_page_item to return infomasks as 32-bit values (Alvaro Herrera)
6667       </para>
6668
6669       <para>
6670        This avoids returning negative values, which was confusing.  The
6671        underlying value is a 16-bit unsigned integer.
6672       </para>
6673      </listitem>
6674
6675     </itemizedlist>
6676
6677     <sect4>
6678      <title>Security</title>
6679
6680      <itemizedlist>
6681
6682       <listitem>
6683        <para>
6684         Add <link linkend="sepgsql"><filename>contrib/sepgsql</></link>
6685         to interface permission checks with <acronym>SELinux</> (KaiGai Kohei)
6686        </para>
6687
6688        <para>
6689         This uses the new <link
6690         linkend="SQL-SECURITY-LABEL"><command>SECURITY LABEL</></link>
6691         facility.
6692        </para>
6693       </listitem>
6694
6695       <listitem>
6696        <para>
6697         Add contrib module <link
6698         linkend="auth-delay"><filename>auth_delay</></link> (KaiGai
6699         Kohei)
6700        </para>
6701
6702        <para>
6703         This causes the server to pause before returning authentication
6704         failure;  it is designed to make brute force password attacks
6705         more difficult.
6706        </para>
6707       </listitem>
6708
6709       <listitem>
6710        <para>
6711         Add <link linkend="dummy-seclabel"><filename>dummy_seclabel</></link>
6712         contrib module (KaiGai Kohei)
6713        </para>
6714
6715        <para>
6716         This is used for permission regression testing.
6717        </para>
6718       </listitem>
6719
6720      </itemizedlist>
6721
6722     </sect4>
6723
6724     <sect4>
6725      <title>Performance</title>
6726
6727      <itemizedlist>
6728
6729       <listitem>
6730        <para>
6731          Add support for <literal>LIKE</> and <literal>ILIKE</> index
6732          searches to <link
6733          linkend="pgtrgm"><filename>contrib/pg_trgm</></link> (Alexander
6734          Korotkov)
6735        </para>
6736       </listitem>
6737
6738       <listitem>
6739        <para>
6740          Add <function>levenshtein_less_equal()</> function to <link
6741          linkend="fuzzystrmatch"><filename>contrib/fuzzystrmatch</></link>,
6742          which is optimized for small distances (Alexander Korotkov)
6743        </para>
6744       </listitem>
6745
6746       <listitem>
6747        <para>
6748         Improve performance of index lookups on <link
6749         linkend="seg"><filename>contrib/seg</></link> columns (Alexander
6750         Korotkov)
6751        </para>
6752       </listitem>
6753
6754       <listitem>
6755        <para>
6756          Improve performance of <link
6757          linkend="pgupgrade"><application>pg_upgrade</></link> for
6758          databases with many relations (Bruce Momjian)
6759        </para>
6760       </listitem>
6761
6762       <listitem>
6763        <para>
6764          Add flag to <link
6765          linkend="pgbench"><filename>contrib/pgbench</></link> to
6766          report per-statement latencies (Florian Pflug)
6767        </para>
6768       </listitem>
6769
6770      </itemizedlist>
6771
6772     </sect4>
6773
6774     <sect4>
6775      <title>Fsync Testing</title>
6776
6777      <itemizedlist>
6778
6779       <listitem>
6780        <para>
6781          Move <filename>src/tools/test_fsync</> to <link
6782          linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link>
6783          (Bruce Momjian, Tom Lane)
6784        </para>
6785       </listitem>
6786
6787       <listitem>
6788        <para>
6789         Add <literal>O_DIRECT</> support to <link
6790         linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link>
6791         (Bruce Momjian)
6792        </para>
6793
6794        <para>
6795         This matches the use of <literal>O_DIRECT</> by <link
6796         linkend="guc-wal-sync-method"><varname>wal_sync_method</></link>.
6797        </para>
6798       </listitem>
6799
6800       <listitem>
6801        <para>
6802          Add new tests to <link
6803          linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link>
6804          (Bruce Momjian)
6805        </para>
6806       </listitem>
6807
6808      </itemizedlist>
6809
6810     </sect4>
6811
6812    </sect3>
6813
6814    <sect3>
6815     <title>Documentation</title>
6816
6817     <itemizedlist>
6818
6819      <listitem>
6820       <para>
6821         Extensive <link linkend="ecpg"><application>ECPG</></link>
6822         documentation improvements (Satoshi Nagayasu)
6823       </para>
6824      </listitem>
6825
6826      <listitem>
6827       <para>
6828         Extensive proofreading and documentation improvements
6829         (Thom Brown, Josh Kupershmidt, Susanne Ebrecht)
6830       </para>
6831      </listitem>
6832
6833      <listitem>
6834       <para>
6835        Add documentation for <link
6836        linkend="guc-exit-on-error"><varname>exit_on_error</></link>
6837        (Robert Haas)
6838       </para>
6839
6840       <para>
6841        This parameter causes sessions to exit on any error.
6842       </para>
6843      </listitem>
6844
6845      <listitem>
6846       <para>
6847        Add documentation for <link
6848        linkend="functions-info-catalog-table"><function>pg_options_to_table()</></link>
6849        (Josh Berkus)
6850       </para>
6851
6852       <para>
6853        This function shows table storage options in a readable form.
6854       </para>
6855      </listitem>
6856
6857      <listitem>
6858       <para>
6859        Document that it is possible to access all composite type
6860        fields using <link
6861        linkend="field-selection"><literal>(compositeval).*</></link>
6862        syntax (Peter Eisentraut)
6863       </para>
6864      </listitem>
6865
6866      <listitem>
6867       <para>
6868        Document that <link
6869        linkend="functions-string-other"><function>translate()</></link>
6870        removes characters in <literal>from</> that don't have a
6871        corresponding <literal>to</> character (Josh Kupershmidt)
6872       </para>
6873      </listitem>
6874
6875      <listitem>
6876       <para>
6877        Merge documentation for <command>CREATE CONSTRAINT TRIGGER</> and <link
6878        linkend="SQL-CREATETRIGGER"><command>CREATE TRIGGER</></link>
6879        (Alvaro Herrera)
6880       </para>
6881      </listitem>
6882
6883      <listitem>
6884       <para>
6885        Centralize <link linkend="ddl-priv">permission</link> and <link
6886        linkend="upgrading">upgrade</link> documentation (Bruce Momjian)
6887       </para>
6888      </listitem>
6889
6890      <listitem>
6891       <para>
6892        Add <link linkend="sysvipc-parameters">kernel tuning
6893        documentation</link> for Solaris 10 (Josh Berkus)
6894       </para>
6895
6896       <para>
6897        Previously only Solaris 9 kernel tuning was documented.
6898       </para>
6899      </listitem>
6900
6901      <listitem>
6902       <para>
6903        Handle non-ASCII characters consistently in <filename>HISTORY</> file
6904        (Peter Eisentraut)
6905       </para>
6906
6907       <para>
6908        While the <filename>HISTORY</> file is in English, we do have to deal
6909        with non-ASCII letters in contributor names.  These are now
6910        transliterated so that they are reasonably legible without assumptions
6911        about character set.
6912       </para>
6913      </listitem>
6914
6915     </itemizedlist>
6916
6917    </sect3>
6918
6919   </sect2>
6920  </sect1>