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