]> granicus.if.org Git - postgresql/blob - doc/src/sgml/release-9.1.sgml
Update release notes for 9.1.5, 9.0.9, 8.4.13, 8.3.20.
[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-5">
5   <title>Release 9.1.5</title>
6
7   <note>
8   <title>Release Date</title>
9   <simpara>2012-08-17</simpara>
10   </note>
11
12   <para>
13    This release contains a variety of fixes from 9.1.4.
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.5</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.4,
27     see the release notes for 9.1.4.
28    </para>
29
30   </sect2>
31
32   <sect2>
33    <title>Changes</title>
34
35    <itemizedlist>
36
37     <listitem>
38      <para>
39       Prevent access to external files/URLs via XML entity references
40       (Noah Misch, Tom Lane)
41      </para>
42
43      <para>
44       <function>xml_parse()</> would attempt to fetch external files or
45       URLs as needed to resolve DTD and entity references in an XML value,
46       thus allowing unprivileged database users to attempt to fetch data
47       with the privileges of the database server.  While the external data
48       wouldn't get returned directly to the user, portions of it could be
49       exposed in error messages if the data didn't parse as valid XML; and
50       in any case the mere ability to check existence of a file might be
51       useful to an attacker.  (CVE-2012-3489)
52      </para>
53     </listitem>
54
55     <listitem>
56      <para>
57       Prevent access to external files/URLs via <filename>contrib/xml2</>'s
58       <function>xslt_process()</> (Peter Eisentraut)
59      </para>
60
61      <para>
62       <application>libxslt</> offers the ability to read and write both
63       files and URLs through stylesheet commands, thus allowing
64       unprivileged database users to both read and write data with the
65       privileges of the database server.  Disable that through proper use
66       of <application>libxslt</>'s security options.  (CVE-2012-3488)
67      </para>
68
69      <para>
70       Also, remove <function>xslt_process()</>'s ability to fetch documents
71       and stylesheets from external files/URLs.  While this was a
72       documented <quote>feature</>, it was long regarded as a bad idea.
73       The fix for CVE-2012-3489 broke that capability, and rather than
74       expend effort on trying to fix it, we're just going to summarily
75       remove it.
76      </para>
77     </listitem>
78
79     <listitem>
80      <para>
81       Prevent too-early recycling of btree index pages (Noah Misch)
82      </para>
83
84      <para>
85       When we allowed read-only transactions to skip assigning XIDs, we
86       introduced the possibility that a deleted btree page could be
87       recycled while a read-only transaction was still in flight to it.
88       This would result in incorrect index search results.  The probability
89       of such an error occurring in the field seems very low because of the
90       timing requirements, but nonetheless it should be fixed.
91      </para>
92     </listitem>
93
94     <listitem>
95      <para>
96       Fix crash-safety bug with newly-created-or-reset sequences (Tom Lane)
97      </para>
98
99      <para>
100       If <command>ALTER SEQUENCE</> was executed on a freshly created or
101       reset sequence, and then precisely one <function>nextval()</> call
102       was made on it, and then the server crashed, WAL replay would restore
103       the sequence to a state in which it appeared that no
104       <function>nextval()</> had been done, thus allowing the first
105       sequence value to be returned again by the next
106       <function>nextval()</> call.  In particular this could manifest for
107       <type>serial</> columns, since creation of a serial column's sequence
108       includes an <command>ALTER SEQUENCE OWNED BY</> step.
109      </para>
110     </listitem>
111
112     <listitem>
113      <para>
114       Fix race condition in <literal>enum</>-type value comparisons (Robert
115       Haas, Tom Lane)
116      </para>
117
118      <para>
119       Comparisons could fail when encountering an enum value added since
120       the current query started.
121      </para>
122     </listitem>
123
124     <listitem>
125      <para>
126       Fix <function>txid_current()</> to report the correct epoch when not
127       in hot standby (Heikki Linnakangas)
128      </para>
129
130      <para>
131       This fixes a regression introduced in the previous minor release.
132      </para>
133     </listitem>
134
135     <listitem>
136      <para>
137       Prevent selection of unsuitable replication connections as
138       the synchronous standby (Fujii Masao)
139      </para>
140
141      <para>
142       The master might improperly choose pseudo-servers such as
143       <application>pg_receivexlog</> or <application>pg_basebackup</>
144       as the synchronous standby, and then wait indefinitely for them.
145      </para>
146     </listitem>
147
148     <listitem>
149      <para>
150       Fix bug in startup of Hot Standby when a master transaction has many
151       subtransactions (Andres Freund)
152      </para>
153
154      <para>
155       This mistake led to failures reported as <quote>out-of-order XID
156       insertion in KnownAssignedXids</>.
157      </para>
158     </listitem>
159
160     <listitem>
161      <para>
162       Ensure the <filename>backup_label</> file is fsync'd after
163       <function>pg_start_backup()</> (Dave Kerr)
164      </para>
165     </listitem>
166
167     <listitem>
168      <para>
169       Fix timeout handling in walsender processes (Tom Lane)
170      </para>
171
172      <para>
173       WAL sender background processes neglected to establish a
174       <systemitem>SIGALRM</> handler, meaning they would wait forever in
175       some corner cases where a timeout ought to happen.
176      </para>
177     </listitem>
178
179     <listitem>
180      <para>
181       Wake walsenders after each background flush by walwriter (Andres
182       Freund, Simon Riggs)
183      </para>
184
185      <para>
186       This greatly reduces replication delay when the workload contains
187       only asynchronously-committed transactions.
188      </para>
189     </listitem>
190
191     <listitem>
192      <para>
193       Fix <literal>LISTEN</>/<literal>NOTIFY</> to cope better with I/O
194       problems, such as out of disk space (Tom Lane)
195      </para>
196
197      <para>
198       After a write failure, all subsequent attempts to send more
199       <literal>NOTIFY</> messages would fail with messages like
200       <quote>Could not read from file "pg_notify/<replaceable>nnnn</>" at
201       offset <replaceable>nnnnn</>: Success</quote>.
202      </para>
203     </listitem>
204
205     <listitem>
206      <para>
207       Only allow autovacuum to be auto-canceled by a directly blocked
208       process (Tom Lane)
209      </para>
210
211      <para>
212       The original coding could allow inconsistent behavior in some cases;
213       in particular, an autovacuum could get canceled after less than
214       <literal>deadlock_timeout</> grace period.
215      </para>
216     </listitem>
217
218     <listitem>
219      <para>
220       Improve logging of autovacuum cancels (Robert Haas)
221      </para>
222     </listitem>
223
224     <listitem>
225      <para>
226       Fix log collector so that <literal>log_truncate_on_rotation</> works
227       during the very first log rotation after server start (Tom Lane)
228      </para>
229     </listitem>
230
231     <listitem>
232      <para>
233       Fix <literal>WITH</> attached to a nested set operation
234       (<literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>)
235       (Tom Lane)
236      </para>
237     </listitem>
238
239     <listitem>
240      <para>
241       Ensure that a whole-row reference to a subquery doesn't include any
242       extra <literal>GROUP BY</> or <literal>ORDER BY</> columns (Tom Lane)
243      </para>
244     </listitem>
245
246     <listitem>
247      <para>
248       Fix dependencies generated during <literal>ALTER TABLE ... ADD
249       CONSTRAINT USING INDEX</> (Tom Lane)
250      </para>
251
252      <para>
253       This command left behind a redundant <structname>pg_depend</> entry
254       for the index, which could confuse later operations, notably
255       <literal>ALTER TABLE ... ALTER COLUMN TYPE</> on one of the indexed
256       columns.
257      </para>
258     </listitem>
259
260     <listitem>
261      <para>
262       Fix <command>REASSIGN OWNED</> to work on extensions (Alvaro Herrera)
263      </para>
264     </listitem>
265
266     <listitem>
267      <para>
268       Disallow copying whole-row references in <literal>CHECK</>
269       constraints and index definitions during <command>CREATE TABLE</>
270       (Tom Lane)
271      </para>
272
273      <para>
274       This situation can arise in <command>CREATE TABLE</> with
275       <literal>LIKE</> or <literal>INHERITS</>.  The copied whole-row
276       variable was incorrectly labeled with the row type of the original
277       table not the new one.  Rejecting the case seems reasonable for
278       <literal>LIKE</>, since the row types might well diverge later.  For
279       <literal>INHERITS</> we should ideally allow it, with an implicit
280       coercion to the parent table's row type; but that will require more
281       work than seems safe to back-patch.
282      </para>
283     </listitem>
284
285     <listitem>
286      <para>
287       Fix memory leak in <literal>ARRAY(SELECT ...)</> subqueries (Heikki
288       Linnakangas, Tom Lane)
289      </para>
290     </listitem>
291
292     <listitem>
293      <para>
294       Fix planner to pass correct collation to operator selectivity
295       estimators (Tom Lane)
296      </para>
297
298      <para>
299       This was not previously required by any core selectivity estimation
300       function, but third-party code might need it.
301      </para>
302     </listitem>
303
304     <listitem>
305      <para>
306       Fix extraction of common prefixes from regular expressions (Tom Lane)
307      </para>
308
309      <para>
310       The code could get confused by quantified parenthesized
311       subexpressions, such as <literal>^(foo)?bar</>.  This would lead to
312       incorrect index optimization of searches for such patterns.
313      </para>
314     </listitem>
315
316     <listitem>
317      <para>
318       Fix bugs with parsing signed
319       <replaceable>hh</><literal>:</><replaceable>mm</> and
320       <replaceable>hh</><literal>:</><replaceable>mm</><literal>:</><replaceable>ss</>
321       fields in <type>interval</> constants (Amit Kapila, Tom Lane)
322      </para>
323     </listitem>
324
325     <listitem>
326      <para>
327       Fix <application>pg_dump</> to better handle views containing partial
328       <literal>GROUP BY</> lists (Tom Lane)
329      </para>
330
331      <para>
332       A view that lists only a primary key column in <literal>GROUP BY</>,
333       but uses other table columns as if they were grouped, gets marked as
334       depending on the primary key.  Improper handling of such primary key
335       dependencies in <application>pg_dump</> resulted in poorly-ordered
336       dumps, which at best would be inefficient to restore and at worst
337       could result in outright failure of a parallel
338       <application>pg_restore</> run.
339      </para>
340     </listitem>
341
342     <listitem>
343      <para>
344       In PL/Perl, avoid setting UTF8 flag when in SQL_ASCII encoding
345       (Alex Hunsaker, Kyotaro Horiguchi, Alvaro Herrera)
346      </para>
347     </listitem>
348
349     <listitem>
350      <para>
351       Use Postgres' encoding conversion functions, not Python's, when
352       converting a Python Unicode string to the server encoding in
353       PL/Python (Jan Urbanski)
354      </para>
355
356      <para>
357       This avoids some corner-case problems, notably that Python doesn't
358       support all the encodings Postgres does.  A notable functional change
359       is that if the server encoding is SQL_ASCII, you will get the UTF-8
360       representation of the string; formerly, any non-ASCII characters in
361       the string would result in an error.
362      </para>
363     </listitem>
364
365     <listitem>
366      <para>
367       Fix mapping of PostgreSQL encodings to Python encodings in PL/Python
368       (Jan Urbanski)
369      </para>
370     </listitem>
371
372     <listitem>
373      <para>
374       Report errors properly in <filename>contrib/xml2</>'s
375       <function>xslt_process()</> (Tom Lane)
376      </para>
377     </listitem>
378
379     <listitem>
380      <para>
381       Update time zone data files to <application>tzdata</> release 2012e
382       for DST law changes in Morocco and Tokelau
383      </para>
384     </listitem>
385
386    </itemizedlist>
387
388   </sect2>
389  </sect1>
390
391  <sect1 id="release-9-1-4">
392   <title>Release 9.1.4</title>
393
394   <note>
395   <title>Release Date</title>
396   <simpara>2012-06-04</simpara>
397   </note>
398
399   <para>
400    This release contains a variety of fixes from 9.1.3.
401    For information about new features in the 9.1 major release, see
402    <xref linkend="release-9-1">.
403   </para>
404
405   <sect2>
406    <title>Migration to Version 9.1.4</title>
407
408    <para>
409     A dump/restore is not required for those running 9.1.X.
410    </para>
411
412    <para>
413     However, if you use the <type>citext</> data type, and you upgraded
414     from a previous major release by running <application>pg_upgrade</>,
415     you should run <literal>CREATE EXTENSION citext FROM unpackaged</>
416     to avoid collation-related failures in <type>citext</> operations.
417     The same is necessary if you restore a dump from a pre-9.1 database
418     that contains an instance of the <type>citext</> data type.
419     If you've already run the <command>CREATE EXTENSION</> command before
420     upgrading to 9.1.4, you will instead need to do manual catalog updates
421     as explained in the third changelog item below.
422    </para>
423
424    <para>
425     Also, if you are upgrading from a version earlier than 9.1.2,
426     see the release notes for 9.1.2.
427    </para>
428
429   </sect2>
430
431   <sect2>
432    <title>Changes</title>
433
434    <itemizedlist>
435
436     <listitem>
437      <para>
438       Fix incorrect password transformation in
439       <filename>contrib/pgcrypto</>'s DES <function>crypt()</> function
440       (Solar Designer)
441      </para>
442
443      <para>
444       If a password string contained the byte value <literal>0x80</>, the
445       remainder of the password was ignored, causing the password to be much
446       weaker than it appeared.  With this fix, the rest of the string is
447       properly included in the DES hash.  Any stored password values that are
448       affected by this bug will thus no longer match, so the stored values may
449       need to be updated.  (CVE-2012-2143)
450      </para>
451     </listitem>
452
453     <listitem>
454      <para>
455       Ignore <literal>SECURITY DEFINER</> and <literal>SET</> attributes for
456       a procedural language's call handler (Tom Lane)
457      </para>
458
459      <para>
460       Applying such attributes to a call handler could crash the server.
461       (CVE-2012-2655)
462      </para>
463     </listitem>
464
465     <listitem>
466      <para>
467       Make <filename>contrib/citext</>'s upgrade script fix collations of
468       <type>citext</> arrays and domains over <type>citext</>
469       (Tom Lane)
470      </para>
471
472      <para>
473       Release 9.1.2 provided a fix for collations of <type>citext</> columns
474       and indexes in databases upgraded or reloaded from pre-9.1
475       installations, but that fix was incomplete: it neglected to handle arrays
476       and domains over <type>citext</>.  This release extends the module's
477       upgrade script to handle these cases.  As before, if you have already
478       run the upgrade script, you'll need to run the collation update
479       commands by hand instead.  See the 9.1.2 release notes for more
480       information about doing this.
481      </para>
482     </listitem>
483
484     <listitem>
485      <para>
486       Allow numeric timezone offsets in <type>timestamp</> input to be up to
487       16 hours away from UTC (Tom Lane)
488      </para>
489
490      <para>
491       Some historical time zones have offsets larger than 15 hours, the
492       previous limit.  This could result in dumped data values being rejected
493       during reload.
494      </para>
495     </listitem>
496
497     <listitem>
498      <para>
499       Fix timestamp conversion to cope when the given time is exactly the
500       last DST transition time for the current timezone (Tom Lane)
501      </para>
502
503      <para>
504       This oversight has been there a long time, but was not noticed
505       previously because most DST-using zones are presumed to have an
506       indefinite sequence of future DST transitions.
507      </para>
508     </listitem>
509
510     <listitem>
511      <para>
512       Fix <type>text</> to <type>name</> and <type>char</> to <type>name</>
513       casts to perform string truncation correctly in multibyte encodings
514       (Karl Schnaitter)
515      </para>
516     </listitem>
517
518     <listitem>
519      <para>
520       Fix memory copying bug in <function>to_tsquery()</> (Heikki Linnakangas)
521      </para>
522     </listitem>
523
524     <listitem>
525      <para>
526       Ensure <function>txid_current()</> reports the correct epoch when
527       executed in hot standby (Simon Riggs)
528      </para>
529     </listitem>
530
531     <listitem>
532      <para>
533       Fix planner's handling of outer PlaceHolderVars within subqueries (Tom
534       Lane)
535      </para>
536
537      <para>
538       This bug concerns sub-SELECTs that reference variables coming from the
539       nullable side of an outer join of the surrounding query.
540       In 9.1, queries affected by this bug would fail with <quote>ERROR:
541       Upper-level PlaceHolderVar found where not expected</>.  But in 9.0 and
542       8.4, you'd silently get possibly-wrong answers, since the value
543       transmitted into the subquery wouldn't go to null when it should.
544      </para>
545     </listitem>
546
547     <listitem>
548      <para>
549       Fix planning of <literal>UNION ALL</> subqueries with output columns
550       that are not simple variables (Tom Lane)
551      </para>
552
553      <para>
554       Planning of such cases got noticeably worse in 9.1 as a result of a
555       misguided fix for <quote>MergeAppend child's targetlist doesn't match
556       MergeAppend</> errors.  Revert that fix and do it another way.
557      </para>
558     </listitem>
559
560     <listitem>
561      <para>
562       Fix slow session startup when <structname>pg_attribute</> is very large
563       (Tom Lane)
564      </para>
565
566      <para>
567       If <structname>pg_attribute</> exceeds one-fourth of
568       <varname>shared_buffers</>, cache rebuilding code that is sometimes
569       needed during session start would trigger the synchronized-scan logic,
570       causing it to take many times longer than normal.  The problem was
571       particularly acute if many new sessions were starting at once.
572      </para>
573     </listitem>
574
575     <listitem>
576      <para>
577       Ensure sequential scans check for query cancel reasonably often (Merlin
578       Moncure)
579      </para>
580
581      <para>
582       A scan encountering many consecutive pages that contain no live tuples
583       would not respond to interrupts meanwhile.
584      </para>
585     </listitem>
586
587     <listitem>
588      <para>
589       Ensure the Windows implementation of <function>PGSemaphoreLock()</>
590       clears <varname>ImmediateInterruptOK</> before returning (Tom Lane)
591      </para>
592
593      <para>
594       This oversight meant that a query-cancel interrupt received later
595       in the same query could be accepted at an unsafe time, with
596       unpredictable but not good consequences.
597      </para>
598     </listitem>
599
600     <listitem>
601      <para>
602       Show whole-row variables safely when printing views or rules
603       (Abbas Butt, Tom Lane)
604      </para>
605
606      <para>
607       Corner cases involving ambiguous names (that is, the name could be
608       either a table or column name of the query) were printed in an
609       ambiguous way, risking that the view or rule would be interpreted
610       differently after dump and reload.  Avoid the ambiguous case by
611       attaching a no-op cast.
612      </para>
613     </listitem>
614
615     <listitem>
616      <para>
617       Fix <command>COPY FROM</> to properly handle null marker strings that
618       correspond to invalid encoding (Tom Lane)
619      </para>
620
621      <para>
622       A null marker string such as <literal>E'\\0'</> should work, and did
623       work in the past, but the case got broken in 8.4.
624      </para>
625     </listitem>
626
627     <listitem>
628      <para>
629       Fix <command>EXPLAIN VERBOSE</> for writable CTEs containing
630       <literal>RETURNING</> clauses (Tom Lane)
631      </para>
632     </listitem>
633
634     <listitem>
635      <para>
636       Fix <command>PREPARE TRANSACTION</> to work correctly in the presence
637       of advisory locks (Tom Lane)
638      </para>
639
640      <para>
641       Historically, <command>PREPARE TRANSACTION</> has simply ignored any
642       session-level advisory locks the session holds, but this case was
643       accidentally broken in 9.1.
644      </para>
645     </listitem>
646
647     <listitem>
648      <para>
649       Fix truncation of unlogged tables (Robert Haas)
650      </para>
651     </listitem>
652
653     <listitem>
654      <para>
655       Ignore missing schemas during non-interactive assignments of
656       <varname>search_path</> (Tom Lane)
657      </para>
658
659      <para>
660       This re-aligns 9.1's behavior with that of older branches.  Previously
661       9.1 would throw an error for nonexistent schemas mentioned in
662       <varname>search_path</> settings obtained from places such as
663       <command>ALTER DATABASE SET</>.
664      </para>
665     </listitem>
666
667     <listitem>
668      <para>
669       Fix bugs with temporary or transient tables used in extension scripts
670       (Tom Lane)
671      </para>
672
673      <para>
674       This includes cases such as a rewriting <command>ALTER TABLE</> within
675       an extension update script, since that uses a transient table behind
676       the scenes.
677      </para>
678     </listitem>
679
680     <listitem>
681      <para>
682       Ensure autovacuum worker processes perform stack depth checking
683       properly (Heikki Linnakangas)
684      </para>
685
686      <para>
687       Previously, infinite recursion in a function invoked by
688       auto-<command>ANALYZE</> could crash worker processes.
689      </para>
690     </listitem>
691
692     <listitem>
693      <para>
694       Fix logging collector to not lose log coherency under high load (Andrew
695       Dunstan)
696      </para>
697
698      <para>
699       The collector previously could fail to reassemble large messages if it
700       got too busy.
701      </para>
702     </listitem>
703
704     <listitem>
705      <para>
706       Fix logging collector to ensure it will restart file rotation
707       after receiving <systemitem>SIGHUP</> (Tom Lane)
708      </para>
709     </listitem>
710
711     <listitem>
712      <para>
713       Fix <quote>too many LWLocks taken</> failure in GiST indexes (Heikki
714       Linnakangas)
715      </para>
716     </listitem>
717
718     <listitem>
719      <para>
720       Fix WAL replay logic for GIN indexes to not fail if the index was
721       subsequently dropped (Tom Lane)
722      </para>
723     </listitem>
724
725     <listitem>
726      <para>
727       Correctly detect SSI conflicts of prepared transactions after a crash
728       (Dan Ports)
729      </para>
730     </listitem>
731
732     <listitem>
733      <para>
734       Avoid synchronous replication delay when committing a transaction that
735       only modified temporary tables (Heikki Linnakangas)
736      </para>
737
738      <para>
739       In such a case the transaction's commit record need not be flushed to
740       standby servers, but some of the code didn't know that and waited for
741       it to happen anyway.
742      </para>
743     </listitem>
744
745     <listitem>
746      <para>
747       Fix error handling in <application>pg_basebackup</>
748       (Thomas Ogrisegg, Fujii Masao)
749      </para>
750     </listitem>
751
752     <listitem>
753      <para>
754       Fix <application>walsender</> to not go into a busy loop if connection
755       is terminated (Fujii Masao)
756      </para>
757     </listitem>
758
759     <listitem>
760      <para>
761       Fix memory leak in PL/pgSQL's <command>RETURN NEXT</> command (Joe
762       Conway)
763      </para>
764     </listitem>
765
766     <listitem>
767      <para>
768       Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target
769       is the function's first variable (Tom Lane)
770      </para>
771     </listitem>
772
773     <listitem>
774      <para>
775       Ensure that PL/Perl package-qualifies the <varname>_TD</> variable
776       (Alex Hunsaker)
777      </para>
778
779      <para>
780       This bug caused trigger invocations to fail when they are nested
781       within a function invocation that changes the current package.
782      </para>
783     </listitem>
784
785     <listitem>
786      <para>
787       Fix PL/Python functions returning composite types to accept a string
788       for their result value (Jan Urbanski)
789      </para>
790
791      <para>
792       This case was accidentally broken by the 9.1 additions to allow a
793       composite result value to be supplied in other formats, such as
794       dictionaries.
795      </para>
796     </listitem>
797
798     <listitem>
799      <para>
800       Fix potential access off the end of memory in <application>psql</>'s
801       expanded display (<command>\x</>) mode (Peter Eisentraut)
802      </para>
803     </listitem>
804
805     <listitem>
806      <para>
807       Fix several performance problems in <application>pg_dump</> when
808       the database contains many objects (Jeff Janes, Tom Lane)
809      </para>
810
811      <para>
812       <application>pg_dump</> could get very slow if the database contained
813       many schemas, or if many objects are in dependency loops, or if there
814       are many owned sequences.
815      </para>
816     </listitem>
817
818     <listitem>
819      <para>
820       Fix memory and file descriptor leaks in <application>pg_restore</>
821       when reading a directory-format archive (Peter Eisentraut)
822      </para>
823     </listitem>
824
825     <listitem>
826      <para>
827       Fix <application>pg_upgrade</> for the case that a database stored in a
828       non-default tablespace contains a table in the cluster's default
829       tablespace (Bruce Momjian)
830      </para>
831     </listitem>
832
833     <listitem>
834      <para>
835       In <application>ecpg</>, fix rare memory leaks and possible overwrite
836       of one byte after the <structname>sqlca_t</> structure (Peter Eisentraut)
837      </para>
838     </listitem>
839
840     <listitem>
841      <para>
842       Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak
843       temporary database connections upon error (Tom Lane)
844      </para>
845     </listitem>
846
847     <listitem>
848      <para>
849       Fix <filename>contrib/dblink</> to report the correct connection name in
850       error messages (Kyotaro Horiguchi)
851      </para>
852     </listitem>
853
854     <listitem>
855      <para>
856       Fix <filename>contrib/vacuumlo</> to use multiple transactions when
857       dropping many large objects (Tim Lewis, Robert Haas, Tom Lane)
858      </para>
859
860      <para>
861       This change avoids exceeding <varname>max_locks_per_transaction</> when
862       many objects need to be dropped.  The behavior can be adjusted with the
863       new <literal>-l</> (limit) option.
864      </para>
865     </listitem>
866
867     <listitem>
868      <para>
869       Update time zone data files to <application>tzdata</> release 2012c
870       for DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland
871       Islands, Gaza, Haiti, Hebron, Morocco, Syria, and Tokelau Islands;
872       also historical corrections for Canada.
873      </para>
874     </listitem>
875
876    </itemizedlist>
877
878   </sect2>
879  </sect1>
880
881  <sect1 id="release-9-1-3">
882   <title>Release 9.1.3</title>
883
884   <note>
885   <title>Release Date</title>
886   <simpara>2012-02-27</simpara>
887   </note>
888
889   <para>
890    This release contains a variety of fixes from 9.1.2.
891    For information about new features in the 9.1 major release, see
892    <xref linkend="release-9-1">.
893   </para>
894
895   <sect2>
896    <title>Migration to Version 9.1.3</title>
897
898    <para>
899     A dump/restore is not required for those running 9.1.X.
900    </para>
901
902    <para>
903     However, if you are upgrading from a version earlier than 9.1.2,
904     see the release notes for 9.1.2.
905    </para>
906
907   </sect2>
908
909   <sect2>
910    <title>Changes</title>
911
912    <itemizedlist>
913
914     <listitem>
915      <para>
916       Require execute permission on the trigger function for
917       <command>CREATE TRIGGER</> (Robert Haas)
918      </para>
919
920      <para>
921       This missing check could allow another user to execute a trigger
922       function with forged input data, by installing it on a table he owns.
923       This is only of significance for trigger functions marked
924       <literal>SECURITY DEFINER</>, since otherwise trigger functions run
925       as the table owner anyway.  (CVE-2012-0866)
926      </para>
927     </listitem>
928
929     <listitem>
930      <para>
931       Remove arbitrary limitation on length of common name in SSL
932       certificates (Heikki Linnakangas)
933      </para>
934
935      <para>
936       Both <application>libpq</> and the server truncated the common name
937       extracted from an SSL certificate at 32 bytes.  Normally this would
938       cause nothing worse than an unexpected verification failure, but there
939       are some rather-implausible scenarios in which it might allow one
940       certificate holder to impersonate another.  The victim would have to
941       have a common name exactly 32 bytes long, and the attacker would have
942       to persuade a trusted CA to issue a certificate in which the common
943       name has that string as a prefix.  Impersonating a server would also
944       require some additional exploit to redirect client connections.
945       (CVE-2012-0867)
946      </para>
947     </listitem>
948
949     <listitem>
950      <para>
951       Convert newlines to spaces in names written in <application>pg_dump</>
952       comments (Robert Haas)
953      </para>
954
955      <para>
956       <application>pg_dump</> was incautious about sanitizing object names
957       that are emitted within SQL comments in its output script.  A name
958       containing a newline would at least render the script syntactically
959       incorrect.  Maliciously crafted object names could present a SQL
960       injection risk when the script is reloaded.  (CVE-2012-0868)
961      </para>
962     </listitem>
963
964     <listitem>
965      <para>
966       Fix btree index corruption from insertions concurrent with vacuuming
967       (Tom Lane)
968      </para>
969
970      <para>
971       An index page split caused by an insertion could sometimes cause a
972       concurrently-running <command>VACUUM</> to miss removing index entries
973       that it should remove.  After the corresponding table rows are removed,
974       the dangling index entries would cause errors (such as <quote>could not
975       read block N in file ...</>) or worse, silently wrong query results
976       after unrelated rows are re-inserted at the now-free table locations.
977       This bug has been present since release 8.2, but occurs so infrequently
978       that it was not diagnosed until now.  If you have reason to suspect
979       that it has happened in your database, reindexing the affected index
980       will fix things.
981      </para>
982     </listitem>
983
984     <listitem>
985      <para>
986       Fix transient zeroing of shared buffers during WAL replay (Tom Lane)
987      </para>
988
989      <para>
990       The replay logic would sometimes zero and refill a shared buffer, so
991       that the contents were transiently invalid.  In hot standby mode this
992       can result in a query that's executing in parallel seeing garbage data.
993       Various symptoms could result from that, but the most common one seems
994       to be <quote>invalid memory alloc request size</>.
995      </para>
996     </listitem>
997
998     <listitem>
999      <para>
1000       Fix handling of data-modifying <literal>WITH</> subplans in
1001       <literal>READ COMMITTED</> rechecking (Tom Lane)
1002      </para>
1003
1004      <para>
1005       A <literal>WITH</> clause containing
1006       <command>INSERT</>/<command>UPDATE</>/<command>DELETE</> would crash
1007       if the parent <command>UPDATE</> or <command>DELETE</> command needed
1008       to be re-evaluated at one or more rows due to concurrent updates
1009       in <literal>READ COMMITTED</> mode.
1010      </para>
1011     </listitem>
1012
1013     <listitem>
1014      <para>
1015       Fix corner case in SSI transaction cleanup
1016       (Dan Ports)
1017      </para>
1018
1019      <para>
1020       When finishing up a read-write serializable transaction,
1021       a crash could occur if all remaining active serializable transactions
1022       are read-only.
1023      </para>
1024     </listitem>
1025
1026     <listitem>
1027      <para>
1028       Fix postmaster to attempt restart after a hot-standby crash (Tom Lane)
1029      </para>
1030
1031      <para>
1032       A logic error caused the postmaster to terminate, rather than attempt
1033       to restart the cluster, if any backend process crashed while operating
1034       in hot standby mode.
1035      </para>
1036     </listitem>
1037
1038     <listitem>
1039      <para>
1040       Fix <command>CLUSTER</>/<command>VACUUM FULL</> handling of toast
1041       values owned by recently-updated rows (Tom Lane)
1042      </para>
1043
1044      <para>
1045       This oversight could lead to <quote>duplicate key value violates unique
1046       constraint</> errors being reported against the toast table's index
1047       during one of these commands.
1048      </para>
1049     </listitem>
1050
1051     <listitem>
1052      <para>
1053       Update per-column permissions, not only per-table permissions, when
1054       changing table owner (Tom Lane)
1055      </para>
1056
1057      <para>
1058       Failure to do this meant that any previously granted column permissions
1059       were still shown as having been granted by the old owner.  This meant
1060       that neither the new owner nor a superuser could revoke the
1061       now-untraceable-to-table-owner permissions.
1062      </para>
1063     </listitem>
1064
1065     <listitem>
1066      <para>
1067       Support foreign data wrappers and foreign servers in
1068       <command>REASSIGN OWNED</> (Alvaro Herrera)
1069      </para>
1070
1071      <para>
1072       This command failed with <quote>unexpected classid</> errors if
1073       it needed to change the ownership of any such objects.
1074      </para>
1075     </listitem>
1076
1077     <listitem>
1078      <para>
1079       Allow non-existent values for some settings in <command>ALTER
1080       USER/DATABASE SET</> (Heikki Linnakangas)
1081      </para>
1082
1083      <para>
1084       Allow <varname>default_text_search_config</>,
1085       <varname>default_tablespace</>, and <varname>temp_tablespaces</> to be
1086       set to names that are not known.  This is because they might be known
1087       in another database where the setting is intended to be used, or for the
1088       tablespace cases because the tablespace might not be created yet.  The
1089       same issue was previously recognized for <varname>search_path</>, and
1090       these settings now act like that one.
1091      </para>
1092     </listitem>
1093
1094     <listitem>
1095      <para>
1096       Fix <quote>unsupported node type</> error caused by <literal>COLLATE</>
1097       in an <command>INSERT</> expression (Tom Lane)
1098      </para>
1099     </listitem>
1100
1101     <listitem>
1102      <para>
1103       Avoid crashing when we have problems deleting table files post-commit
1104       (Tom Lane)
1105      </para>
1106
1107      <para>
1108       Dropping a table should lead to deleting the underlying disk files only
1109       after the transaction commits.  In event of failure then (for instance,
1110       because of wrong file permissions) the code is supposed to just emit a
1111       warning message and go on, since it's too late to abort the
1112       transaction.  This logic got broken as of release 8.4, causing such
1113       situations to result in a PANIC and an unrestartable database.
1114      </para>
1115     </listitem>
1116
1117     <listitem>
1118      <para>
1119       Recover from errors occurring during WAL replay of <command>DROP
1120       TABLESPACE</> (Tom Lane)
1121      </para>
1122
1123      <para>
1124       Replay will attempt to remove the tablespace's directories, but there
1125       are various reasons why this might fail (for example, incorrect
1126       ownership or permissions on those directories).  Formerly the replay
1127       code would panic, rendering the database unrestartable without manual
1128       intervention.  It seems better to log the problem and continue, since
1129       the only consequence of failure to remove the directories is some
1130       wasted disk space.
1131      </para>
1132     </listitem>
1133
1134     <listitem>
1135      <para>
1136       Fix race condition in logging AccessExclusiveLocks for hot standby
1137       (Simon Riggs)
1138      </para>
1139
1140      <para>
1141       Sometimes a lock would be logged as being held by <quote>transaction
1142       zero</>.  This is at least known to produce assertion failures on
1143       slave servers, and might be the cause of more serious problems.
1144      </para>
1145     </listitem>
1146
1147     <listitem>
1148      <para>
1149       Track the OID counter correctly during WAL replay, even when it wraps
1150       around (Tom Lane)
1151      </para>
1152
1153      <para>
1154       Previously the OID counter would remain stuck at a high value until the
1155       system exited replay mode.  The practical consequences of that are
1156       usually nil, but there are scenarios wherein a standby server that's
1157       been promoted to master might take a long time to advance the OID
1158       counter to a reasonable value once values are needed.
1159      </para>
1160     </listitem>
1161
1162     <listitem>
1163      <para>
1164       Prevent emitting misleading <quote>consistent recovery state reached</>
1165       log message at the beginning of crash recovery (Heikki Linnakangas)
1166      </para>
1167     </listitem>
1168
1169     <listitem>
1170      <para>
1171       Fix initial value of
1172       <structname>pg_stat_replication</>.<structfield>replay_location</>
1173       (Fujii Masao)
1174      </para>
1175
1176      <para>
1177       Previously, the value shown would be wrong until at least one WAL
1178       record had been replayed.
1179      </para>
1180     </listitem>
1181
1182     <listitem>
1183      <para>
1184       Fix regular expression back-references with <literal>*</> attached
1185       (Tom Lane)
1186      </para>
1187
1188      <para>
1189       Rather than enforcing an exact string match, the code would effectively
1190       accept any string that satisfies the pattern sub-expression referenced
1191       by the back-reference symbol.
1192      </para>
1193
1194      <para>
1195       A similar problem still afflicts back-references that are embedded in a
1196       larger quantified expression, rather than being the immediate subject
1197       of the quantifier.  This will be addressed in a future
1198       <productname>PostgreSQL</> release.
1199      </para>
1200     </listitem>
1201
1202     <listitem>
1203      <para>
1204       Fix recently-introduced memory leak in processing of
1205       <type>inet</>/<type>cidr</> values (Heikki Linnakangas)
1206      </para>
1207
1208      <para>
1209       A patch in the December 2011 releases of <productname>PostgreSQL</>
1210       caused memory leakage in these operations, which could be significant
1211       in scenarios such as building a btree index on such a column.
1212      </para>
1213     </listitem>
1214
1215     <listitem>
1216      <para>
1217       Fix planner's ability to push down index-expression restrictions
1218       through <literal>UNION ALL</> (Tom Lane)
1219      </para>
1220
1221      <para>
1222       This type of optimization was inadvertently disabled by a fix for
1223       another problem in 9.1.2.
1224      </para>
1225     </listitem>
1226
1227     <listitem>
1228      <para>
1229       Fix planning of <literal>WITH</> clauses referenced in
1230       <command>UPDATE</>/<command>DELETE</> on an inherited table
1231       (Tom Lane)
1232      </para>
1233
1234      <para>
1235       This bug led to <quote>could not find plan for CTE</> failures.
1236      </para>
1237     </listitem>
1238
1239     <listitem>
1240      <para>
1241       Fix GIN cost estimation to handle <literal>column IN (...)</>
1242       index conditions (Marti Raudsepp)
1243      </para>
1244
1245      <para>
1246       This oversight would usually lead to crashes if such a condition could
1247       be used with a GIN index.
1248      </para>
1249     </listitem>
1250
1251     <listitem>
1252      <para>
1253       Prevent assertion failure when exiting a session with an open, failed
1254       transaction (Tom Lane)
1255      </para>
1256
1257      <para>
1258       This bug has no impact on normal builds with asserts not enabled.
1259      </para>
1260     </listitem>
1261
1262     <listitem>
1263      <para>
1264       Fix dangling pointer after <command>CREATE TABLE AS</>/<command>SELECT
1265       INTO</> in a SQL-language function (Tom Lane)
1266      </para>
1267
1268      <para>
1269       In most cases this only led to an assertion failure in assert-enabled
1270       builds, but worse consequences seem possible.
1271      </para>
1272     </listitem>
1273
1274     <listitem>
1275      <para>
1276       Avoid double close of file handle in syslogger on Windows (MauMau)
1277      </para>
1278
1279      <para>
1280       Ordinarily this error was invisible, but it would cause an exception
1281       when running on a debug version of Windows.
1282      </para>
1283     </listitem>
1284
1285     <listitem>
1286      <para>
1287       Fix I/O-conversion-related memory leaks in plpgsql
1288       (Andres Freund, Jan Urbanski, Tom Lane)
1289      </para>
1290
1291      <para>
1292       Certain operations would leak memory until the end of the current
1293       function.
1294      </para>
1295     </listitem>
1296
1297     <listitem>
1298      <para>
1299       Work around bug in perl's SvPVutf8() function (Andrew Dunstan)
1300      </para>
1301
1302      <para>
1303       This function crashes when handed a typeglob or certain read-only
1304       objects such as <literal>$^V</>.  Make plperl avoid passing those to
1305       it.
1306      </para>
1307     </listitem>
1308
1309     <listitem>
1310      <para>
1311       In <application>pg_dump</>, don't dump contents of an extension's
1312       configuration tables if the extension itself is not being dumped
1313       (Tom Lane)
1314      </para>
1315     </listitem>
1316
1317     <listitem>
1318      <para>
1319       Improve <application>pg_dump</>'s handling of inherited table columns
1320       (Tom Lane)
1321      </para>
1322
1323      <para>
1324       <application>pg_dump</> mishandled situations where a child column has
1325       a different default expression than its parent column.  If the default
1326       is textually identical to the parent's default, but not actually the
1327       same (for instance, because of schema search path differences) it would
1328       not be recognized as different, so that after dump and restore the
1329       child would be allowed to inherit the parent's default.  Child columns
1330       that are <literal>NOT NULL</> where their parent is not could also be
1331       restored subtly incorrectly.
1332      </para>
1333     </listitem>
1334
1335     <listitem>
1336      <para>
1337       Fix <application>pg_restore</>'s direct-to-database mode for
1338       INSERT-style table data (Tom Lane)
1339      </para>
1340
1341      <para>
1342       Direct-to-database restores from archive files made with
1343       <option>--inserts</> or <option>--column-inserts</> options fail when
1344       using <application>pg_restore</> from a release dated September or
1345       December 2011, as a result of an oversight in a fix for another
1346       problem.  The archive file itself is not at fault, and text-mode
1347       output is okay.
1348      </para>
1349     </listitem>
1350
1351     <listitem>
1352      <para>
1353       Teach <application>pg_upgrade</> to handle renaming of
1354       <application>plpython</>'s shared library (Bruce Momjian)
1355      </para>
1356
1357      <para>
1358       Upgrading a pre-9.1 database that included plpython would fail because
1359       of this oversight.
1360      </para>
1361     </listitem>
1362
1363     <listitem>
1364      <para>
1365       Allow <application>pg_upgrade</> to process tables containing
1366       <type>regclass</> columns (Bruce Momjian)
1367      </para>
1368
1369      <para>
1370       Since <application>pg_upgrade</> now takes care to preserve
1371       <structname>pg_class</> OIDs, there was no longer any reason for this
1372       restriction.
1373      </para>
1374     </listitem>
1375
1376     <listitem>
1377      <para>
1378       Make <application>libpq</> ignore <literal>ENOTDIR</> errors
1379       when looking for an SSL client certificate file
1380       (Magnus Hagander)
1381      </para>
1382
1383      <para>
1384       This allows SSL connections to be established, though without a
1385       certificate, even when the user's home directory is set to something
1386       like <literal>/dev/null</>.
1387      </para>
1388     </listitem>
1389
1390     <listitem>
1391      <para>
1392       Fix some more field alignment issues in <application>ecpg</>'s SQLDA area
1393       (Zoltan Boszormenyi)
1394      </para>
1395     </listitem>
1396
1397     <listitem>
1398      <para>
1399       Allow <literal>AT</> option in <application>ecpg</>
1400       <literal>DEALLOCATE</> statements (Michael Meskes)
1401      </para>
1402
1403      <para>
1404       The infrastructure to support this has been there for awhile, but
1405       through an oversight there was still an error check rejecting the case.
1406      </para>
1407     </listitem>
1408
1409     <listitem>
1410      <para>
1411       Do not use the variable name when defining a varchar structure in ecpg
1412       (Michael Meskes)
1413      </para>
1414     </listitem>
1415
1416     <listitem>
1417      <para>
1418       Fix <filename>contrib/auto_explain</>'s JSON output mode to produce
1419       valid JSON (Andrew Dunstan)
1420      </para>
1421
1422      <para>
1423       The output used brackets at the top level, when it should have used
1424       braces.
1425      </para>
1426     </listitem>
1427
1428     <listitem>
1429      <para>
1430       Fix error in <filename>contrib/intarray</>'s <literal>int[] &amp;
1431       int[]</> operator (Guillaume Lelarge)
1432      </para>
1433
1434      <para>
1435       If the smallest integer the two input arrays have in common is 1,
1436       and there are smaller values in either array, then 1 would be
1437       incorrectly omitted from the result.
1438      </para>
1439     </listitem>
1440
1441     <listitem>
1442      <para>
1443       Fix error detection in <filename>contrib/pgcrypto</>'s
1444       <function>encrypt_iv()</> and <function>decrypt_iv()</>
1445       (Marko Kreen)
1446      </para>
1447
1448      <para>
1449       These functions failed to report certain types of invalid-input errors,
1450       and would instead return random garbage values for incorrect input.
1451      </para>
1452     </listitem>
1453
1454     <listitem>
1455      <para>
1456       Fix one-byte buffer overrun in <filename>contrib/test_parser</>
1457       (Paul Guyot)
1458      </para>
1459
1460      <para>
1461       The code would try to read one more byte than it should, which would
1462       crash in corner cases.
1463       Since <filename>contrib/test_parser</> is only example code, this is
1464       not a security issue in itself, but bad example code is still bad.
1465      </para>
1466     </listitem>
1467
1468     <listitem>
1469      <para>
1470       Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if
1471       available (Martin Pitt)
1472      </para>
1473
1474      <para>
1475       This function replaces our previous use of the <literal>SWPB</>
1476       instruction, which is deprecated and not available on ARMv6 and later.
1477       Reports suggest that the old code doesn't fail in an obvious way on
1478       recent ARM boards, but simply doesn't interlock concurrent accesses,
1479       leading to bizarre failures in multiprocess operation.
1480      </para>
1481     </listitem>
1482
1483     <listitem>
1484      <para>
1485       Use <option>-fexcess-precision=standard</> option when building with
1486       gcc versions that accept it (Andrew Dunstan)
1487      </para>
1488
1489      <para>
1490       This prevents assorted scenarios wherein recent versions of gcc will
1491       produce creative results.
1492      </para>
1493     </listitem>
1494
1495     <listitem>
1496      <para>
1497       Allow use of threaded Python on FreeBSD (Chris Rees)
1498      </para>
1499
1500      <para>
1501       Our configure script previously believed that this combination wouldn't
1502       work; but FreeBSD fixed the problem, so remove that error check.
1503      </para>
1504     </listitem>
1505
1506     <listitem>
1507      <para>
1508       Allow MinGW builds to use standardly-named OpenSSL libraries
1509       (Tomasz Ostrowski)
1510      </para>
1511     </listitem>
1512
1513    </itemizedlist>
1514
1515   </sect2>
1516  </sect1>
1517
1518  <sect1 id="release-9-1-2">
1519   <title>Release 9.1.2</title>
1520
1521   <note>
1522   <title>Release Date</title>
1523   <simpara>2011-12-05</simpara>
1524   </note>
1525
1526   <para>
1527    This release contains a variety of fixes from 9.1.1.
1528    For information about new features in the 9.1 major release, see
1529    <xref linkend="release-9-1">.
1530   </para>
1531
1532   <sect2>
1533    <title>Migration to Version 9.1.2</title>
1534
1535    <para>
1536     A dump/restore is not required for those running 9.1.X.
1537    </para>
1538
1539    <para>
1540     However, a longstanding error was discovered in the definition of the
1541     <literal>information_schema.referential_constraints</> view.  If you
1542     rely on correct results from that view, you should replace its
1543     definition as explained in the first changelog item below.
1544    </para>
1545
1546    <para>
1547     Also, if you use the <type>citext</> data type, and you upgraded
1548     from a previous major release by running <application>pg_upgrade</>,
1549     you should run <literal>CREATE EXTENSION citext FROM unpackaged</>
1550     to avoid collation-related failures in <type>citext</> operations.
1551     The same is necessary if you restore a dump from a pre-9.1 database
1552     that contains an instance of the <type>citext</> data type.
1553     If you've already run the <command>CREATE EXTENSION</> command before
1554     upgrading to 9.1.2, you will instead need to do manual catalog updates
1555     as explained in the second changelog item.
1556    </para>
1557
1558   </sect2>
1559
1560   <sect2>
1561    <title>Changes</title>
1562
1563    <itemizedlist>
1564
1565     <listitem>
1566      <para>
1567       Fix bugs in <literal>information_schema.referential_constraints</> view
1568       (Tom Lane)
1569      </para>
1570
1571      <para>
1572       This view was being insufficiently careful about matching the
1573       foreign-key constraint to the depended-on primary or unique key
1574       constraint.  That could result in failure to show a foreign key
1575       constraint at all, or showing it multiple times, or claiming that it
1576       depends on a different constraint than the one it really does.
1577      </para>
1578
1579      <para>
1580       Since the view definition is installed by <application>initdb</>,
1581       merely upgrading will not fix the problem.  If you need to fix this
1582       in an existing installation, you can (as a superuser) drop the
1583       <literal>information_schema</> schema then re-create it by sourcing
1584       <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>.
1585       (Run <literal>pg_config --sharedir</> if you're uncertain where
1586       <replaceable>SHAREDIR</> is.)  This must be repeated in each database
1587       to be fixed.
1588      </para>
1589     </listitem>
1590
1591     <listitem>
1592      <para>
1593       Make <filename>contrib/citext</>'s upgrade script fix collations of
1594       <type>citext</> columns and indexes (Tom Lane)
1595      </para>
1596
1597      <para>
1598       Existing <type>citext</> columns and indexes aren't correctly marked as
1599       being of a collatable data type during <application>pg_upgrade</> from
1600       a pre-9.1 server, or when a pre-9.1 dump containing the <type>citext</>
1601       type is loaded into a 9.1 server.
1602       That leads to operations on these columns failing with errors
1603       such as <quote>could not determine which collation to use for string
1604       comparison</>.  This change allows them to be fixed by the same
1605       script that upgrades the <type>citext</> module into a proper 9.1
1606       extension during <literal>CREATE EXTENSION citext FROM unpackaged</>.
1607      </para>
1608
1609      <para>
1610       If you have a previously-upgraded database that is suffering from this
1611       problem, and you already ran the <command>CREATE EXTENSION</> command,
1612       you can manually run (as superuser) the <command>UPDATE</> commands
1613       found at the end of
1614       <filename><replaceable>SHAREDIR</>/extension/citext--unpackaged--1.0.sql</filename>.
1615       (Run <literal>pg_config --sharedir</> if you're uncertain where
1616       <replaceable>SHAREDIR</> is.)
1617       There is no harm in doing this again if unsure.
1618      </para>
1619     </listitem>
1620
1621     <listitem>
1622      <para>
1623       Fix possible crash during <command>UPDATE</> or <command>DELETE</> that
1624       joins to the output of a scalar-returning function (Tom Lane)
1625      </para>
1626
1627      <para>
1628       A crash could only occur if the target row had been concurrently
1629       updated, so this problem surfaced only intermittently.
1630      </para>
1631     </listitem>
1632
1633     <listitem>
1634      <para>
1635       Fix incorrect replay of WAL records for GIN index updates
1636       (Tom Lane)
1637      </para>
1638
1639      <para>
1640       This could result in transiently failing to find index entries after
1641       a crash, or on a hot-standby server.  The problem would be repaired
1642       by the next <command>VACUUM</> of the index, however.
1643      </para>
1644     </listitem>
1645
1646     <listitem>
1647      <para>
1648       Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS
1649       SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</>
1650       (Tom Lane)
1651      </para>
1652
1653      <para>
1654       If a table has been modified by <command>ALTER TABLE ADD COLUMN</>,
1655       attempts to copy its data verbatim to another table could produce
1656       corrupt results in certain corner cases.
1657       The problem can only manifest in this precise form in 8.4 and later,
1658       but we patched earlier versions as well in case there are other code
1659       paths that could trigger the same bug.
1660      </para>
1661     </listitem>
1662
1663     <listitem>
1664      <para>
1665       Fix possible failures during hot standby startup (Simon Riggs)
1666      </para>
1667     </listitem>
1668
1669     <listitem>
1670      <para>
1671       Start hot standby faster when initial snapshot is incomplete
1672       (Simon Riggs)
1673      </para>
1674     </listitem>
1675
1676     <listitem>
1677      <para>
1678       Fix race condition during toast table access from stale syscache entries
1679       (Tom Lane)
1680      </para>
1681
1682      <para>
1683       The typical symptom was transient errors like <quote>missing chunk
1684       number 0 for toast value NNNNN in pg_toast_2619</>, where the cited
1685       toast table would always belong to a system catalog.
1686      </para>
1687     </listitem>
1688
1689     <listitem>
1690      <para>
1691       Track dependencies of functions on items used in parameter default
1692       expressions (Tom Lane)
1693      </para>
1694
1695      <para>
1696       Previously, a referenced object could be dropped without having dropped
1697       or modified the function, leading to misbehavior when the function was
1698       used.  Note that merely installing this update will not fix the missing
1699       dependency entries; to do that, you'd need to <command>CREATE OR
1700       REPLACE</> each such function afterwards.  If you have functions whose
1701       defaults depend on non-built-in objects, doing so is recommended.
1702      </para>
1703     </listitem>
1704
1705     <listitem>
1706      <para>
1707       Fix incorrect management of placeholder variables in nestloop joins
1708       (Tom Lane)
1709      </para>
1710
1711      <para>
1712       This bug is known to lead to <quote>variable not found in subplan target
1713       list</> planner errors, and could possibly result in wrong query output
1714       when outer joins are involved.
1715      </para>
1716     </listitem>
1717
1718     <listitem>
1719      <para>
1720       Fix window functions that sort by expressions involving aggregates
1721       (Tom Lane)
1722      </para>
1723
1724      <para>
1725       Previously these could fail with <quote>could not find pathkey item to
1726       sort</> planner errors.
1727      </para>
1728     </listitem>
1729
1730     <listitem>
1731      <para>
1732       Fix <quote>MergeAppend child's targetlist doesn't match MergeAppend</>
1733       planner errors (Tom Lane)
1734      </para>
1735     </listitem>
1736
1737     <listitem>
1738      <para>
1739       Fix index matching for operators with both collatable and noncollatable
1740       inputs (Tom Lane)
1741      </para>
1742
1743      <para>
1744       In 9.1.0, an indexable operator that has a non-collatable left-hand
1745       input type and a collatable right-hand input type would not be
1746       recognized as matching the left-hand column's index.  An example is
1747       the <type>hstore</> <literal>?</> <type>text</> operator.
1748      </para>
1749     </listitem>
1750
1751     <listitem>
1752      <para>
1753       Allow inlining of set-returning SQL functions with multiple OUT
1754       parameters (Tom Lane)
1755      </para>
1756     </listitem>
1757
1758     <listitem>
1759      <para>
1760       Don't trust deferred-unique indexes for join removal (Tom Lane and Marti
1761       Raudsepp)
1762      </para>
1763
1764      <para>
1765       A deferred uniqueness constraint might not hold intra-transaction,
1766       so assuming that it does could give incorrect query results.
1767      </para>
1768     </listitem>
1769
1770     <listitem>
1771      <para>
1772       Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte
1773       header, and add a new macro, <function>DatumGetInetPP()</>, that does
1774       not (Heikki Linnakangas)
1775      </para>
1776
1777      <para>
1778       This change affects no core code, but might prevent crashes in add-on
1779       code that expects <function>DatumGetInetP()</> to produce an unpacked
1780       datum as per usual convention.
1781      </para>
1782     </listitem>
1783
1784     <listitem>
1785      <para>
1786       Improve locale support in <type>money</> type's input and output
1787       (Tom Lane)
1788      </para>
1789
1790      <para>
1791       Aside from not supporting all standard
1792       <link linkend="guc-lc-monetary"><varname>lc_monetary</></link>
1793       formatting options, the input and output functions were inconsistent,
1794       meaning there were locales in which dumped <type>money</> values could
1795       not be re-read.
1796      </para>
1797     </listitem>
1798
1799     <listitem>
1800      <para>
1801       Don't let <link
1802       linkend="guc-transform-null-equals"><varname>transform_null_equals</></link>
1803       affect <literal>CASE foo WHEN NULL ...</> constructs
1804       (Heikki Linnakangas)
1805      </para>
1806
1807      <para>
1808       <varname>transform_null_equals</> is only supposed to affect
1809       <literal>foo = NULL</> expressions written directly by the user, not
1810       equality checks generated internally by this form of <literal>CASE</>.
1811      </para>
1812     </listitem>
1813
1814     <listitem>
1815      <para>
1816       Change foreign-key trigger creation order to better support
1817       self-referential foreign keys (Tom Lane)
1818      </para>
1819
1820      <para>
1821       For a cascading foreign key that references its own table, a row update
1822       will fire both the <literal>ON UPDATE</> trigger and the
1823       <literal>CHECK</> trigger as one event.  The <literal>ON UPDATE</>
1824       trigger must execute first, else the <literal>CHECK</> will check a
1825       non-final state of the row and possibly throw an inappropriate error.
1826       However, the firing order of these triggers is determined by their
1827       names, which generally sort in creation order since the triggers have
1828       auto-generated names following the convention
1829       <quote>RI_ConstraintTrigger_NNNN</>.  A proper fix would require
1830       modifying that convention, which we will do in 9.2, but it seems risky
1831       to change it in existing releases.  So this patch just changes the
1832       creation order of the triggers.  Users encountering this type of error
1833       should drop and re-create the foreign key constraint to get its
1834       triggers into the right order.
1835      </para>
1836     </listitem>
1837
1838     <listitem>
1839      <para>
1840       Fix <literal>IF EXISTS</> to work correctly in <command>DROP OPERATOR
1841       FAMILY</> (Robert Haas)
1842      </para>
1843     </listitem>
1844
1845     <listitem>
1846      <para>
1847       Disallow dropping of an extension from within its own script
1848       (Tom Lane)
1849      </para>
1850
1851      <para>
1852       This prevents odd behavior in case of incorrect management of extension
1853       dependencies.
1854      </para>
1855     </listitem>
1856
1857     <listitem>
1858      <para>
1859       Don't mark auto-generated types as extension members (Robert Haas)
1860      </para>
1861
1862      <para>
1863       Relation rowtypes and automatically-generated array types do not need to
1864       have their own extension membership entries in <structname>pg_depend</>,
1865       and creating such entries complicates matters for extension upgrades.
1866      </para>
1867     </listitem>
1868
1869     <listitem>
1870      <para>
1871       Cope with invalid pre-existing <varname>search_path</> settings during
1872       <command>CREATE EXTENSION</> (Tom Lane)
1873      </para>
1874     </listitem>
1875
1876     <listitem>
1877      <para>
1878       Avoid floating-point underflow while tracking buffer allocation rate
1879       (Greg Matthews)
1880      </para>
1881
1882      <para>
1883       While harmless in itself, on certain platforms this would result in
1884       annoying kernel log messages.
1885      </para>
1886     </listitem>
1887
1888     <listitem>
1889      <para>
1890       Prevent autovacuum transactions from running in serializable mode
1891       (Tom Lane)
1892      </para>
1893
1894      <para>
1895       Autovacuum formerly used the cluster-wide default transaction isolation
1896       level, but there is no need for it to use anything higher than READ
1897       COMMITTED, and using SERIALIZABLE could result in unnecessary delays
1898       for other processes.
1899      </para>
1900     </listitem>
1901
1902     <listitem>
1903      <para>
1904       Ensure walsender processes respond promptly to <systemitem>SIGTERM</>
1905       (Magnus Hagander)
1906      </para>
1907     </listitem>
1908
1909     <listitem>
1910      <para>
1911       Exclude <filename>postmaster.opts</> from base backups
1912       (Magnus Hagander)
1913      </para>
1914     </listitem>
1915
1916     <listitem>
1917      <para>
1918       Preserve configuration file name and line number values when starting
1919       child processes under Windows (Tom Lane)
1920      </para>
1921
1922      <para>
1923       Formerly, these would not be displayed correctly in the
1924       <structname>pg_settings</> view.
1925      </para>
1926     </listitem>
1927
1928     <listitem>
1929      <para>
1930       Fix incorrect field alignment in <application>ecpg</>'s SQLDA area
1931       (Zoltan Boszormenyi)
1932      </para>
1933     </listitem>
1934
1935     <listitem>
1936      <para>
1937       Preserve blank lines within commands in <application>psql</>'s command
1938       history (Robert Haas)
1939      </para>
1940
1941      <para>
1942       The former behavior could cause problems if an empty line was removed
1943       from within a string literal, for example.
1944      </para>
1945     </listitem>
1946
1947     <listitem>
1948      <para>
1949       Avoid platform-specific infinite loop in <application>pg_dump</>
1950       (Steve Singer)
1951      </para>
1952     </listitem>
1953
1954     <listitem>
1955      <para>
1956       Fix compression of plain-text output format in <application>pg_dump</>
1957       (Adrian Klaver and Tom Lane)
1958      </para>
1959
1960      <para>
1961       <application>pg_dump</> has historically understood <literal>-Z</> with
1962       no <literal>-F</> switch to mean that it should emit a gzip-compressed
1963       version of its plain text output.  Restore that behavior.
1964      </para>
1965     </listitem>
1966
1967     <listitem>
1968      <para>
1969       Fix <application>pg_dump</> to dump user-defined casts between
1970       auto-generated types, such as table rowtypes (Tom Lane)
1971      </para>
1972     </listitem>
1973
1974     <listitem>
1975      <para>
1976       Fix missed quoting of foreign server names in <application>pg_dump</>
1977       (Tom Lane)
1978      </para>
1979     </listitem>
1980
1981     <listitem>
1982      <para>
1983       Assorted fixes for <application>pg_upgrade</> (Bruce Momjian)
1984      </para>
1985
1986      <para>
1987       Handle exclusion constraints correctly, avoid failures on Windows,
1988       don't complain about mismatched toast table names in 8.4 databases.
1989      </para>
1990     </listitem>
1991
1992     <listitem>
1993      <para>
1994       In PL/pgSQL, allow foreign tables to define row types
1995       (Alexander Soudakov)
1996      </para>
1997     </listitem>
1998
1999     <listitem>
2000      <para>
2001       Fix up conversions of PL/Perl functions' results
2002       (Alex Hunsaker and Tom Lane)
2003      </para>
2004
2005      <para>
2006       Restore the pre-9.1 behavior that PL/Perl functions returning
2007       <type>void</> ignore the result value of their last Perl statement;
2008       9.1.0 would throw an error if that statement returned a reference.
2009       Also, make sure it works to return a string value for a composite type,
2010       so long as the string meets the type's input format.
2011       In addition, throw errors for attempts to return Perl arrays or hashes
2012       when the function's declared result type is not an array or composite
2013       type, respectively.  (Pre-9.1 versions rather uselessly returned
2014       strings like <literal>ARRAY(0x221a9a0)</> or
2015       <literal>HASH(0x221aa90)</> in such cases.)
2016      </para>
2017     </listitem>
2018
2019     <listitem>
2020      <para>
2021       Ensure PL/Perl strings are always correctly UTF8-encoded
2022       (Amit Khandekar and Alex Hunsaker)
2023      </para>
2024     </listitem>
2025
2026     <listitem>
2027      <para>
2028       Use the preferred version of <application>xsubpp</> to build PL/Perl,
2029       not necessarily the operating system's main copy
2030       (David Wheeler and Alex Hunsaker)
2031      </para>
2032     </listitem>
2033
2034     <listitem>
2035      <para>
2036       Correctly propagate SQLSTATE in PL/Python exceptions
2037       (Mika Eloranta and Jan Urbanski)
2038      </para>
2039     </listitem>
2040
2041     <listitem>
2042      <para>
2043       Do not install PL/Python extension files for Python major versions
2044       other than the one built against (Peter Eisentraut)
2045      </para>
2046     </listitem>
2047
2048     <listitem>
2049      <para>
2050       Change all the <filename>contrib</> extension script files to report
2051       a useful error message if they are fed to <application>psql</>
2052       (Andrew Dunstan and Tom Lane)
2053      </para>
2054
2055      <para>
2056       This should help teach people about the new method of using
2057       <command>CREATE EXTENSION</> to load these files.  In most cases,
2058       sourcing the scripts directly would fail anyway, but with
2059       harder-to-interpret messages.
2060      </para>
2061     </listitem>
2062
2063     <listitem>
2064      <para>
2065       Fix incorrect coding in <filename>contrib/dict_int</> and
2066       <filename>contrib/dict_xsyn</> (Tom Lane)
2067      </para>
2068
2069      <para>
2070       Some functions incorrectly assumed that memory returned by
2071       <function>palloc()</> is guaranteed zeroed.
2072      </para>
2073     </listitem>
2074
2075     <listitem>
2076      <para>
2077       Remove <filename>contrib/sepgsql</> tests from the regular regression
2078       test mechanism (Tom Lane)
2079      </para>
2080
2081      <para>
2082       Since these tests require root privileges for setup, they're impractical
2083       to run automatically.  Switch over to a manual approach instead, and
2084       provide a testing script to help with that.
2085      </para>
2086     </listitem>
2087
2088     <listitem>
2089      <para>
2090       Fix assorted errors in <filename>contrib/unaccent</>'s configuration
2091       file parsing (Tom Lane)
2092      </para>
2093     </listitem>
2094
2095     <listitem>
2096      <para>
2097       Honor query cancel interrupts promptly in <function>pgstatindex()</>
2098       (Robert Haas)
2099      </para>
2100     </listitem>
2101
2102     <listitem>
2103      <para>
2104       Fix incorrect quoting of log file name in Mac OS X start script
2105       (Sidar Lopez)
2106      </para>
2107     </listitem>
2108
2109     <listitem>
2110      <para>
2111       Revert unintentional enabling of <literal>WAL_DEBUG</> (Robert Haas)
2112      </para>
2113
2114      <para>
2115       Fortunately, as debugging tools go, this one is pretty cheap;
2116       but it's not intended to be enabled by default, so revert.
2117      </para>
2118     </listitem>
2119
2120     <listitem>
2121      <para>
2122       Ensure VPATH builds properly install all server header files
2123       (Peter Eisentraut)
2124      </para>
2125     </listitem>
2126
2127     <listitem>
2128      <para>
2129       Shorten file names reported in verbose error messages (Peter Eisentraut)
2130      </para>
2131
2132      <para>
2133       Regular builds have always reported just the name of the C file
2134       containing the error message call, but VPATH builds formerly
2135       reported an absolute path name.
2136      </para>
2137     </listitem>
2138
2139     <listitem>
2140      <para>
2141       Fix interpretation of Windows timezone names for Central America
2142       (Tom Lane)
2143      </para>
2144
2145      <para>
2146       Map <quote>Central America Standard Time</> to <literal>CST6</>, not
2147       <literal>CST6CDT</>, because DST is generally not observed anywhere in
2148       Central America.
2149      </para>
2150     </listitem>
2151
2152     <listitem>
2153      <para>
2154       Update time zone data files to <application>tzdata</> release 2011n
2155       for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa;
2156       also historical corrections for Alaska and British East Africa.
2157      </para>
2158     </listitem>
2159
2160    </itemizedlist>
2161
2162   </sect2>
2163  </sect1>
2164
2165  <sect1 id="release-9-1-1">
2166   <title>Release 9.1.1</title>
2167
2168   <note>
2169   <title>Release Date</title>
2170   <simpara>2011-09-26</simpara>
2171   </note>
2172
2173   <para>
2174    This release contains a small number of fixes from 9.1.0.
2175    For information about new features in the 9.1 major release, see
2176    <xref linkend="release-9-1">.
2177   </para>
2178
2179   <sect2>
2180    <title>Migration to Version 9.1.1</title>
2181
2182    <para>
2183     A dump/restore is not required for those running 9.1.X.
2184    </para>
2185
2186   </sect2>
2187
2188   <sect2>
2189    <title>Changes</title>
2190
2191    <itemizedlist>
2192
2193     <listitem>
2194      <para>
2195       Make <function>pg_options_to_table</> return NULL for an option with no
2196       value (Tom Lane)
2197      </para>
2198
2199      <para>
2200       Previously such cases would result in a server crash.
2201      </para>
2202     </listitem>
2203
2204     <listitem>
2205      <para>
2206       Fix memory leak at end of a GiST index scan (Tom Lane)
2207      </para>
2208
2209      <para>
2210       Commands that perform many separate GiST index scans, such as
2211       verification of a new GiST-based exclusion constraint on a table
2212       already containing many rows, could transiently require large amounts of
2213       memory due to this leak.
2214      </para>
2215     </listitem>
2216
2217     <listitem>
2218      <para>
2219       Fix explicit reference to <literal>pg_temp</> schema in <command>CREATE
2220       TEMPORARY TABLE</> (Robert Haas)
2221      </para>
2222
2223      <para>
2224       This used to be allowed, but failed in 9.1.0.
2225      </para>
2226     </listitem>
2227
2228    </itemizedlist>
2229
2230   </sect2>
2231  </sect1>
2232
2233  <sect1 id="release-9-1">
2234   <title>Release 9.1</title>
2235
2236   <note>
2237    <title>Release Date</title>
2238    <simpara>2011-09-12</simpara>
2239   </note>
2240
2241   <sect2>
2242    <title>Overview</title>
2243
2244    <para>
2245     This release shows <productname>PostgreSQL</> moving beyond the
2246     traditional relational-database feature set with new, ground-breaking
2247     functionality that is unique to <productname>PostgreSQL</>.
2248     The streaming replication feature introduced in release 9.0 is
2249     significantly enhanced by adding a synchronous-replication option,
2250     streaming backups, and monitoring improvements.
2251     Major enhancements include:
2252    </para>
2253
2254    <itemizedlist>
2255
2256     <!-- This list duplicates items below, but without authors or details-->
2257
2258     <listitem>
2259      <para>
2260       Allow <link linkend="synchronous-replication">synchronous
2261       replication</link>
2262      </para>
2263     </listitem>
2264
2265     <listitem>
2266      <para>
2267       Add support for <link linkend="SQL-CREATEFOREIGNTABLE">foreign
2268       tables</link>
2269      </para>
2270     </listitem>
2271
2272     <listitem>
2273      <para>
2274       Add per-column <link
2275       linkend="collation">collation</link> support
2276      </para>
2277     </listitem>
2278
2279     <listitem>
2280      <para>
2281       Add <link linkend="extend-extensions">extensions</link> which
2282       simplify packaging of additions to <productname>PostgreSQL</>
2283      </para>
2284     </listitem>
2285
2286     <listitem>
2287      <para>
2288       Add a true <link
2289       linkend="xact-serializable">serializable isolation level</link>
2290      </para>
2291     </listitem>
2292
2293     <listitem>
2294      <para>
2295       Support unlogged tables using the <literal>UNLOGGED</>
2296       option in <link linkend="SQL-CREATETABLE"><command>CREATE
2297       TABLE</></link>
2298      </para>
2299     </listitem>
2300
2301     <listitem>
2302      <para>
2303       Allow data-modification commands
2304       (<command>INSERT</>/<command>UPDATE</>/<command>DELETE</>) in
2305       <link linkend="queries-with"><literal>WITH</></link> clauses
2306      </para>
2307     </listitem>
2308
2309     <listitem>
2310      <para>
2311       Add nearest-neighbor (order-by-operator) searching to <link
2312       linkend="GiST"><acronym>GiST</> indexes</link>
2313      </para>
2314     </listitem>
2315
2316     <listitem>
2317      <para>
2318       Add a <link linkend="SQL-SECURITY-LABEL"><command>SECURITY
2319       LABEL</></link> command and support for
2320       <link linkend="sepgsql"><acronym>SELinux</> permissions control</link>
2321      </para>
2322     </listitem>
2323
2324     <listitem>
2325      <para>
2326       Update the <link linkend="plpython">PL/Python</link> server-side
2327       language
2328      </para>
2329     </listitem>
2330
2331    </itemizedlist>
2332
2333    <para>
2334     The above items are explained in more detail in the sections below.
2335    </para>
2336
2337   </sect2>
2338
2339   <sect2>
2340
2341   <title>Migration to Version 9.1</title>
2342
2343    <para>
2344     A dump/restore using <application>pg_dump</application>,
2345     or use of <application>pg_upgrade</application>, is required
2346     for those wishing to migrate data from any previous
2347     release.
2348    </para>
2349
2350    <para>
2351     Version 9.1 contains a number of changes that may affect compatibility
2352     with previous releases.  Observe the following incompatibilities:
2353    </para>
2354
2355    <sect3>
2356     <title>Strings</title>
2357
2358     <itemizedlist>
2359
2360      <listitem>
2361       <para>
2362        Change the default value of <link
2363        linkend="guc-standard-conforming-strings"><varname>standard_conforming_strings</></link>
2364        to on (Robert Haas)
2365       </para>
2366
2367       <para>
2368        By default, backslashes are now ordinary characters in string literals,
2369        not escape characters.  This change removes a long-standing
2370        incompatibility with the SQL standard.  <link
2371        linkend="guc-escape-string-warning"><varname>escape_string_warning</></link>
2372        has produced warnings about this usage for years.  <literal>E''</>
2373        strings are the proper way to embed backslash escapes in strings and are
2374        unaffected by this change.
2375       </para>
2376
2377       <warning>
2378        <para>
2379         This change can break applications that are not expecting it and
2380         do their own string escaping according to the old rules.  The
2381         consequences could be as severe as introducing SQL-injection security
2382         holes.  Be sure to test applications that are exposed to untrusted
2383         input, to ensure that they correctly handle single quotes and
2384         backslashes in text strings.
2385        </para>
2386       </warning>
2387      </listitem>
2388
2389     </itemizedlist>
2390
2391    </sect3>
2392
2393    <sect3>
2394     <title>Casting</title>
2395
2396     <itemizedlist>
2397
2398      <listitem>
2399       <para>
2400        Disallow function-style and attribute-style data type casts for
2401        composite types (Tom Lane)
2402       </para>
2403
2404       <para>
2405        For example, disallow
2406        <literal><replaceable>composite_value</>.text</literal> and
2407        <literal>text(<replaceable>composite_value</>)</literal>.
2408        Unintentional uses of this syntax have frequently resulted in bug
2409        reports; although it was not a bug, it seems better to go back to
2410        rejecting such expressions.
2411        The <literal>CAST</> and <literal>::</> syntaxes are still available
2412        for use when a cast of an entire composite value is actually intended.
2413       </para>
2414      </listitem>
2415
2416      <listitem>
2417       <para>
2418        Tighten casting checks for domains based on arrays (Tom Lane)
2419       </para>
2420
2421       <para>
2422        When a domain is based on an array type, it is allowed to <quote>look
2423        through</> the domain type to access the array elements, including
2424        subscripting the domain value to fetch or assign an element.
2425        Assignment to an element of such a domain value, for instance via
2426        <literal>UPDATE ... SET domaincol[5] = ...</>, will now result in
2427        rechecking the domain type's constraints, whereas before the checks
2428        were skipped.
2429       </para>
2430      </listitem>
2431
2432     </itemizedlist>
2433
2434    </sect3>
2435
2436    <sect3>
2437     <title>Arrays</title>
2438
2439     <itemizedlist>
2440
2441      <listitem>
2442       <para>
2443        Change <link
2444        linkend="array-functions-table"><function>string_to_array()</></link>
2445        to return an empty array for a zero-length string (Pavel
2446        Stehule)
2447       </para>
2448
2449       <para>
2450        Previously this returned a null value.
2451       </para>
2452      </listitem>
2453
2454      <listitem>
2455       <para>
2456        Change <link
2457        linkend="array-functions-table"><function>string_to_array()</></link>
2458        so a <literal>NULL</> separator splits the string into characters
2459        (Pavel Stehule)
2460       </para>
2461
2462       <para>
2463        Previously this returned a null value.
2464       </para>
2465      </listitem>
2466
2467     </itemizedlist>
2468
2469    </sect3>
2470
2471    <sect3>
2472     <title>Object Modification</title>
2473
2474     <itemizedlist>
2475
2476      <listitem>
2477       <para>
2478        Fix improper checks for before/after triggers (Tom Lane)
2479       </para>
2480
2481       <para>
2482        Triggers can now be fired in three cases: <literal>BEFORE</>,
2483        <literal>AFTER</>, or <literal>INSTEAD OF</> some action.
2484        Trigger function authors should verify that their logic behaves
2485        sanely in all three cases.
2486       </para>
2487      </listitem>
2488
2489      <listitem>
2490       <para>
2491         Require superuser or <literal>CREATEROLE</> permissions in order to
2492         set comments on roles (Tom Lane)
2493       </para>
2494      </listitem>
2495
2496     </itemizedlist>
2497
2498    </sect3>
2499
2500    <sect3>
2501     <title>Server Settings</title>
2502
2503     <itemizedlist>
2504
2505      <listitem>
2506       <para>
2507        Change <link
2508        linkend="functions-recovery-info-table"><function>pg_last_xlog_receive_location()</></link>
2509        so it never moves backwards (Fujii Masao)
2510       </para>
2511
2512       <para>
2513        Previously, the value of <function>pg_last_xlog_receive_location()</>
2514        could move backward when streaming replication is restarted.
2515       </para>
2516      </listitem>
2517
2518      <listitem>
2519       <para>
2520        Have logging of replication connections honor <link
2521        linkend="guc-log-connections"><varname>log_connections</></link>
2522        (Magnus Hagander)
2523       </para>
2524
2525       <para>
2526        Previously, replication connections were always logged.
2527       </para>
2528      </listitem>
2529
2530     </itemizedlist>
2531
2532    </sect3>
2533
2534    <sect3>
2535     <title><link linkend="plpgsql">PL/pgSQL</link> Server-Side Language</title>
2536
2537     <itemizedlist>
2538
2539      <listitem>
2540       <para>
2541        Change PL/pgSQL's <literal>RAISE</> command without parameters
2542        to be catchable by the attached exception block (Piyush Newe)
2543       </para>
2544
2545       <para>
2546        Previously <literal>RAISE</> in a code block was always scoped to
2547        an attached exception block, so it was uncatchable at the same
2548        scope.
2549       </para>
2550      </listitem>
2551
2552      <listitem>
2553       <para>
2554        Adjust PL/pgSQL's error line numbering code to be consistent
2555        with other PLs (Pavel Stehule)
2556       </para>
2557
2558       <para>
2559        Previously, PL/pgSQL would ignore (not count) an empty line at the
2560        start of the function body.  Since this was inconsistent with all
2561        other languages, the special case was removed.
2562       </para>
2563      </listitem>
2564
2565      <listitem>
2566       <para>
2567        Make PL/pgSQL complain about conflicting IN and OUT parameter names
2568        (Tom Lane)
2569       </para>
2570
2571       <para>
2572        Formerly, the collision was not detected, and the name would just
2573        silently refer to only the OUT parameter.
2574       </para>
2575      </listitem>
2576
2577      <listitem>
2578       <para>
2579        Type modifiers of PL/pgSQL variables are now visible to the SQL parser
2580        (Tom Lane)
2581       </para>
2582
2583       <para>
2584        A type modifier (such as a varchar length limit) attached to a PL/pgSQL
2585        variable was formerly enforced during assignments, but was ignored for
2586        all other purposes.  Such variables will now behave more like table
2587        columns declared with the same modifier.  This is not expected to make
2588        any visible difference in most cases, but it could result in subtle
2589        changes for some SQL commands issued by PL/pgSQL functions.
2590       </para>
2591      </listitem>
2592
2593     </itemizedlist>
2594
2595    </sect3>
2596
2597    <sect3>
2598     <title>Contrib</title>
2599
2600     <itemizedlist>
2601
2602      <listitem>
2603       <para>
2604        All contrib modules are now installed with <link
2605        linkend="SQL-CREATEEXTENSION"><command>CREATE EXTENSION</></link>
2606        rather than by manually invoking their SQL scripts
2607        (Dimitri Fontaine, Tom Lane)
2608       </para>
2609
2610       <para>
2611        To update an existing database containing the 9.0 version of a contrib
2612        module, use <literal>CREATE EXTENSION ... FROM unpackaged</literal>
2613        to wrap the existing contrib module's objects into an extension.  When
2614        updating from a pre-9.0 version, drop the contrib module's objects
2615        using its old uninstall script, then use <literal>CREATE EXTENSION</>.
2616       </para>
2617      </listitem>
2618
2619     </itemizedlist>
2620
2621    </sect3>
2622
2623    <sect3>
2624     <title>Other Incompatibilities</title>
2625
2626     <itemizedlist>
2627
2628      <listitem>
2629       <para>
2630        Make <link
2631        linkend="monitoring-stats-funcs-table"><function>pg_stat_reset()</></link>
2632        reset all database-level statistics (Tomas Vondra)
2633       </para>
2634
2635       <para>
2636        Some <structname>pg_stat_database</> counters were not being reset.
2637       </para>
2638      </listitem>
2639
2640      <listitem>
2641       <para>
2642         Fix some <link
2643         linkend="infoschema-triggers"><structname>information_schema.triggers</></link>
2644         column names to match the new SQL-standard names (Dean Rasheed)
2645       </para>
2646      </listitem>
2647
2648      <listitem>
2649       <para>
2650        Treat <application>ECPG</> cursor names as case-insensitive
2651        (Zoltan Boszormenyi)
2652       </para>
2653      </listitem>
2654
2655     </itemizedlist>
2656
2657    </sect3>
2658   </sect2>
2659
2660   <sect2>
2661    <title>Changes</title>
2662
2663    <para>
2664     Below you will find a detailed account of the changes between
2665     <productname>PostgreSQL</productname> 9.1 and the previous major
2666     release.
2667    </para>
2668
2669    <sect3>
2670     <title>Server</title>
2671
2672     <sect4>
2673      <title>Performance</title>
2674
2675      <itemizedlist>
2676
2677       <listitem>
2678        <para>
2679         Support unlogged tables using the <literal>UNLOGGED</>
2680         option in <link linkend="SQL-CREATETABLE"><command>CREATE
2681         TABLE</></link> (Robert Haas)
2682        </para>
2683
2684        <para>
2685         Such tables provide better update performance than regular tables,
2686         but are not crash-safe: their contents are automatically cleared in
2687         case of a server crash.  Their contents do not propagate to
2688         replication slaves, either.
2689        </para>
2690       </listitem>
2691
2692       <listitem>
2693        <para>
2694         Allow <literal>FULL OUTER JOIN</literal> to be implemented as a
2695         hash join, and allow either side of a <literal>LEFT OUTER JOIN</>
2696         or <literal>RIGHT OUTER JOIN</> to be hashed (Tom Lane)
2697        </para>
2698
2699        <para>
2700         Previously <literal>FULL OUTER JOIN</literal> could only be
2701         implemented as a merge join, and <literal>LEFT OUTER JOIN</literal>
2702         and <literal>RIGHT OUTER JOIN</literal> could hash only the nullable
2703         side of the join.  These changes provide additional query optimization
2704         possibilities.
2705        </para>
2706       </listitem>
2707
2708       <listitem>
2709        <para>
2710         Merge duplicate fsync requests (Robert Haas, Greg Smith)
2711        </para>
2712
2713        <para>
2714         This greatly improves performance under heavy write loads.
2715        </para>
2716       </listitem>
2717
2718       <listitem>
2719        <para>
2720         Improve performance of <link
2721         linkend="guc-commit-siblings"><varname>commit_siblings</></link>
2722         (Greg Smith)
2723        </para>
2724
2725        <para>
2726         This allows the use of <varname>commit_siblings</varname> with
2727         less overhead.
2728        </para>
2729       </listitem>
2730
2731       <listitem>
2732        <para>
2733         Reduce the memory requirement for large ispell dictionaries
2734         (Pavel Stehule, Tom Lane)
2735        </para>
2736       </listitem>
2737
2738       <listitem>
2739        <para>
2740         Avoid leaving data files open after <quote>blind writes</>
2741         (Alvaro Herrera)
2742        </para>
2743
2744        <para>
2745         This fixes scenarios in which backends might hold files open long
2746         after they were deleted, preventing the kernel from reclaiming
2747         disk space.
2748        </para>
2749       </listitem>
2750
2751      </itemizedlist>
2752
2753     </sect4>
2754
2755     <sect4>
2756      <title>Optimizer</title>
2757
2758      <itemizedlist>
2759
2760       <listitem>
2761        <para>
2762         Allow inheritance table scans to return meaningfully-sorted
2763         results (Greg Stark, Hans-Jurgen Schonig, Robert Haas, Tom Lane)
2764        </para>
2765
2766        <para>
2767         This allows better optimization of queries that use <literal>ORDER
2768         BY</>, <literal>LIMIT</>, or <literal>MIN</>/<literal>MAX</> with
2769         inherited tables.
2770        </para>
2771       </listitem>
2772
2773       <listitem>
2774        <para>
2775          Improve GIN index scan cost estimation (Teodor Sigaev)
2776        </para>
2777       </listitem>
2778
2779       <listitem>
2780        <para>
2781         Improve cost estimation for aggregates and window functions (Tom Lane)
2782        </para>
2783       </listitem>
2784
2785      </itemizedlist>
2786
2787     </sect4>
2788
2789     <sect4>
2790      <title>Authentication</title>
2791
2792      <itemizedlist>
2793
2794       <listitem>
2795        <para>
2796         Support host names and host suffixes
2797         (e.g. <literal>.example.com</>) in <link
2798         linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link>
2799         (Peter Eisentraut)
2800        </para>
2801
2802        <para>
2803         Previously only host <acronym>IP</> addresses and <acronym>CIDR</>
2804         values were supported.
2805        </para>
2806       </listitem>
2807
2808       <listitem>
2809        <para>
2810         Support the key word <literal>all</> in the host column of <link
2811         linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link>
2812         (Peter Eisentraut)
2813        </para>
2814
2815        <para>
2816         Previously people used <literal>0.0.0.0/0</> or <literal>::/0</>
2817         for this.
2818        </para>
2819       </listitem>
2820
2821       <listitem>
2822        <para>
2823         Reject <literal>local</> lines in <link
2824         linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link>
2825         on platforms that don't support Unix-socket connections
2826         (Magnus Hagander)
2827        </para>
2828
2829        <para>
2830         Formerly, such lines were silently ignored, which could be surprising.
2831         This makes the behavior more like other unsupported cases.
2832        </para>
2833       </listitem>
2834
2835       <listitem>
2836        <para>
2837         Allow <link linkend="gssapi-auth"><acronym>GSSAPI</></link>
2838         to be used to authenticate to servers via <link
2839         linkend="sspi-auth"><acronym>SSPI</></link> (Christian Ullrich)
2840        </para>
2841
2842        <para>
2843         Specifically this allows Unix-based <acronym>GSSAPI</> clients
2844         to do <acronym>SSPI</> authentication with Windows servers.
2845        </para>
2846       </listitem>
2847
2848       <listitem>
2849        <para>
2850         <link linkend="auth-ident"><literal>ident</literal></link>
2851         authentication over local sockets is now known as
2852         <link linkend="auth-peer"><literal>peer</literal></link>
2853         (Magnus Hagander)
2854        </para>
2855
2856        <para>
2857         The old term is still accepted for backward compatibility, but since
2858         the two methods are fundamentally different, it seemed better to adopt
2859         different names for them.
2860        </para>
2861       </listitem>
2862
2863       <listitem>
2864        <para>
2865         Rewrite <link linkend="auth-peer"><acronym>peer</></link>
2866         authentication to avoid use of credential control messages (Tom Lane)
2867        </para>
2868
2869        <para>
2870         This change makes the peer authentication code simpler and
2871         better-performing.  However, it requires the platform to provide the
2872         <function>getpeereid</> function or an equivalent socket operation.
2873         So far as is known, the only platform for which peer authentication
2874         worked before and now will not is pre-5.0 NetBSD.
2875        </para>
2876       </listitem>
2877
2878      </itemizedlist>
2879
2880     </sect4>
2881
2882     <sect4>
2883      <title>Monitoring</title>
2884
2885      <itemizedlist>
2886
2887       <listitem>
2888        <para>
2889         Add details to the logging of restartpoints and checkpoints,
2890         which is controlled by <link
2891         linkend="guc-log-checkpoints"><varname>log_checkpoints</></link>
2892         (Fujii Masao, Greg Smith)
2893        </para>
2894
2895        <para>
2896         New details include <acronym>WAL</> file and sync activity.
2897        </para>
2898       </listitem>
2899
2900       <listitem>
2901        <para>
2902          Add <link
2903          linkend="guc-log-file-mode"><varname>log_file_mode</></link>
2904          which controls the permissions on log files created by the
2905          logging collector (Martin Pihlak)
2906        </para>
2907       </listitem>
2908
2909       <listitem>
2910        <para>
2911         Reduce the default maximum line length for <application>syslog</>
2912         logging to 900 bytes plus prefixes (Noah Misch)
2913        </para>
2914
2915        <para>
2916         This avoids truncation of long log lines on syslog implementations
2917         that have a 1KB length limit, rather than the more common 2KB.
2918        </para>
2919       </listitem>
2920
2921      </itemizedlist>
2922
2923     </sect4>
2924
2925     <sect4>
2926      <title>Statistical Views</title>
2927
2928      <itemizedlist>
2929
2930       <listitem>
2931        <para>
2932         Add <structfield>client_hostname</structfield> column to <link
2933         linkend="monitoring-stats-views-table"><structname>pg_stat_activity</></link>
2934         (Peter Eisentraut)
2935        </para>
2936
2937        <para>
2938         Previously only the client address was reported.
2939        </para>
2940       </listitem>
2941
2942       <listitem>
2943        <para>
2944         Add <link
2945         linkend="monitoring-stats-views-table"><structname>pg_stat_xact_*</></link>
2946         statistics functions and views (Joel Jacobson)
2947        </para>
2948
2949        <para>
2950         These are like the database-wide statistics counter views, but
2951         reflect counts for only the current transaction.
2952        </para>
2953       </listitem>
2954
2955       <listitem>
2956        <para>
2957          Add time of last reset in database-level and background writer
2958          statistics views (Tomas Vondra)
2959        </para>
2960       </listitem>
2961
2962       <listitem>
2963        <para>
2964          Add columns showing the number of vacuum and analyze operations
2965          in <link
2966          linkend="monitoring-stats-views-table"><structname>pg_stat_*_tables</></link>
2967          views (Magnus Hagander)
2968        </para>
2969       </listitem>
2970
2971       <listitem>
2972        <para>
2973         Add <structfield>buffers_backend_fsync</> column to <link
2974         linkend="monitoring-stats-views-table"><structname>pg_stat_bgwriter</></link>
2975         (Greg Smith)
2976        </para>
2977
2978        <para>
2979         This new column counts the number of times a backend fsyncs a
2980         buffer.
2981        </para>
2982       </listitem>
2983
2984      </itemizedlist>
2985
2986     </sect4>
2987
2988     <sect4>
2989      <title>Server Settings</title>
2990
2991      <itemizedlist>
2992
2993       <listitem>
2994        <para>
2995         Provide auto-tuning of <link
2996         linkend="guc-wal-buffers"><varname>wal_buffers</></link> (Greg
2997         Smith)
2998        </para>
2999
3000        <para>
3001         By default, the value of <varname>wal_buffers</> is now chosen
3002         automatically based on the value of <varname>shared_buffers</>.
3003        </para>
3004       </listitem>
3005
3006       <listitem>
3007        <para>
3008         Increase the maximum values for
3009         <link linkend="guc-deadlock-timeout"><varname>deadlock_timeout</varname></link>,
3010         <link linkend="guc-log-min-duration-statement"><varname>log_min_duration_statement</varname></link>, and
3011         <link linkend="guc-log-autovacuum-min-duration"><varname>log_autovacuum_min_duration</varname></link>
3012         (Peter Eisentraut)
3013        </para>
3014
3015        <para>
3016         The maximum value for each of these parameters was previously
3017         only about 35 minutes.  Much larger values are now allowed.
3018        </para>
3019       </listitem>
3020
3021       </itemizedlist>
3022
3023     </sect4>
3024
3025    </sect3>
3026
3027    <sect3>
3028     <title>Replication and Recovery</title>
3029
3030    <sect4>
3031     <title>Streaming Replication and Continuous Archiving</title>
3032
3033     <itemizedlist>
3034
3035      <listitem>
3036       <para>
3037        Allow <link linkend="synchronous-replication">synchronous
3038        replication</link> (Simon Riggs, Fujii Masao)
3039       </para>
3040
3041       <para>
3042        This allows the primary server to wait for a standby to write a
3043        transaction's information to disk before acknowledging the commit.
3044        One standby at a time can take the role of the synchronous standby,
3045        as controlled by the
3046        <link linkend="guc-synchronous-standby-names"><varname>synchronous_standby_names</varname></link>
3047        setting.  Synchronous replication can be enabled or disabled on a
3048        per-transaction basis using the
3049        <link linkend="guc-synchronous-commit"><varname>synchronous_commit</></link>
3050        setting.
3051       </para>
3052      </listitem>
3053
3054      <listitem>
3055       <para>
3056        Add protocol support for sending file system backups to standby servers
3057        using the streaming replication network connection (Magnus Hagander,
3058        Heikki Linnakangas)
3059       </para>
3060
3061       <para>
3062        This avoids the requirement of manually transferring a file
3063        system backup when setting up a standby server.
3064       </para>
3065      </listitem>
3066
3067      <listitem>
3068       <para>
3069        Add
3070        <link linkend="guc-replication-timeout"><varname>replication_timeout</></link>
3071        setting (Fujii Masao, Heikki Linnakangas)
3072       </para>
3073
3074       <para>
3075        Replication connections that are idle for more than the
3076        <varname>replication_timeout</> interval will be terminated
3077        automatically.  Formerly, a failed connection was typically not
3078        detected until the TCP timeout elapsed, which is inconveniently
3079        long in many situations.
3080       </para>
3081      </listitem>
3082
3083      <listitem>
3084       <para>
3085        Add command-line tool <link
3086        linkend="app-pgbasebackup"><application>pg_basebackup</></link>
3087        for creating a new standby server or database backup (Magnus
3088        Hagander)
3089       </para>
3090      </listitem>
3091
3092      <listitem>
3093       <para>
3094        Add a <link linkend="SQL-CREATEROLE">replication permission</link>
3095        for roles (Magnus Hagander)
3096       </para>
3097
3098       <para>
3099        This is a read-only permission used for streaming replication.
3100        It allows a non-superuser role to be used for replication connections.
3101        Previously only superusers could initiate replication
3102        connections; superusers still have this permission by default.
3103       </para>
3104      </listitem>
3105
3106     </itemizedlist>
3107
3108     </sect4>
3109
3110     <sect4>
3111      <title>Replication Monitoring</title>
3112
3113      <itemizedlist>
3114
3115       <listitem>
3116        <para>
3117         Add system view <link
3118         linkend="monitoring-stats-views-table"><structname>pg_stat_replication</></link>
3119         which displays activity of <acronym>WAL</> sender processes (Itagaki
3120         Takahiro, Simon Riggs)
3121        </para>
3122
3123        <para>
3124         This reports the status of all connected standby servers.
3125        </para>
3126       </listitem>
3127
3128       <listitem>
3129        <para>
3130         Add monitoring function <link
3131         linkend="functions-recovery-info-table"><function>pg_last_xact_replay_timestamp()</></link>
3132         (Fujii Masao)
3133        </para>
3134
3135        <para>
3136         This returns the time at which the primary generated the most
3137         recent commit or abort record applied on the standby.
3138        </para>
3139       </listitem>
3140
3141      </itemizedlist>
3142
3143     </sect4>
3144
3145     <sect4>
3146      <title>Hot Standby</title>
3147
3148      <itemizedlist>
3149
3150      <listitem>
3151       <para>
3152        Add configuration parameter <link
3153        linkend="guc-hot-standby-feedback"><varname>hot_standby_feedback</></link>
3154        to enable standbys to postpone cleanup of old row versions on the
3155        primary (Simon Riggs)
3156       </para>
3157
3158       <para>
3159        This helps avoid canceling long-running queries on the standby.
3160       </para>
3161      </listitem>
3162
3163       <listitem>
3164        <para>
3165         Add the <link
3166         linkend="monitoring-stats-views-table"><structname>pg_stat_database_conflicts</></link>
3167         system view to show queries that have been canceled and the
3168         reason (Magnus Hagander)
3169        </para>
3170
3171        <para>
3172         Cancellations can occur because of dropped tablespaces, lock
3173         timeouts, old snapshots, pinned buffers, and deadlocks.
3174        </para>
3175       </listitem>
3176
3177       <listitem>
3178        <para>
3179         Add a <structfield>conflicts</> count to <link
3180         linkend="monitoring-stats-views-table"><structname>pg_stat_database</></link>
3181         (Magnus Hagander)
3182        </para>
3183
3184        <para>
3185         This is the number of conflicts that occurred in the database.
3186        </para>
3187       </listitem>
3188
3189       <listitem>
3190        <para>
3191         Increase the maximum values for
3192         <link linkend="guc-max-standby-archive-delay"><varname>max_standby_archive_delay</varname></link> and
3193         <link linkend="guc-max-standby-streaming-delay"><varname>max_standby_streaming_delay</varname></link>
3194        </para>
3195
3196        <para>
3197         The maximum value for each of these parameters was previously
3198         only about 35 minutes.  Much larger values are now allowed.
3199        </para>
3200       </listitem>
3201
3202       <listitem>
3203        <para>
3204         Add <link
3205         linkend="errcodes-table"><literal>ERRCODE_T_R_DATABASE_DROPPED</></link>
3206         error code to report recovery conflicts due to dropped databases
3207         (Tatsuo Ishii)
3208        </para>
3209
3210        <para>
3211         This is useful for connection pooling software.
3212        </para>
3213       </listitem>
3214
3215      </itemizedlist>
3216
3217     </sect4>
3218
3219     <sect4>
3220      <title>Recovery Control</title>
3221
3222      <itemizedlist>
3223
3224       <listitem>
3225        <para>
3226         Add functions to control streaming replication replay (Simon Riggs)
3227        </para>
3228
3229        <para>
3230         The new functions are <link
3231         linkend="functions-recovery-control-table"><function>pg_xlog_replay_pause()</></link>,
3232         <link
3233         linkend="functions-recovery-control-table"><function>pg_xlog_replay_resume()</></link>,
3234         and the status function <link
3235         linkend="functions-recovery-control-table"><function>pg_is_xlog_replay_paused()</></link>.
3236        </para>
3237       </listitem>
3238
3239       <listitem>
3240        <para>
3241         Add <filename>recovery.conf</> setting <link
3242         linkend="pause-at-recovery-target"><varname>pause_at_recovery_target</></link>
3243         to pause recovery at target (Simon Riggs)
3244        </para>
3245
3246        <para>
3247         This allows a recovery server to be queried to check whether
3248         the recovery point is the one desired.
3249        </para>
3250       </listitem>
3251
3252       <listitem>
3253        <para>
3254         Add the ability to create named restore points using <link
3255         linkend="functions-admin-backup-table"><function>pg_create_restore_point()</></link>
3256         (Jaime Casanova)
3257        </para>
3258
3259        <para>
3260         These named restore points can be specified as recovery
3261         targets using the new <filename>recovery.conf</> setting
3262         <link linkend="recovery-target-name"><varname>recovery_target_name</></link>.
3263        </para>
3264       </listitem>
3265
3266       <listitem>
3267        <para>
3268         Allow standby recovery to switch to a new timeline automatically
3269         (Heikki Linnakangas)
3270        </para>
3271
3272        <para>
3273         Now standby servers scan the archive directory for new
3274         timelines periodically.
3275        </para>
3276       </listitem>
3277
3278       <listitem>
3279        <para>
3280         Add <link
3281         linkend="guc-restart-after-crash"><varname>restart_after_crash</></link>
3282         setting which disables automatic server restart after a backend
3283         crash (Robert Haas)
3284        </para>
3285
3286        <para>
3287         This allows external cluster management software to control
3288         whether the database server restarts or not.
3289        </para>
3290       </listitem>
3291
3292       <listitem>
3293        <para>
3294         Allow <link
3295         linkend="recovery-config"><filename>recovery.conf</></link>
3296         to use the same quoting behavior as <filename>postgresql.conf</>
3297         (Dimitri Fontaine)
3298        </para>
3299
3300        <para>
3301         Previously all values had to be quoted.
3302        </para>
3303       </listitem>
3304
3305      </itemizedlist>
3306
3307     </sect4>
3308
3309    </sect3>
3310
3311    <sect3>
3312     <title>Queries</title>
3313
3314      <itemizedlist>
3315
3316       <listitem>
3317        <para>
3318         Add a true <link
3319         linkend="xact-serializable">serializable isolation level</link>
3320         (Kevin Grittner, Dan Ports)
3321        </para>
3322
3323        <para>
3324         Previously, asking for serializable isolation guaranteed only that a
3325         single MVCC snapshot would be used for the entire transaction, which
3326         allowed certain documented anomalies.  The old snapshot isolation
3327         behavior is still available by requesting the <link
3328         linkend="xact-repeatable-read"><literal>REPEATABLE READ</></link>
3329         isolation level.
3330        </para>
3331       </listitem>
3332
3333       <listitem>
3334        <para>
3335         Allow data-modification commands
3336         (<command>INSERT</>/<command>UPDATE</>/<command>DELETE</>) in
3337         <link linkend="queries-with"><literal>WITH</></link> clauses
3338         (Marko Tiikkaja, Hitoshi Harada)
3339        </para>
3340
3341        <para>
3342         These commands can use <literal>RETURNING</> to pass data up to the
3343         containing query.
3344        </para>
3345       </listitem>
3346
3347       <listitem>
3348        <para>
3349         Allow <link linkend="queries-with"><literal>WITH</></link>
3350         clauses to be attached to <command>INSERT</>, <command>UPDATE</>,
3351         <command>DELETE</> statements (Marko Tiikkaja, Hitoshi Harada)
3352        </para>
3353       </listitem>
3354
3355       <listitem>
3356        <para>
3357         Allow non-<link linkend="queries-group"><literal>GROUP
3358         BY</></link> columns in the query target list when the primary
3359         key is specified in the <literal>GROUP BY</> clause (Peter
3360         Eisentraut)
3361        </para>
3362
3363        <para>
3364         The SQL standard allows this behavior, and
3365         because of the primary key, the result is unambiguous.
3366        </para>
3367       </listitem>
3368
3369       <listitem>
3370        <para>
3371         Allow use of the key word <literal>DISTINCT</> in <link
3372         linkend="queries-union"><literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</></link>
3373         clauses (Tom Lane)
3374        </para>
3375
3376        <para>
3377         <literal>DISTINCT</> is the default behavior so use of this
3378         key word is redundant, but the SQL standard allows it.
3379        </para>
3380       </listitem>
3381
3382       <listitem>
3383        <para>
3384         Fix ordinary queries with rules to use the same snapshot behavior
3385         as <command>EXPLAIN ANALYZE</> (Marko Tiikkaja)
3386        </para>
3387
3388        <para>
3389         Previously <command>EXPLAIN ANALYZE</> used slightly different
3390         snapshot timing for queries involving rules.  The
3391         <command>EXPLAIN ANALYZE</> behavior was judged to be more logical.
3392        </para>
3393       </listitem>
3394
3395      </itemizedlist>
3396
3397     <sect4>
3398      <title>Strings</title>
3399
3400      <itemizedlist>
3401
3402       <listitem>
3403        <para>
3404         Add per-column <link
3405         linkend="collation">collation</link> support
3406         (Peter Eisentraut, Tom Lane)
3407        </para>
3408
3409        <para>
3410         Previously collation (the sort ordering of text strings) could only be
3411         chosen at database creation.
3412         Collation can now be set per column, domain, index, or
3413         expression, via the SQL-standard <literal>COLLATE</> clause.
3414        </para>
3415       </listitem>
3416
3417      </itemizedlist>
3418
3419     </sect4>
3420
3421    </sect3>
3422
3423    <sect3>
3424     <title>Object Manipulation</title>
3425
3426      <itemizedlist>
3427
3428       <listitem>
3429        <para>
3430         Add <link linkend="extend-extensions">extensions</link> which
3431         simplify packaging of additions to <productname>PostgreSQL</>
3432         (Dimitri Fontaine, Tom Lane)
3433        </para>
3434
3435        <para>
3436         Extensions are controlled by the new <link
3437         linkend="SQL-CREATEEXTENSION"><command>CREATE</></link>/<link
3438         linkend="SQL-ALTEREXTENSION"><command>ALTER</></link>/<link
3439         linkend="SQL-DROPEXTENSION"><command>DROP EXTENSION</></link>
3440         commands.  This replaces ad-hoc methods of grouping objects that
3441         are added to a <productname>PostgreSQL</> installation.
3442        </para>
3443       </listitem>
3444
3445       <listitem>
3446        <para>
3447         Add support for <link linkend="SQL-CREATEFOREIGNTABLE">foreign
3448         tables</link> (Shigeru Hanada, Robert Haas, Jan Urbanski,
3449         Heikki Linnakangas)
3450        </para>
3451
3452        <para>
3453         This allows data stored outside the database to be used like
3454         native <productname>PostgreSQL</>-stored data.  Foreign tables
3455         are currently read-only, however.
3456        </para>
3457       </listitem>
3458
3459      <listitem>
3460       <para>
3461          Allow new values to be added to an existing enum type via
3462          <link linkend="SQL-ALTERTYPE"><command>ALTER TYPE</></link> (Andrew
3463          Dunstan)
3464       </para>
3465      </listitem>
3466
3467       <listitem>
3468        <para>
3469         Add <link linkend="SQL-ALTERTYPE"><command>ALTER TYPE ...
3470         ADD/DROP/ALTER/RENAME ATTRIBUTE</></link> (Peter Eisentraut)
3471        </para>
3472
3473        <para>
3474         This allows modification of composite types.
3475        </para>
3476       </listitem>
3477
3478      </itemizedlist>
3479
3480     <sect4>
3481      <title><command>ALTER</> Object</title>
3482
3483      <itemizedlist>
3484
3485       <listitem>
3486        <para>
3487         Add <literal>RESTRICT</>/<literal>CASCADE</> to <link
3488         linkend="SQL-ALTERTYPE"><command>ALTER TYPE</></link> operations
3489         on typed tables (Peter Eisentraut)
3490        </para>
3491
3492        <para>
3493         This controls
3494         <literal>ADD</>/<literal>DROP</>/<literal>ALTER</>/<literal>RENAME
3495         ATTRIBUTE</> cascading behavior.
3496        </para>
3497       </listitem>
3498
3499       <listitem>
3500        <para>
3501         Support <literal>ALTER TABLE <replaceable>name</> {OF | NOT OF}
3502         <replaceable>type</></literal>
3503         (Noah Misch)
3504        </para>
3505
3506        <para>
3507         This syntax allows a standalone table to be made into a typed table,
3508         or a typed table to be made standalone.
3509        </para>
3510       </listitem>
3511
3512       <listitem>
3513        <para>
3514         Add support for more object types in <command>ALTER ... SET
3515         SCHEMA</> commands (Dimitri Fontaine)
3516        </para>
3517
3518        <para>
3519         This command is now supported for conversions, operators, operator
3520         classes, operator families, text search configurations, text search
3521         dictionaries, text search parsers, and text search templates.
3522        </para>
3523       </listitem>
3524
3525      </itemizedlist>
3526
3527     </sect4>
3528
3529     <sect4>
3530      <title><link linkend="SQL-CREATETABLE"><command>CREATE/ALTER TABLE</></link></title>
3531
3532      <itemizedlist>
3533
3534       <listitem>
3535        <para>
3536         Add <command>ALTER TABLE ...
3537         ADD UNIQUE/PRIMARY KEY USING INDEX</command>
3538         (Gurjeet Singh)
3539        </para>
3540
3541        <para>
3542         This allows a primary key or unique constraint to be defined using an
3543         existing unique index, including a concurrently created unique index.
3544        </para>
3545       </listitem>
3546
3547       <listitem>
3548        <para>
3549         Allow <command>ALTER TABLE</>
3550         to add foreign keys without validation (Simon Riggs)
3551        </para>
3552
3553        <para>
3554         The new option is called <literal>NOT VALID</>.  The constraint's
3555         state can later be modified to <literal>VALIDATED</> and validation
3556         checks performed. Together these allow you to add a foreign key
3557         with minimal impact on read and write operations.
3558        </para>
3559       </listitem>
3560
3561       <listitem>
3562        <para>
3563         Allow <link linkend="SQL-ALTERTABLE"><command>ALTER TABLE
3564         ... SET DATA TYPE</command></link> to avoid table rewrites in
3565         appropriate cases (Noah Misch, Robert Haas)
3566        </para>
3567
3568        <para>
3569         For example, converting a <type>varchar</> column to
3570         <type>text</> no longer requires a rewrite of the table.
3571         However, increasing the length constraint on a
3572         <type>varchar</> column still requires a table rewrite.
3573        </para>
3574       </listitem>
3575
3576       <listitem>
3577        <para>
3578         Add <link linkend="SQL-CREATETABLE"><command>CREATE TABLE IF
3579         NOT EXISTS</></link> syntax (Robert Haas)
3580        </para>
3581
3582        <para>
3583         This allows table creation without causing an error if the
3584         table already exists.
3585        </para>
3586       </listitem>
3587
3588       <listitem>
3589        <para>
3590         Fix possible <quote>tuple concurrently updated</quote> error
3591         when two backends attempt to add an inheritance
3592         child to the same table at the same time (Robert Haas)
3593        </para>
3594
3595        <para>
3596         <link linkend="sql-altertable"><command>ALTER TABLE</command></link>
3597         now takes a stronger lock on the parent table, so that the sessions
3598         cannot try to update it simultaneously.
3599        </para>
3600       </listitem>
3601
3602      </itemizedlist>
3603
3604     </sect4>
3605
3606     <sect4>
3607      <title>Object Permissions</title>
3608
3609      <itemizedlist>
3610
3611       <listitem>
3612        <para>
3613         Add a <link linkend="SQL-SECURITY-LABEL"><command>SECURITY
3614         LABEL</></link> command (KaiGai Kohei)
3615        </para>
3616
3617        <para>
3618         This allows security labels to be assigned to objects.
3619        </para>
3620       </listitem>
3621
3622      </itemizedlist>
3623
3624     </sect4>
3625
3626    </sect3>
3627
3628    <sect3>
3629     <title>Utility Operations</title>
3630
3631     <itemizedlist>
3632
3633      <listitem>
3634       <para>
3635        Add transaction-level <link linkend="advisory-locks">advisory
3636        locks</link> (Marko Tiikkaja)
3637       </para>
3638
3639       <para>
3640        These are similar to the existing session-level advisory locks,
3641        but such locks are automatically released at transaction end.
3642       </para>
3643      </listitem>
3644
3645      <listitem>
3646       <para>
3647        Make <link linkend="SQL-TRUNCATE"><command>TRUNCATE ... RESTART
3648        IDENTITY</></link> restart sequences transactionally (Steve
3649        Singer)
3650       </para>
3651
3652       <para>
3653        Previously the counter could have been left out of sync if a
3654        backend crashed between the on-commit truncation activity and
3655        commit completion.
3656       </para>
3657      </listitem>
3658
3659     </itemizedlist>
3660
3661     <sect4>
3662      <title><link linkend="SQL-COPY"><command>COPY</></link></title>
3663
3664      <itemizedlist>
3665
3666       <listitem>
3667        <para>
3668         Add <literal>ENCODING</> option to <link
3669         linkend="SQL-COPY"><command>COPY TO/FROM</></link> (Hitoshi
3670         Harada, Itagaki Takahiro)
3671        </para>
3672
3673        <para>
3674         This allows the encoding of the <command>COPY</> file to be
3675         specified separately from client encoding.
3676        </para>
3677       </listitem>
3678
3679       <listitem>
3680        <para>
3681         Add bidirectional <link linkend="SQL-COPY"><command>COPY</></link>
3682         protocol support (Fujii Masao)
3683        </para>
3684
3685        <para>
3686         This is currently only used by streaming replication.
3687        </para>
3688       </listitem>
3689
3690      </itemizedlist>
3691
3692     </sect4>
3693
3694     <sect4>
3695      <title><link linkend="SQL-EXPLAIN"><command>EXPLAIN</></link></title>
3696
3697       <itemizedlist>
3698
3699       <listitem>
3700        <para>
3701         Make <command>EXPLAIN VERBOSE</> show the function call expression
3702         in a <literal>FunctionScan</literal> node (Tom Lane)
3703        </para>
3704       </listitem>
3705
3706      </itemizedlist>
3707
3708     </sect4>
3709
3710     <sect4>
3711      <title><link linkend="SQL-VACUUM"><command>VACUUM</></link></title>
3712
3713      <itemizedlist>
3714
3715       <listitem>
3716        <para>
3717         Add additional details to the output of <link
3718         linkend="SQL-VACUUM"><command>VACUUM FULL VERBOSE</></link>
3719         and <link linkend="SQL-CLUSTER"><command>CLUSTER VERBOSE</></link>
3720         (Itagaki Takahiro)
3721        </para>
3722
3723        <para>
3724         New information includes the live and dead tuple count and
3725         whether <command>CLUSTER</> is using an index to rebuild.
3726        </para>
3727       </listitem>
3728
3729       <listitem>
3730        <para>
3731         Prevent <link linkend="autovacuum">autovacuum</link> from
3732         waiting if it cannot acquire a table lock (Robert Haas)
3733        </para>
3734
3735        <para>
3736         It will try to vacuum that table later.
3737        </para>
3738       </listitem>
3739
3740      </itemizedlist>
3741
3742     </sect4>
3743
3744     <sect4>
3745      <title><link linkend="SQL-CLUSTER"><command>CLUSTER</></link></title>
3746
3747      <itemizedlist>
3748
3749       <listitem>
3750        <para>
3751         Allow <command>CLUSTER</> to sort the table rather than scanning
3752         the index when it seems likely to be cheaper (Leonardo Francalanci)
3753        </para>
3754       </listitem>
3755
3756      </itemizedlist>
3757
3758     </sect4>
3759
3760     <sect4>
3761      <title>Indexes</title>
3762
3763      <itemizedlist>
3764
3765       <listitem>
3766        <para>
3767         Add nearest-neighbor (order-by-operator) searching to <link
3768         linkend="GiST"><acronym>GiST</> indexes</link> (Teodor Sigaev, Tom Lane)
3769        </para>
3770
3771        <para>
3772         This allows <acronym>GiST</> indexes to quickly return the
3773         <replaceable>N</> closest values in a query with <literal>LIMIT</>.
3774         For example
3775 <programlisting><![CDATA[
3776 SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10;
3777 ]]>
3778 </programlisting>
3779         finds the ten places closest to a given target point.
3780        </para>
3781       </listitem>
3782
3783       <listitem>
3784        <para>
3785         Allow <link linkend="GIN"><acronym>GIN</> indexes</link> to index null
3786         and empty values (Tom Lane)
3787        </para>
3788
3789        <para>
3790         This allows full <acronym>GIN</> index scans, and fixes various
3791         corner cases in which GIN scans would fail.
3792        </para>
3793       </listitem>
3794
3795       <listitem>
3796        <para>
3797         Allow <link linkend="GIN"><acronym>GIN</> indexes</link> to
3798         better recognize duplicate search entries (Tom Lane)
3799        </para>
3800
3801        <para>
3802         This reduces the cost of index scans, especially in cases where
3803         it avoids unnecessary full index scans.
3804        </para>
3805       </listitem>
3806
3807       <listitem>
3808        <para>
3809         Fix <link linkend="GiST"><acronym>GiST</> indexes</link> to be fully
3810         crash-safe (Heikki Linnakangas)
3811        </para>
3812
3813        <para>
3814         Previously there were rare cases where a <command>REINDEX</>
3815         would be required (you would be informed).
3816        </para>
3817       </listitem>
3818
3819      </itemizedlist>
3820
3821     </sect4>
3822
3823    </sect3>
3824
3825    <sect3>
3826     <title>Data Types</title>
3827
3828     <itemizedlist>
3829
3830      <listitem>
3831       <para>
3832        Allow <type>numeric</> to use a more compact, two-byte header
3833        in common cases (Robert Haas)
3834       </para>
3835
3836       <para>
3837        Previously all <type>numeric</> values had four-byte headers;
3838        this change saves on disk storage.
3839       </para>
3840      </listitem>
3841
3842      <listitem>
3843       <para>
3844         Add support for dividing <type>money</> by <type>money</>
3845         (Andy Balholm)
3846       </para>
3847      </listitem>
3848
3849      <listitem>
3850       <para>
3851        Allow binary I/O on type <type>void</type> (Radoslaw Smogura)
3852       </para>
3853      </listitem>
3854
3855      <listitem>
3856       <para>
3857        Improve hypotenuse calculations for geometric operators (Paul Matthews)
3858       </para>
3859
3860       <para>
3861        This avoids unnecessary overflows, and may also be more accurate.
3862       </para>
3863      </listitem>
3864
3865      <listitem>
3866       <para>
3867        Support hashing array values (Tom Lane)
3868       </para>
3869
3870       <para>
3871        This provides additional query optimization possibilities.
3872       </para>
3873      </listitem>
3874
3875      <listitem>
3876       <para>
3877        Don't treat a composite type as sortable unless all its column types
3878        are sortable (Tom Lane)
3879       </para>
3880
3881       <para>
3882        This avoids possible <quote>could not identify a comparison function</>
3883        failures at runtime, if it is possible to implement the query without
3884        sorting.  Also, <command>ANALYZE</> won't try to use inappropriate
3885        statistics-gathering methods for columns of such composite types.
3886       </para>
3887      </listitem>
3888
3889     </itemizedlist>
3890
3891     <sect4>
3892      <title>Casting</title>
3893
3894      <itemizedlist>
3895
3896      <listitem>
3897       <para>
3898         Add support for casting between <type>money</> and <type>numeric</>
3899         (Andy Balholm)
3900       </para>
3901      </listitem>
3902
3903      <listitem>
3904       <para>
3905        Add support for casting from <type>int4</> and <type>int8</>
3906        to <type>money</> (Joey Adams)
3907       </para>
3908      </listitem>
3909
3910       <listitem>
3911        <para>
3912         Allow casting a table's row type to the table's supertype if
3913         it's a typed table (Peter Eisentraut)
3914        </para>
3915
3916        <para>
3917         This is analogous to the existing facility that allows casting a row
3918         type to a supertable's row type.
3919        </para>
3920       </listitem>
3921
3922      </itemizedlist>
3923
3924     </sect4>
3925
3926     <sect4>
3927      <title><link linkend="functions-xml"><acronym>XML</></link></title>
3928
3929      <itemizedlist>
3930
3931       <listitem>
3932        <para>
3933         Add <acronym>XML</> function <link
3934         linkend="xml-exists"><literal>XMLEXISTS</></link> and <link
3935         linkend="xml-exists"><function>xpath_exists()</></link>
3936         functions (Mike Fowler)
3937        </para>
3938
3939        <para>
3940         These are used for XPath matching.
3941        </para>
3942       </listitem>
3943
3944       <listitem>
3945        <para>
3946         Add <acronym>XML</> functions <link
3947         linkend="xml-is-well-formed"><function>xml_is_well_formed()</></link>,
3948         <link
3949         linkend="xml-is-well-formed"><function>xml_is_well_formed_document()</></link>,
3950         <link
3951         linkend="xml-is-well-formed"><function>xml_is_well_formed_content()</></link>
3952         (Mike Fowler)
3953        </para>
3954
3955        <para>
3956         These check whether the input is properly-formed <acronym>XML</>.
3957         They provide functionality that was previously available only in
3958         the deprecated <filename>contrib/xml2</filename> module.
3959        </para>
3960       </listitem>
3961
3962      </itemizedlist>
3963
3964     </sect4>
3965
3966    </sect3>
3967
3968    <sect3>
3969     <title>Functions</title>
3970
3971      <itemizedlist>
3972
3973       <listitem>
3974        <para>
3975         Add SQL function <link
3976         linkend="format"><function>format(text, ...)</></link>, which
3977         behaves analogously to C's <function>printf()</> (Pavel Stehule,
3978         Robert Haas)
3979        </para>
3980
3981        <para>
3982         It currently supports formats for strings, SQL literals, and
3983         SQL identifiers.
3984        </para>
3985       </listitem>
3986
3987       <listitem>
3988        <para>
3989         Add string functions <link
3990         linkend="functions-string-other"><function>concat()</></link>,
3991         <link
3992         linkend="functions-string-other"><function>concat_ws()</></link>,
3993         <link linkend="functions-string-other"><function>left()</></link>,
3994         <link linkend="functions-string-other"><function>right()</></link>,
3995         and <link
3996         linkend="functions-string-other"><function>reverse()</></link>
3997         (Pavel Stehule)
3998        </para>
3999
4000        <para>
4001         These improve compatibility with other database products.
4002        </para>
4003       </listitem>
4004
4005       <listitem>
4006        <para>
4007          Add function <link
4008          linkend="functions-admin-genfile"><function>pg_read_binary_file()</></link>
4009          to read binary files (Dimitri Fontaine, Itagaki Takahiro)
4010        </para>
4011       </listitem>
4012
4013       <listitem>
4014        <para>
4015          Add a single-parameter version of function <link
4016          linkend="functions-admin-genfile"><function>pg_read_file()</></link>
4017          to read an entire file (Dimitri Fontaine, Itagaki Takahiro)
4018        </para>
4019       </listitem>
4020
4021       <listitem>
4022        <para>
4023          Add three-parameter forms of <link
4024          linkend="array-functions-table"><function>array_to_string()</></link>
4025          and <link
4026          linkend="array-functions-table"><function>string_to_array()</></link>
4027          for null value processing control (Pavel Stehule)
4028        </para>
4029       </listitem>
4030
4031      </itemizedlist>
4032
4033     <sect4>
4034      <title>Object Information Functions</title>
4035
4036      <itemizedlist>
4037
4038       <listitem>
4039        <para>
4040         Add the <link
4041         linkend="functions-info-catalog-table"><function>pg_describe_object()</></link>
4042         function (Alvaro Herrera)
4043        </para>
4044
4045        <para>
4046         This function is used to obtain a human-readable string describing
4047         an object, based on the <link
4048         linkend="catalog-pg-class"><structname>pg_class</structname></link>
4049         OID, object OID, and sub-object ID.  It can be used to help
4050         interpret the contents of <link
4051         linkend="catalog-pg-depend"><structname>pg_depend</structname></link>.
4052        </para>
4053       </listitem>
4054
4055       <listitem>
4056        <para>
4057          Update comments for built-in operators and their underlying
4058          functions (Tom Lane)
4059        </para>
4060
4061        <para>
4062         Functions that are meant to be used via an associated operator
4063         are now commented as such.
4064        </para>
4065       </listitem>
4066
4067       <listitem>
4068        <para>
4069         Add variable <link
4070         linkend="guc-quote-all-identifiers"><varname>quote_all_identifiers</></link>
4071         to force the quoting of all identifiers in <command>EXPLAIN</>
4072         and in system catalog functions like <link
4073         linkend="functions-info-catalog-table"><function>pg_get_viewdef()</></link>
4074         (Robert Haas)
4075        </para>
4076
4077        <para>
4078         This makes exporting schemas to tools and other databases with
4079         different quoting rules easier.
4080        </para>
4081       </listitem>
4082
4083       <listitem>
4084        <para>
4085         Add columns to the <link
4086         linkend="infoschema-sequences"><structname>information_schema.sequences</></link>
4087         system view (Peter Eisentraut)
4088        </para>
4089
4090        <para>
4091         Previously, though the view existed, the columns about the
4092         sequence parameters were unimplemented.
4093        </para>
4094       </listitem>
4095
4096       <listitem>
4097        <para>
4098         Allow <literal>public</> as a pseudo-role name in <link
4099         linkend="functions-info-access-table"><function>has_table_privilege()</></link>
4100         and related functions (Alvaro Herrera)
4101        </para>
4102
4103        <para>
4104         This allows checking for public permissions.
4105        </para>
4106       </listitem>
4107
4108      </itemizedlist>
4109
4110     </sect4>
4111
4112     <sect4>
4113      <title>Function and Trigger Creation</title>
4114
4115      <itemizedlist>
4116
4117       <listitem>
4118        <para>
4119         Support <link linkend="SQL-CREATETRIGGER"><literal>INSTEAD
4120         OF</></link> triggers on views (Dean Rasheed)
4121        </para>
4122
4123        <para>
4124         This feature can be used to implement fully updatable views.
4125        </para>
4126       </listitem>
4127
4128      </itemizedlist>
4129
4130     </sect4>
4131
4132    </sect3>
4133
4134    <sect3>
4135     <title>Server-Side Languages</title>
4136
4137     <sect4>
4138      <title><link linkend="plpgsql">PL/pgSQL</link> Server-Side Language</title>
4139
4140      <itemizedlist>
4141
4142       <listitem>
4143        <para>
4144         Add <link linkend="plpgsql-foreach-array"><command>FOREACH IN
4145         ARRAY</></link> to PL/pgSQL
4146         (Pavel Stehule)
4147        </para>
4148
4149        <para>
4150         This is more efficient and readable than previous methods of
4151         iterating through the elements of an array value.
4152        </para>
4153       </listitem>
4154
4155       <listitem>
4156        <para>
4157         Allow <command>RAISE</command> without parameters to be caught in
4158         the same places that could catch a <command>RAISE ERROR</command>
4159         from the same location (Piyush Newe)
4160        </para>
4161
4162        <para>
4163         The previous coding threw the error
4164         from the block containing the active exception handler.
4165         The new behavior is more consistent with other DBMS products.
4166        </para>
4167       </listitem>
4168
4169     </itemizedlist>
4170
4171     </sect4>
4172
4173     <sect4>
4174      <title><link linkend="plperl">PL/Perl</link> Server-Side Language</title>
4175
4176      <itemizedlist>
4177
4178       <listitem>
4179        <para>
4180         Allow generic record arguments to PL/Perl functions (Andrew
4181         Dunstan)
4182        </para>
4183
4184        <para>
4185         PL/Perl functions can now be declared to accept type <type>record</>.
4186         The behavior is the same as for any named composite type.
4187        </para>
4188       </listitem>
4189
4190       <listitem>
4191        <para>
4192         Convert PL/Perl array arguments to Perl arrays (Alexey Klyukin,
4193         Alex Hunsaker)
4194        </para>
4195
4196        <para>
4197         String representations are still available.
4198        </para>
4199       </listitem>
4200
4201       <listitem>
4202        <para>
4203         Convert PL/Perl composite-type arguments to Perl hashes
4204         (Alexey Klyukin, Alex Hunsaker)
4205        </para>
4206
4207        <para>
4208         String representations are still available.
4209        </para>
4210       </listitem>
4211
4212      </itemizedlist>
4213
4214     </sect4>
4215
4216     <sect4>
4217      <title><link linkend="plpython">PL/Python</link> Server-Side Language</title>
4218
4219      <itemizedlist>
4220
4221       <listitem>
4222        <para>
4223         Add table function support for PL/Python (Jan Urbanski)
4224        </para>
4225
4226        <para>
4227         PL/Python can now return multiple <literal>OUT</> parameters
4228         and record sets.
4229        </para>
4230       </listitem>
4231
4232       <listitem>
4233        <para>
4234         Add a validator to PL/Python (Jan Urbanski)
4235        </para>
4236
4237        <para>
4238         This allows PL/Python functions to be syntax-checked at function
4239         creation time.
4240        </para>
4241       </listitem>
4242
4243       <listitem>
4244        <para>
4245         Allow exceptions for SQL queries in PL/Python (Jan Urbanski)
4246        </para>
4247
4248        <para>
4249         This allows access to SQL-generated exception error codes from
4250         PL/Python exception blocks.
4251        </para>
4252       </listitem>
4253
4254       <listitem>
4255        <para>
4256         Add explicit subtransactions to PL/Python (Jan Urbanski)
4257        </para>
4258       </listitem>
4259
4260       <listitem>
4261        <para>
4262         Add PL/Python functions for quoting strings (Jan Urbanski)
4263        </para>
4264
4265        <para>
4266         These functions are <link
4267         linkend="plpython-util"><literal>plpy.quote_ident</></link>,
4268         <link linkend="plpython-util"><literal>plpy.quote_literal</></link>,
4269         and <link
4270         linkend="plpython-util"><literal>plpy.quote_nullable</></link>.
4271        </para>
4272       </listitem>
4273
4274       <listitem>
4275        <para>
4276          Add traceback information to PL/Python errors (Jan Urbanski)
4277        </para>
4278       </listitem>
4279
4280       <listitem>
4281        <para>
4282          Report PL/Python errors from iterators with <literal>PLy_elog</> (Jan
4283          Urbanski)
4284        </para>
4285       </listitem>
4286
4287       <listitem>
4288        <para>
4289         Fix exception handling with Python 3 (Jan Urbanski)
4290        </para>
4291
4292        <para>
4293         Exception classes were previously not available in
4294         <literal>plpy</> under Python 3.
4295        </para>
4296       </listitem>
4297
4298      </itemizedlist>
4299
4300     </sect4>
4301
4302    </sect3>
4303
4304    <sect3>
4305     <title>Client Applications</title>
4306
4307     <itemizedlist>
4308
4309      <listitem>
4310       <para>
4311         Mark <link
4312         linkend="APP-CREATELANG"><application>createlang</></link>
4313         and <link linkend="APP-DROPLANG"><application>droplang</></link>
4314         as deprecated now that they just invoke extension commands (Tom
4315         Lane)
4316       </para>
4317      </listitem>
4318
4319     </itemizedlist>
4320
4321     <sect4>
4322      <title><link linkend="APP-PSQL"><application>psql</></link></title>
4323
4324      <itemizedlist>
4325
4326       <listitem>
4327        <para>
4328          Add <application>psql</> command <literal>\conninfo</>
4329          to show current connection information (David Christensen)
4330        </para>
4331       </listitem>
4332
4333       <listitem>
4334        <para>
4335          Add <application>psql</> command <literal>\sf</> to
4336          show a function's definition (Pavel Stehule)
4337        </para>
4338       </listitem>
4339
4340       <listitem>
4341        <para>
4342          Add <application>psql</> command <literal>\dL</> to list
4343          languages (Fernando Ike)
4344        </para>
4345       </listitem>
4346
4347       <listitem>
4348        <para>
4349         Add the <option>S</> (<quote>system</>) option to <application>psql</>'s
4350         <literal>\dn</> (list schemas) command (Tom Lane)
4351        </para>
4352
4353        <para>
4354         <literal>\dn</> without <literal>S</> now suppresses system
4355         schemas.
4356        </para>
4357       </listitem>
4358
4359       <listitem>
4360        <para>
4361         Allow <application>psql</>'s <literal>\e</> and <literal>\ef</>
4362         commands to accept a line number to be used to position the
4363         cursor in the editor (Pavel Stehule)
4364        </para>
4365
4366        <para>
4367         This is passed to the editor according to the
4368         <envar>PSQL_EDITOR_LINENUMBER_ARG</> environment variable.
4369        </para>
4370       </listitem>
4371
4372       <listitem>
4373        <para>
4374         Have <application>psql</> set the client encoding from the
4375         operating system locale by default (Heikki Linnakangas)
4376        </para>
4377
4378        <para>
4379         This only happens if the <envar>PGCLIENTENCODING</> environment
4380         variable is not set.
4381        </para>
4382       </listitem>
4383
4384       <listitem>
4385        <para>
4386         Make <literal>\d</literal> distinguish between unique
4387         indexes and unique constraints (Josh Kupershmidt)
4388        </para>
4389       </listitem>
4390
4391       <listitem>
4392        <para>
4393         Make <literal>\dt+</literal> report <function>pg_table_size</>
4394         instead of <function>pg_relation_size</> when talking to 9.0 or
4395         later servers (Bernd Helmle)
4396        </para>
4397
4398        <para>
4399         This is a more useful measure of table size, but note that it is
4400         not identical to what was previously reported in the same display.
4401        </para>
4402       </listitem>
4403
4404       <listitem>
4405        <para>
4406         Additional tab completion support (Itagaki Takahiro, Pavel Stehule,
4407         Andrey Popp, Christoph Berg, David Fetter, Josh Kupershmidt)
4408        </para>
4409       </listitem>
4410
4411      </itemizedlist>
4412
4413     </sect4>
4414
4415     <sect4>
4416      <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title>
4417
4418      <itemizedlist>
4419
4420       <listitem>
4421        <para>
4422          Add <link linkend="APP-PGDUMP"><application>pg_dump</></link>
4423          and <link
4424          linkend="APP-PG-DUMPALL"><application>pg_dumpall</></link>
4425          option <option>--quote-all-identifiers</> to force quoting
4426          of all identifiers (Robert Haas)
4427        </para>
4428       </listitem>
4429
4430       <listitem>
4431        <para>
4432         Add <literal>directory</> format to <application>pg_dump</>
4433         (Joachim Wieland, Heikki Linnakangas)
4434        </para>
4435
4436        <para>
4437         This is internally similar to the <literal>tar</>
4438         <application>pg_dump</> format.
4439        </para>
4440       </listitem>
4441
4442      </itemizedlist>
4443
4444     </sect4>
4445
4446     <sect4>
4447      <title><link linkend="APP-PG-CTL"><application>pg_ctl</></link></title>
4448
4449      <itemizedlist>
4450
4451       <listitem>
4452        <para>
4453         Fix <application>pg_ctl</>
4454         so it no longer incorrectly reports that the server is not
4455         running (Bruce Momjian)
4456        </para>
4457
4458        <para>
4459         Previously this could happen if the server was running but
4460         <application>pg_ctl</> could not authenticate.
4461        </para>
4462       </listitem>
4463
4464       <listitem>
4465        <para>
4466         Improve <application>pg_ctl</> start's <quote>wait</quote>
4467         (<option>-w</>) option (Bruce Momjian, Tom Lane)
4468        </para>
4469
4470        <para>
4471         The wait mode is now significantly more robust.  It will not get
4472         confused by non-default postmaster port numbers, non-default
4473         Unix-domain socket locations, permission problems, or stale
4474         postmaster lock files.
4475        </para>
4476       </listitem>
4477
4478       <listitem>
4479        <para>
4480          Add <literal>promote</> option to <application>pg_ctl</> to
4481          switch a standby server to primary (Fujii Masao)
4482        </para>
4483       </listitem>
4484
4485      </itemizedlist>
4486
4487     </sect4>
4488
4489    </sect3>
4490
4491    <sect3>
4492     <title><application>Development Tools</></title>
4493
4494     <sect4>
4495      <title><link linkend="libpq"><application>libpq</></link></title>
4496
4497      <itemizedlist>
4498
4499       <listitem>
4500        <para>
4501         Add a libpq connection option <link
4502         linkend="libpq-connect-client-encoding"><literal>client_encoding</></link>
4503         which behaves like the <envar>PGCLIENTENCODING</> environment
4504         variable (Heikki Linnakangas)
4505        </para>
4506
4507        <para>
4508         The value <literal>auto</> sets the client encoding based on
4509         the operating system locale.
4510        </para>
4511       </listitem>
4512
4513       <listitem>
4514        <para>
4515         Add <link
4516         linkend="libpq-pqlibversion"><function>PQlibVersion()</></link>
4517         function which returns the libpq library version (Magnus
4518         Hagander)
4519        </para>
4520
4521        <para>
4522         libpq already had <function>PQserverVersion()</> which returns
4523         the server version.
4524        </para>
4525       </listitem>
4526
4527       <listitem>
4528        <para>
4529         Allow libpq-using clients to
4530         check the user name of the server process
4531         when connecting via Unix-domain sockets, with the new <link
4532         linkend="libpq-connect-requirepeer"><literal>requirepeer</></link>
4533         connection option
4534         (Peter Eisentraut)
4535        </para>
4536
4537        <para>
4538         <productname>PostgreSQL</> already allowed servers to check
4539         the client user name when connecting via Unix-domain sockets.
4540        </para>
4541       </listitem>
4542
4543       <listitem>
4544        <para>
4545         Add <link linkend="libpq-pqping"><function>PQping()</></link>
4546         and <link
4547         linkend="libpq-pqpingparams"><function>PQpingParams()</></link>
4548         to libpq (Bruce Momjian, Tom Lane)
4549        </para>
4550
4551        <para>
4552         These functions allow detection of the server's status without
4553         trying to open a new session.
4554        </para>
4555       </listitem>
4556
4557      </itemizedlist>
4558
4559     </sect4>
4560
4561     <sect4>
4562      <title><link linkend="ecpg"><application>ECPG</></link></title>
4563
4564      <itemizedlist>
4565
4566       <listitem>
4567        <para>
4568         Allow ECPG to accept dynamic cursor names even in
4569         <literal>WHERE CURRENT OF</literal> clauses
4570         (Zoltan Boszormenyi)
4571        </para>
4572       </listitem>
4573
4574       <listitem>
4575        <para>
4576         Make <application>ecpglib</> write <type>double</> values with a
4577         precision of 15 digits, not 14 as formerly (Akira Kurosawa)
4578        </para>
4579       </listitem>
4580
4581      </itemizedlist>
4582     </sect4>
4583
4584    </sect3>
4585
4586    <sect3>
4587     <title>Build Options</title>
4588
4589      <itemizedlist>
4590
4591       <listitem>
4592        <para>
4593         Use <literal>+Olibmerrno</> compile flag with HP-UX C compilers
4594         that accept it (Ibrar Ahmed)
4595        </para>
4596
4597        <para>
4598         This avoids possible misbehavior of math library calls on recent
4599         HP platforms.
4600        </para>
4601       </listitem>
4602
4603      </itemizedlist>
4604
4605     <sect4>
4606      <title>Makefiles</title>
4607
4608      <itemizedlist>
4609
4610       <listitem>
4611        <para>
4612         Improved parallel make support (Peter Eisentraut)
4613        </para>
4614
4615        <para>
4616         This allows for faster compiles.  Also, <literal>make -k</>
4617         now works more consistently.
4618        </para>
4619       </listitem>
4620
4621       <listitem>
4622        <para>
4623          Require <acronym>GNU</> <link
4624          linkend="install-requirements"><application>make</></link>
4625          3.80 or newer (Peter Eisentraut)
4626        </para>
4627
4628        <para>
4629         This is necessary because of the parallel-make improvements.
4630        </para>
4631       </listitem>
4632
4633       <listitem>
4634        <para>
4635         Add <literal>make maintainer-check</> target
4636         (Peter Eisentraut)
4637        </para>
4638
4639        <para>
4640         This target performs various source code checks that are not
4641         appropriate for either the build or the regression tests.  Currently:
4642         duplicate_oids, SGML syntax and tabs check, NLS syntax check.
4643        </para>
4644       </listitem>
4645
4646       <listitem>
4647        <para>
4648         Support <literal>make check</> in <filename>contrib</>
4649         (Peter Eisentraut)
4650        </para>
4651
4652        <para>
4653         Formerly only <literal>make installcheck</> worked, but now
4654         there is support for testing in a temporary installation.
4655         The top-level <literal>make check-world</> target now includes
4656         testing <filename>contrib</> this way.
4657        </para>
4658       </listitem>
4659
4660      </itemizedlist>
4661
4662     </sect4>
4663
4664     <sect4>
4665      <title>Windows</title>
4666
4667      <itemizedlist>
4668
4669       <listitem>
4670        <para>
4671          On Windows, allow <link
4672          linkend="app-pg-ctl"><application>pg_ctl</></link> to register
4673          the service as auto-start or start-on-demand (Quan Zongliang)
4674        </para>
4675       </listitem>
4676
4677       <listitem>
4678        <para>
4679         Add support for collecting <link linkend="windows-crash-dumps">crash
4680         dumps</link> on Windows (Craig Ringer, Magnus Hagander)
4681        </para>
4682
4683        <para>
4684         <productname>minidumps</> can now be generated by non-debug
4685         Windows binaries and analyzed by standard debugging tools.
4686        </para>
4687       </listitem>
4688
4689       <listitem>
4690        <para>
4691         Enable building with the MinGW64 compiler (Andrew Dunstan)
4692        </para>
4693
4694        <para>
4695         This allows building 64-bit Windows binaries even on non-Windows
4696         platforms via cross-compiling.
4697        </para>
4698       </listitem>
4699
4700      </itemizedlist>
4701
4702     </sect4>
4703
4704    </sect3>
4705
4706    <sect3>
4707     <title>Source Code</title>
4708
4709      <itemizedlist>
4710
4711       <listitem>
4712        <para>
4713         Revise the API for GUC variable assign hooks (Tom Lane)
4714        </para>
4715
4716        <para>
4717         The previous functions of assign hooks are now split between check
4718         hooks and assign hooks, where the former can fail but the latter
4719         shouldn't.  This change will impact add-on modules that define custom
4720         GUC parameters.
4721        </para>
4722       </listitem>
4723
4724       <listitem>
4725        <para>
4726         Add latches to the source code to support waiting for events (Heikki
4727         Linnakangas)
4728        </para>
4729       </listitem>
4730
4731       <listitem>
4732        <para>
4733          Centralize data modification permissions-checking logic
4734          (KaiGai Kohei)
4735        </para>
4736       </listitem>
4737
4738       <listitem>
4739        <para>
4740          Add missing <function>get_<replaceable>object</>_oid()</function> functions, for consistency
4741          (Robert Haas)
4742        </para>
4743       </listitem>
4744
4745       <listitem>
4746        <para>
4747          Improve ability to use C++ compilers for <link
4748          linkend="xfunc-c">compiling add-on modules</link> by removing
4749          conflicting key words (Tom Lane)
4750        </para>
4751       </listitem>
4752
4753       <listitem>
4754        <para>
4755          Add support for DragonFly <acronym>BSD</> (Rumko)
4756        </para>
4757       </listitem>
4758
4759       <listitem>
4760        <para>
4761          Expose <function>quote_literal_cstr()</> for backend use
4762          (Robert Haas)
4763        </para>
4764       </listitem>
4765
4766       <listitem>
4767        <para>
4768         Run <link linkend="build">regression tests</link> in the
4769         default encoding (Peter Eisentraut)
4770        </para>
4771
4772        <para>
4773         Regression tests were previously always run with
4774         <literal>SQL_ASCII</> encoding.
4775        </para>
4776       </listitem>
4777
4778       <listitem>
4779        <para>
4780          Add <application>src/tools/git_changelog</> to replace
4781          <application>cvs2cl</> and <application>pgcvslog</> (Robert
4782          Haas, Tom Lane)
4783        </para>
4784       </listitem>
4785
4786       <listitem>
4787        <para>
4788         Add <application>git-external-diff</> script to
4789         <filename>src/tools</> (Bruce Momjian)
4790        </para>
4791
4792        <para>
4793         This is used to generate context diffs from git.
4794        </para>
4795       </listitem>
4796
4797       <listitem>
4798        <para>
4799          Improve support for building with
4800          <application>Clang</application> (Peter Eisentraut)
4801        </para>
4802       </listitem>
4803
4804      </itemizedlist>
4805
4806     <sect4>
4807      <title>Server Hooks</title>
4808
4809      <itemizedlist>
4810
4811       <listitem>
4812        <para>
4813          Add source code hooks to check permissions (Robert Haas,
4814          Stephen Frost)
4815        </para>
4816       </listitem>
4817
4818       <listitem>
4819        <para>
4820          Add post-object-creation function hooks for use by security
4821          frameworks (KaiGai Kohei)
4822        </para>
4823       </listitem>
4824
4825       <listitem>
4826        <para>
4827          Add a client authentication hook (KaiGai Kohei)
4828        </para>
4829       </listitem>
4830
4831      </itemizedlist>
4832
4833     </sect4>
4834
4835    </sect3>
4836
4837    <sect3>
4838     <title>Contrib</title>
4839
4840     <itemizedlist>
4841
4842      <listitem>
4843       <para>
4844        Modify <filename>contrib</> modules and procedural
4845        languages to install via the new <link
4846        linkend="extend-extensions">extension</link> mechanism (Tom Lane,
4847        Dimitri Fontaine)
4848       </para>
4849      </listitem>
4850
4851      <listitem>
4852       <para>
4853        Add <link linkend="file-fdw"><filename>contrib/file_fdw</></link>
4854        foreign-data wrapper (Shigeru Hanada)
4855       </para>
4856
4857       <para>
4858        Foreign tables using this foreign data wrapper can read flat files
4859        in a manner very similar to <command>COPY</>.
4860       </para>
4861      </listitem>
4862
4863      <listitem>
4864       <para>
4865         Add nearest-neighbor search support to <link
4866         linkend="pgtrgm"><filename>contrib/pg_trgm</></link> and <link
4867         linkend="btree-gist"><filename>contrib/btree_gist</></link>
4868         (Teodor Sigaev)
4869       </para>
4870      </listitem>
4871
4872      <listitem>
4873       <para>
4874         Add <link
4875         linkend="btree-gist"><filename>contrib/btree_gist</></link>
4876         support for searching on not-equals (Jeff Davis)
4877       </para>
4878      </listitem>
4879
4880      <listitem>
4881       <para>
4882         Fix <link
4883         linkend="fuzzystrmatch"><filename>contrib/fuzzystrmatch</></link>'s
4884         <function>levenshtein()</> function to handle multibyte characters
4885         (Alexander Korotkov)
4886       </para>
4887      </listitem>
4888
4889      <listitem>
4890       <para>
4891         Add <function>ssl_cipher()</> and <function>ssl_version()</>
4892         functions to <link
4893         linkend="sslinfo"><filename>contrib/sslinfo</></link> (Robert
4894         Haas)
4895       </para>
4896      </listitem>
4897
4898      <listitem>
4899       <para>
4900        Fix <link linkend="intarray"><filename>contrib/intarray</></link>
4901        and <link linkend="hstore"><filename>contrib/hstore</></link>
4902        to give consistent results with indexed empty arrays (Tom Lane)
4903       </para>
4904
4905       <para>
4906        Previously an empty-array query that used an index might return
4907        different results from one that used a sequential scan.
4908       </para>
4909      </listitem>
4910
4911      <listitem>
4912       <para>
4913        Allow <link linkend="intarray"><filename>contrib/intarray</></link>
4914        to work properly on multidimensional arrays (Tom Lane)
4915       </para>
4916      </listitem>
4917
4918      <listitem>
4919       <para>
4920        In
4921        <link linkend="intarray"><filename>contrib/intarray</></link>,
4922        avoid errors complaining about the presence of nulls in cases where no
4923        nulls are actually present (Tom Lane)
4924       </para>
4925      </listitem>
4926
4927      <listitem>
4928       <para>
4929        In
4930        <link linkend="intarray"><filename>contrib/intarray</></link>,
4931        fix behavior of containment operators with respect to empty arrays
4932        (Tom Lane)
4933       </para>
4934
4935       <para>
4936        Empty arrays are now correctly considered to be contained in any other
4937        array.
4938       </para>
4939      </listitem>
4940
4941      <listitem>
4942       <para>
4943        Remove <link linkend="xml2"><filename>contrib/xml2</></link>'s
4944        arbitrary limit on the number of
4945        <replaceable>parameter</>=<replaceable>value</> pairs that can be
4946        handled by <function>xslt_process()</> (Pavel Stehule)
4947       </para>
4948
4949       <para>
4950        The previous limit was 10.
4951       </para>
4952      </listitem>
4953
4954      <listitem>
4955       <para>
4956        In <link linkend="pageinspect"><filename>contrib/pageinspect</></link>,
4957        fix heap_page_item to return infomasks as 32-bit values (Alvaro Herrera)
4958       </para>
4959
4960       <para>
4961        This avoids returning negative values, which was confusing.  The
4962        underlying value is a 16-bit unsigned integer.
4963       </para>
4964      </listitem>
4965
4966     </itemizedlist>
4967
4968     <sect4>
4969      <title>Security</title>
4970
4971      <itemizedlist>
4972
4973       <listitem>
4974        <para>
4975         Add <link linkend="sepgsql"><filename>contrib/sepgsql</></link>
4976         to interface permission checks with <acronym>SELinux</> (KaiGai Kohei)
4977        </para>
4978
4979        <para>
4980         This uses the new <link
4981         linkend="SQL-SECURITY-LABEL"><command>SECURITY LABEL</></link>
4982         facility.
4983        </para>
4984       </listitem>
4985
4986       <listitem>
4987        <para>
4988         Add contrib module <link
4989         linkend="auth-delay"><filename>auth_delay</></link> (KaiGai
4990         Kohei)
4991        </para>
4992
4993        <para>
4994         This causes the server to pause before returning authentication
4995         failure;  it is designed to make brute force password attacks
4996         more difficult.
4997        </para>
4998       </listitem>
4999
5000       <listitem>
5001        <para>
5002         Add <link linkend="dummy-seclabel"><filename>dummy_seclabel</></link>
5003         contrib module (KaiGai Kohei)
5004        </para>
5005
5006        <para>
5007         This is used for permission regression testing.
5008        </para>
5009       </listitem>
5010
5011      </itemizedlist>
5012
5013     </sect4>
5014
5015     <sect4>
5016      <title>Performance</title>
5017
5018      <itemizedlist>
5019
5020       <listitem>
5021        <para>
5022          Add support for <literal>LIKE</> and <literal>ILIKE</> index
5023          searches to <link
5024          linkend="pgtrgm"><filename>contrib/pg_trgm</></link> (Alexander
5025          Korotkov)
5026        </para>
5027       </listitem>
5028
5029       <listitem>
5030        <para>
5031          Add <function>levenshtein_less_equal()</> function to <link
5032          linkend="fuzzystrmatch"><filename>contrib/fuzzystrmatch</></link>,
5033          which is optimized for small distances (Alexander Korotkov)
5034        </para>
5035       </listitem>
5036
5037       <listitem>
5038        <para>
5039         Improve performance of index lookups on <link
5040         linkend="seg"><filename>contrib/seg</></link> columns (Alexander
5041         Korotkov)
5042        </para>
5043       </listitem>
5044
5045       <listitem>
5046        <para>
5047          Improve performance of <link
5048          linkend="pgupgrade"><application>pg_upgrade</></link> for
5049          databases with many relations (Bruce Momjian)
5050        </para>
5051       </listitem>
5052
5053       <listitem>
5054        <para>
5055          Add flag to <link
5056          linkend="pgbench"><filename>contrib/pgbench</></link> to
5057          report per-statement latencies (Florian Pflug)
5058        </para>
5059       </listitem>
5060
5061      </itemizedlist>
5062
5063     </sect4>
5064
5065     <sect4>
5066      <title>Fsync Testing</title>
5067
5068      <itemizedlist>
5069
5070       <listitem>
5071        <para>
5072          Move <filename>src/tools/test_fsync</> to <link
5073          linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link>
5074          (Bruce Momjian, Tom Lane)
5075        </para>
5076       </listitem>
5077
5078       <listitem>
5079        <para>
5080         Add <literal>O_DIRECT</> support to <link
5081         linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link>
5082         (Bruce Momjian)
5083        </para>
5084
5085        <para>
5086         This matches the use of <literal>O_DIRECT</> by <link
5087         linkend="guc-wal-sync-method"><varname>wal_sync_method</></link>.
5088        </para>
5089       </listitem>
5090
5091       <listitem>
5092        <para>
5093          Add new tests to <link
5094          linkend="pgtestfsync"><filename>contrib/pg_test_fsync</></link>
5095          (Bruce Momjian)
5096        </para>
5097       </listitem>
5098
5099      </itemizedlist>
5100
5101     </sect4>
5102
5103    </sect3>
5104
5105    <sect3>
5106     <title>Documentation</title>
5107
5108     <itemizedlist>
5109
5110      <listitem>
5111       <para>
5112         Extensive <link linkend="ecpg"><application>ECPG</></link>
5113         documentation improvements (Satoshi Nagayasu)
5114       </para>
5115      </listitem>
5116
5117      <listitem>
5118       <para>
5119         Extensive proofreading and documentation improvements
5120         (Thom Brown, Josh Kupershmidt, Susanne Ebrecht)
5121       </para>
5122      </listitem>
5123
5124      <listitem>
5125       <para>
5126        Add documentation for <link
5127        linkend="guc-exit-on-error"><varname>exit_on_error</></link>
5128        (Robert Haas)
5129       </para>
5130
5131       <para>
5132        This parameter causes sessions to exit on any error.
5133       </para>
5134      </listitem>
5135
5136      <listitem>
5137       <para>
5138        Add documentation for <link
5139        linkend="functions-info-catalog-table"><function>pg_options_to_table()</></link>
5140        (Josh Berkus)
5141       </para>
5142
5143       <para>
5144        This function shows table storage options in a readable form.
5145       </para>
5146      </listitem>
5147
5148      <listitem>
5149       <para>
5150        Document that it is possible to access all composite type
5151        fields using <link
5152        linkend="field-selection"><literal>(compositeval).*</></link>
5153        syntax (Peter Eisentraut)
5154       </para>
5155      </listitem>
5156
5157      <listitem>
5158       <para>
5159        Document that <link
5160        linkend="functions-string-other"><function>translate()</></link>
5161        removes characters in <literal>from</> that don't have a
5162        corresponding <literal>to</> character (Josh Kupershmidt)
5163       </para>
5164      </listitem>
5165
5166      <listitem>
5167       <para>
5168        Merge documentation for <command>CREATE CONSTRAINT TRIGGER</> and <link
5169        linkend="SQL-CREATETRIGGER"><command>CREATE TRIGGER</></link>
5170        (Alvaro Herrera)
5171       </para>
5172      </listitem>
5173
5174      <listitem>
5175       <para>
5176        Centralize <link linkend="ddl-priv">permission</link> and <link
5177        linkend="upgrading">upgrade</link> documentation (Bruce Momjian)
5178       </para>
5179      </listitem>
5180
5181      <listitem>
5182       <para>
5183        Add <link linkend="sysvipc-parameters">kernel tuning
5184        documentation</link> for Solaris 10 (Josh Berkus)
5185       </para>
5186
5187       <para>
5188        Previously only Solaris 9 kernel tuning was documented.
5189       </para>
5190      </listitem>
5191
5192      <listitem>
5193       <para>
5194        Handle non-ASCII characters consistently in <filename>HISTORY</> file
5195        (Peter Eisentraut)
5196       </para>
5197
5198       <para>
5199        While the <filename>HISTORY</> file is in English, we do have to deal
5200        with non-ASCII letters in contributor names.  These are now
5201        transliterated so that they are reasonably legible without assumptions
5202        about character set.
5203       </para>
5204      </listitem>
5205
5206     </itemizedlist>
5207
5208    </sect3>
5209
5210   </sect2>
5211  </sect1>