]> granicus.if.org Git - postgresql/blob - doc/src/sgml/release-8.4.sgml
Update release notes for 9.2.3, 9.1.8, 9.0.12, 8.4.16, 8.3.23.
[postgresql] / doc / src / sgml / release-8.4.sgml
1 <!-- doc/src/sgml/release-8.4.sgml -->
2 <!-- See header comment in release.sgml about typical markup -->
3
4  <sect1 id="release-8-4-16">
5   <title>Release 8.4.16</title>
6
7   <note>
8   <title>Release Date</title>
9   <simpara>2013-02-07</simpara>
10   </note>
11
12   <para>
13    This release contains a variety of fixes from 8.4.15.
14    For information about new features in the 8.4 major release, see
15    <xref linkend="release-8-4">.
16   </para>
17
18   <sect2>
19    <title>Migration to Version 8.4.16</title>
20
21    <para>
22     A dump/restore is not required for those running 8.4.X.
23    </para>
24
25    <para>
26     However, if you are upgrading from a version earlier than 8.4.10,
27     see the release notes for 8.4.10.
28    </para>
29
30   </sect2>
31
32   <sect2>
33    <title>Changes</title>
34
35    <itemizedlist>
36
37     <listitem>
38      <para>
39       Update minimum recovery point when truncating a relation file (Heikki
40       Linnakangas)
41      </para>
42
43      <para>
44       Once data has been discarded, it's no longer safe to stop recovery at
45       an earlier point in the timeline.
46      </para>
47     </listitem>
48
49     <listitem>
50      <para>
51       Fix SQL grammar to allow subscripting or field selection from a
52       sub-SELECT result (Tom Lane)
53      </para>
54     </listitem>
55
56     <listitem>
57      <para>
58       Protect against race conditions when scanning
59       <structname>pg_tablespace</> (Stephen Frost, Tom Lane)
60      </para>
61
62      <para>
63       <command>CREATE DATABASE</> and <command>DROP DATABASE</> could
64       misbehave if there were concurrent updates of
65       <structname>pg_tablespace</> entries.
66      </para>
67     </listitem>
68
69     <listitem>
70      <para>
71       Prevent <command>DROP OWNED</> from trying to drop whole databases or
72       tablespaces (&Aacute;lvaro Herrera)
73      </para>
74
75      <para>
76       For safety, ownership of these objects must be reassigned, not dropped.
77      </para>
78     </listitem>
79
80     <listitem>
81      <para>
82       Fix error in <link
83       linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link>
84       implementation (Andres Freund)
85      </para>
86
87      <para>
88       The main consequence of this mistake is that lowering <link
89       linkend="guc-vacuum-freeze-min-age"><varname>vacuum_freeze_min_age</></link>
90       would cause full-table vacuuming scans to occur much more frequently
91       than intended.
92      </para>
93     </listitem>
94
95     <listitem>
96      <para>
97       Prevent misbehavior when a <symbol>RowExpr</> or <symbol>XmlExpr</>
98       is parse-analyzed twice (Andres Freund, Tom Lane)
99      </para>
100
101      <para>
102       This mistake could be user-visible in contexts such as
103       <literal>CREATE TABLE LIKE INCLUDING INDEXES</>.
104      </para>
105     </listitem>
106
107     <listitem>
108      <para>
109       Improve defenses against integer overflow in hashtable sizing
110       calculations (Jeff Davis)
111      </para>
112     </listitem>
113
114     <listitem>
115      <para>
116       Reject out-of-range dates in <function>to_date()</> (Hitoshi Harada)
117      </para>
118     </listitem>
119
120     <listitem>
121      <para>
122       Ensure that non-ASCII prompt strings are translated to the correct
123       code page on Windows (Alexander Law, Noah Misch)
124      </para>
125
126      <para>
127       This bug affected <application>psql</> and some other client programs.
128      </para>
129     </listitem>
130
131     <listitem>
132      <para>
133       Fix possible crash in <application>psql</>'s <command>\?</> command
134       when not connected to a database (Meng Qingzhong)
135      </para>
136     </listitem>
137
138     <listitem>
139      <para>
140       Fix one-byte buffer overrun in <application>libpq</>'s
141       <function>PQprintTuples</> (Xi Wang)
142      </para>
143
144      <para>
145       This ancient function is not used anywhere by
146       <productname>PostgreSQL</> itself, but it might still be used by some
147       client code.
148      </para>
149     </listitem>
150
151     <listitem>
152      <para>
153       Make <application>ecpglib</> use translated messages properly
154       (Chen Huajun)
155      </para>
156     </listitem>
157
158     <listitem>
159      <para>
160       Properly install <application>ecpg_compat</> and
161       <application>pgtypes</> libraries on MSVC (Jiang Guiqing)
162      </para>
163     </listitem>
164
165     <listitem>
166      <para>
167       Rearrange configure's tests for supplied functions so it is not
168       fooled by bogus exports from libedit/libreadline (Christoph Berg)
169      </para>
170     </listitem>
171
172     <listitem>
173      <para>
174       Ensure Windows build number increases over time (Magnus Hagander)
175      </para>
176     </listitem>
177
178     <listitem>
179      <para>
180       Make <application>pgxs</> build executables with the right
181       <literal>.exe</> suffix when cross-compiling for Windows
182       (Zoltan Boszormenyi)
183      </para>
184     </listitem>
185
186     <listitem>
187      <para>
188       Add new timezone abbreviation <literal>FET</> (Tom Lane)
189      </para>
190
191      <para>
192       This is now used in some eastern-European time zones.
193      </para>
194     </listitem>
195
196    </itemizedlist>
197
198   </sect2>
199  </sect1>
200
201  <sect1 id="release-8-4-15">
202   <title>Release 8.4.15</title>
203
204   <note>
205   <title>Release Date</title>
206   <simpara>2012-12-06</simpara>
207   </note>
208
209   <para>
210    This release contains a variety of fixes from 8.4.14.
211    For information about new features in the 8.4 major release, see
212    <xref linkend="release-8-4">.
213   </para>
214
215   <sect2>
216    <title>Migration to Version 8.4.15</title>
217
218    <para>
219     A dump/restore is not required for those running 8.4.X.
220    </para>
221
222    <para>
223     However, if you are upgrading from a version earlier than 8.4.10,
224     see the release notes for 8.4.10.
225    </para>
226
227   </sect2>
228
229   <sect2>
230    <title>Changes</title>
231
232    <itemizedlist>
233
234     <listitem>
235      <para>
236       Fix multiple bugs associated with <command>CREATE INDEX
237       CONCURRENTLY</> (Andres Freund, Tom Lane)
238      </para>
239
240      <para>
241       Fix <command>CREATE INDEX CONCURRENTLY</> to use
242       in-place updates when changing the state of an index's
243       <structname>pg_index</> row.  This prevents race conditions that could
244       cause concurrent sessions to miss updating the target index, thus
245       resulting in corrupt concurrently-created indexes.
246      </para>
247
248      <para>
249       Also, fix various other operations to ensure that they ignore
250       invalid indexes resulting from a failed <command>CREATE INDEX
251       CONCURRENTLY</> command.  The most important of these is
252       <command>VACUUM</>, because an auto-vacuum could easily be launched
253       on the table before corrective action can be taken to fix or remove
254       the invalid index.
255      </para>
256     </listitem>
257
258     <listitem>
259      <para>
260       Avoid corruption of internal hash tables when out of memory
261       (Hitoshi Harada)
262      </para>
263     </listitem>
264
265     <listitem>
266      <para>
267       Fix planning of non-strict equivalence clauses above outer joins
268       (Tom Lane)
269      </para>
270
271      <para>
272       The planner could derive incorrect constraints from a clause equating
273       a non-strict construct to something else, for example
274       <literal>WHERE COALESCE(foo, 0) = 0</>
275       when <literal>foo</> is coming from the nullable side of an outer join.
276      </para>
277     </listitem>
278
279     <listitem>
280      <para>
281       Improve planner's ability to prove exclusion constraints from
282       equivalence classes (Tom Lane)
283      </para>
284     </listitem>
285
286     <listitem>
287      <para>
288       Fix partial-row matching in hashed subplans to handle cross-type cases
289       correctly (Tom Lane)
290      </para>
291
292      <para>
293       This affects multicolumn <literal>NOT IN</> subplans, such as
294       <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</>
295       when for instance <literal>b</> and <literal>y</> are <type>int4</>
296       and <type>int8</> respectively.  This mistake led to wrong answers
297       or crashes depending on the specific datatypes involved.
298      </para>
299     </listitem>
300
301     <listitem>
302      <para>
303       Acquire buffer lock when re-fetching the old tuple for an
304       <literal>AFTER ROW UPDATE/DELETE</> trigger (Andres Freund)
305      </para>
306
307      <para>
308       In very unusual circumstances, this oversight could result in passing
309       incorrect data to the precheck logic for a foreign-key enforcement
310       trigger.  That could result in a crash, or in an incorrect decision
311       about whether to fire the trigger.
312      </para>
313     </listitem>
314
315     <listitem>
316      <para>
317       Fix <command>ALTER COLUMN TYPE</> to handle inherited check
318       constraints properly (Pavan Deolasee)
319      </para>
320
321      <para>
322       This worked correctly in pre-8.4 releases, and now works correctly
323       in 8.4 and later.
324      </para>
325     </listitem>
326
327     <listitem>
328      <para>
329       Fix <command>REASSIGN OWNED</> to handle grants on tablespaces
330       (&Aacute;lvaro Herrera)
331      </para>
332     </listitem>
333
334     <listitem>
335      <para>
336       Ignore incorrect <structname>pg_attribute</> entries for system
337       columns for views (Tom Lane)
338      </para>
339
340      <para>
341       Views do not have any system columns.  However, we forgot to
342       remove such entries when converting a table to a view.  That's fixed
343       properly for 9.3 and later, but in previous branches we need to defend
344       against existing mis-converted views.
345      </para>
346     </listitem>
347
348     <listitem>
349      <para>
350       Fix rule printing to dump <literal>INSERT INTO <replaceable>table</>
351       DEFAULT VALUES</literal> correctly (Tom Lane)
352      </para>
353     </listitem>
354
355     <listitem>
356      <para>
357       Guard against stack overflow when there are too many
358       <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> clauses
359       in a query (Tom Lane)
360      </para>
361     </listitem>
362
363     <listitem>
364      <para>
365       Prevent platform-dependent failures when dividing the minimum possible
366       integer value by -1 (Xi Wang, Tom Lane)
367      </para>
368     </listitem>
369
370     <listitem>
371      <para>
372       Fix possible access past end of string in date parsing
373       (Hitoshi Harada)
374      </para>
375     </listitem>
376
377     <listitem>
378      <para>
379       Produce an understandable error message if the length of the path name
380       for a Unix-domain socket exceeds the platform-specific limit
381       (Tom Lane, Andrew Dunstan)
382      </para>
383
384      <para>
385       Formerly, this would result in something quite unhelpful, such as
386       <quote>Non-recoverable failure in name resolution</>.
387      </para>
388     </listitem>
389
390     <listitem>
391      <para>
392       Fix memory leaks when sending composite column values to the client
393       (Tom Lane)
394      </para>
395     </listitem>
396
397     <listitem>
398      <para>
399       Make <application>pg_ctl</> more robust about reading the
400       <filename>postmaster.pid</> file (Heikki Linnakangas)
401      </para>
402
403      <para>
404       Fix race conditions and possible file descriptor leakage.
405      </para>
406     </listitem>
407
408     <listitem>
409      <para>
410       Fix possible crash in <application>psql</> if incorrectly-encoded data
411       is presented and the <varname>client_encoding</> setting is a
412       client-only encoding, such as SJIS (Jiang Guiqing)
413      </para>
414     </listitem>
415
416     <listitem>
417      <para>
418       Fix bugs in the <filename>restore.sql</> script emitted by
419       <application>pg_dump</> in <literal>tar</> output format (Tom Lane)
420      </para>
421
422      <para>
423       The script would fail outright on tables whose names include
424       upper-case characters.  Also, make the script capable of restoring
425       data in <option>--inserts</> mode as well as the regular COPY mode.
426      </para>
427     </listitem>
428
429     <listitem>
430      <para>
431       Fix <application>pg_restore</> to accept POSIX-conformant
432       <literal>tar</> files (Brian Weaver, Tom Lane)
433      </para>
434
435      <para>
436       The original coding of <application>pg_dump</>'s <literal>tar</>
437       output mode produced files that are not fully conformant with the
438       POSIX standard.  This has been corrected for version 9.3.  This
439       patch updates previous branches so that they will accept both the
440       incorrect and the corrected formats, in hopes of avoiding
441       compatibility problems when 9.3 comes out.
442      </para>
443     </listitem>
444
445     <listitem>
446      <para>
447       Fix <application>pg_resetxlog</> to locate <filename>postmaster.pid</>
448       correctly when given a relative path to the data directory (Tom Lane)
449      </para>
450
451      <para>
452       This mistake could lead to <application>pg_resetxlog</> not noticing
453       that there is an active postmaster using the data directory.
454      </para>
455     </listitem>
456
457     <listitem>
458      <para>
459       Fix <application>libpq</>'s <function>lo_import()</> and
460       <function>lo_export()</> functions to report file I/O errors properly
461       (Tom Lane)
462      </para>
463     </listitem>
464
465     <listitem>
466      <para>
467       Fix <application>ecpg</>'s processing of nested structure pointer
468       variables (Muhammad Usama)
469      </para>
470     </listitem>
471
472     <listitem>
473      <para>
474       Make <filename>contrib/pageinspect</>'s btree page inspection
475       functions take buffer locks while examining pages (Tom Lane)
476      </para>
477     </listitem>
478
479     <listitem>
480      <para>
481       Fix <application>pgxs</> support for building loadable modules on AIX
482       (Tom Lane)
483      </para>
484
485      <para>
486       Building modules outside the original source tree didn't work on AIX.
487      </para>
488     </listitem>
489
490     <listitem>
491      <para>
492       Update time zone data files to <application>tzdata</> release 2012j
493       for DST law changes in Cuba, Israel, Jordan, Libya, Palestine, Western
494       Samoa, and portions of Brazil.
495      </para>
496     </listitem>
497
498    </itemizedlist>
499
500   </sect2>
501  </sect1>
502
503  <sect1 id="release-8-4-14">
504   <title>Release 8.4.14</title>
505
506   <note>
507   <title>Release Date</title>
508   <simpara>2012-09-24</simpara>
509   </note>
510
511   <para>
512    This release contains a variety of fixes from 8.4.13.
513    For information about new features in the 8.4 major release, see
514    <xref linkend="release-8-4">.
515   </para>
516
517   <sect2>
518    <title>Migration to Version 8.4.14</title>
519
520    <para>
521     A dump/restore is not required for those running 8.4.X.
522    </para>
523
524    <para>
525     However, if you are upgrading from a version earlier than 8.4.10,
526     see the release notes for 8.4.10.
527    </para>
528
529   </sect2>
530
531   <sect2>
532    <title>Changes</title>
533
534    <itemizedlist>
535
536     <listitem>
537      <para>
538       Fix planner's assignment of executor parameters, and fix executor's
539       rescan logic for CTE plan nodes (Tom Lane)
540      </para>
541
542      <para>
543       These errors could result in wrong answers from queries that scan the
544       same <literal>WITH</> subquery multiple times.
545      </para>
546     </listitem>
547
548     <listitem>
549      <para>
550       Improve page-splitting decisions in GiST indexes (Alexander Korotkov,
551       Robert Haas, Tom Lane)
552      </para>
553
554      <para>
555       Multi-column GiST indexes might suffer unexpected bloat due to this
556       error.
557      </para>
558     </listitem>
559
560     <listitem>
561      <para>
562       Fix cascading privilege revoke to stop if privileges are still held
563       (Tom Lane)
564      </para>
565
566      <para>
567       If we revoke a grant option from some role <replaceable>X</>, but
568       <replaceable>X</> still holds that option via a grant from someone
569       else, we should not recursively revoke the corresponding privilege
570       from role(s) <replaceable>Y</> that <replaceable>X</> had granted it
571       to.
572      </para>
573     </listitem>
574
575     <listitem>
576      <para>
577       Fix handling of <literal>SIGFPE</> when PL/Perl is in use (Andres Freund)
578      </para>
579
580      <para>
581       Perl resets the process's <literal>SIGFPE</> handler to
582       <literal>SIG_IGN</>, which could result in crashes later on.  Restore
583       the normal Postgres signal handler after initializing PL/Perl.
584      </para>
585     </listitem>
586
587     <listitem>
588      <para>
589       Prevent PL/Perl from crashing if a recursive PL/Perl function is
590       redefined while being executed (Tom Lane)
591      </para>
592     </listitem>
593
594     <listitem>
595      <para>
596       Work around possible misoptimization in PL/Perl (Tom Lane)
597      </para>
598
599      <para>
600       Some Linux distributions contain an incorrect version of
601       <filename>pthread.h</> that results in incorrect compiled code in
602       PL/Perl, leading to crashes if a PL/Perl function calls another one
603       that throws an error.
604      </para>
605     </listitem>
606
607     <listitem>
608      <para>
609       Update time zone data files to <application>tzdata</> release 2012f
610       for DST law changes in Fiji
611      </para>
612     </listitem>
613
614    </itemizedlist>
615
616   </sect2>
617  </sect1>
618
619  <sect1 id="release-8-4-13">
620   <title>Release 8.4.13</title>
621
622   <note>
623   <title>Release Date</title>
624   <simpara>2012-08-17</simpara>
625   </note>
626
627   <para>
628    This release contains a variety of fixes from 8.4.12.
629    For information about new features in the 8.4 major release, see
630    <xref linkend="release-8-4">.
631   </para>
632
633   <sect2>
634    <title>Migration to Version 8.4.13</title>
635
636    <para>
637     A dump/restore is not required for those running 8.4.X.
638    </para>
639
640    <para>
641     However, if you are upgrading from a version earlier than 8.4.10,
642     see the release notes for 8.4.10.
643    </para>
644
645   </sect2>
646
647   <sect2>
648    <title>Changes</title>
649
650    <itemizedlist>
651
652     <listitem>
653      <para>
654       Prevent access to external files/URLs via XML entity references
655       (Noah Misch, Tom Lane)
656      </para>
657
658      <para>
659       <function>xml_parse()</> would attempt to fetch external files or
660       URLs as needed to resolve DTD and entity references in an XML value,
661       thus allowing unprivileged database users to attempt to fetch data
662       with the privileges of the database server.  While the external data
663       wouldn't get returned directly to the user, portions of it could be
664       exposed in error messages if the data didn't parse as valid XML; and
665       in any case the mere ability to check existence of a file might be
666       useful to an attacker.  (CVE-2012-3489)
667      </para>
668     </listitem>
669
670     <listitem>
671      <para>
672       Prevent access to external files/URLs via <filename>contrib/xml2</>'s
673       <function>xslt_process()</> (Peter Eisentraut)
674      </para>
675
676      <para>
677       <application>libxslt</> offers the ability to read and write both
678       files and URLs through stylesheet commands, thus allowing
679       unprivileged database users to both read and write data with the
680       privileges of the database server.  Disable that through proper use
681       of <application>libxslt</>'s security options.  (CVE-2012-3488)
682      </para>
683
684      <para>
685       Also, remove <function>xslt_process()</>'s ability to fetch documents
686       and stylesheets from external files/URLs.  While this was a
687       documented <quote>feature</>, it was long regarded as a bad idea.
688       The fix for CVE-2012-3489 broke that capability, and rather than
689       expend effort on trying to fix it, we're just going to summarily
690       remove it.
691      </para>
692     </listitem>
693
694     <listitem>
695      <para>
696       Prevent too-early recycling of btree index pages (Noah Misch)
697      </para>
698
699      <para>
700       When we allowed read-only transactions to skip assigning XIDs, we
701       introduced the possibility that a deleted btree page could be
702       recycled while a read-only transaction was still in flight to it.
703       This would result in incorrect index search results.  The probability
704       of such an error occurring in the field seems very low because of the
705       timing requirements, but nonetheless it should be fixed.
706      </para>
707     </listitem>
708
709     <listitem>
710      <para>
711       Fix crash-safety bug with newly-created-or-reset sequences (Tom Lane)
712      </para>
713
714      <para>
715       If <command>ALTER SEQUENCE</> was executed on a freshly created or
716       reset sequence, and then precisely one <function>nextval()</> call
717       was made on it, and then the server crashed, WAL replay would restore
718       the sequence to a state in which it appeared that no
719       <function>nextval()</> had been done, thus allowing the first
720       sequence value to be returned again by the next
721       <function>nextval()</> call.  In particular this could manifest for
722       <type>serial</> columns, since creation of a serial column's sequence
723       includes an <command>ALTER SEQUENCE OWNED BY</> step.
724      </para>
725     </listitem>
726
727     <listitem>
728      <para>
729       Ensure the <filename>backup_label</> file is fsync'd after
730       <function>pg_start_backup()</> (Dave Kerr)
731      </para>
732     </listitem>
733
734     <listitem>
735      <para>
736       Back-patch 9.1 improvement to compress the fsync request queue
737       (Robert Haas)
738      </para>
739
740      <para>
741       This improves performance during checkpoints.  The 9.1 change
742       has now seen enough field testing to seem safe to back-patch.
743      </para>
744     </listitem>
745
746     <listitem>
747      <para>
748       Only allow autovacuum to be auto-canceled by a directly blocked
749       process (Tom Lane)
750      </para>
751
752      <para>
753       The original coding could allow inconsistent behavior in some cases;
754       in particular, an autovacuum could get canceled after less than
755       <literal>deadlock_timeout</> grace period.
756      </para>
757     </listitem>
758
759     <listitem>
760      <para>
761       Improve logging of autovacuum cancels (Robert Haas)
762      </para>
763     </listitem>
764
765     <listitem>
766      <para>
767       Fix log collector so that <literal>log_truncate_on_rotation</> works
768       during the very first log rotation after server start (Tom Lane)
769      </para>
770     </listitem>
771
772     <listitem>
773      <para>
774       Fix <literal>WITH</> attached to a nested set operation
775       (<literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>)
776       (Tom Lane)
777      </para>
778     </listitem>
779
780     <listitem>
781      <para>
782       Ensure that a whole-row reference to a subquery doesn't include any
783       extra <literal>GROUP BY</> or <literal>ORDER BY</> columns (Tom Lane)
784      </para>
785     </listitem>
786
787     <listitem>
788      <para>
789       Disallow copying whole-row references in <literal>CHECK</>
790       constraints and index definitions during <command>CREATE TABLE</>
791       (Tom Lane)
792      </para>
793
794      <para>
795       This situation can arise in <command>CREATE TABLE</> with
796       <literal>LIKE</> or <literal>INHERITS</>.  The copied whole-row
797       variable was incorrectly labeled with the row type of the original
798       table not the new one.  Rejecting the case seems reasonable for
799       <literal>LIKE</>, since the row types might well diverge later.  For
800       <literal>INHERITS</> we should ideally allow it, with an implicit
801       coercion to the parent table's row type; but that will require more
802       work than seems safe to back-patch.
803      </para>
804     </listitem>
805
806     <listitem>
807      <para>
808       Fix memory leak in <literal>ARRAY(SELECT ...)</> subqueries (Heikki
809       Linnakangas, Tom Lane)
810      </para>
811     </listitem>
812
813     <listitem>
814      <para>
815       Fix extraction of common prefixes from regular expressions (Tom Lane)
816      </para>
817
818      <para>
819       The code could get confused by quantified parenthesized
820       subexpressions, such as <literal>^(foo)?bar</>.  This would lead to
821       incorrect index optimization of searches for such patterns.
822      </para>
823     </listitem>
824
825     <listitem>
826      <para>
827       Fix bugs with parsing signed
828       <replaceable>hh</><literal>:</><replaceable>mm</> and
829       <replaceable>hh</><literal>:</><replaceable>mm</><literal>:</><replaceable>ss</>
830       fields in <type>interval</> constants (Amit Kapila, Tom Lane)
831      </para>
832     </listitem>
833
834     <listitem>
835      <para>
836       Report errors properly in <filename>contrib/xml2</>'s
837       <function>xslt_process()</> (Tom Lane)
838      </para>
839     </listitem>
840
841     <listitem>
842      <para>
843       Update time zone data files to <application>tzdata</> release 2012e
844       for DST law changes in Morocco and Tokelau
845      </para>
846     </listitem>
847
848    </itemizedlist>
849
850   </sect2>
851  </sect1>
852
853  <sect1 id="release-8-4-12">
854   <title>Release 8.4.12</title>
855
856   <note>
857   <title>Release Date</title>
858   <simpara>2012-06-04</simpara>
859   </note>
860
861   <para>
862    This release contains a variety of fixes from 8.4.11.
863    For information about new features in the 8.4 major release, see
864    <xref linkend="release-8-4">.
865   </para>
866
867   <sect2>
868    <title>Migration to Version 8.4.12</title>
869
870    <para>
871     A dump/restore is not required for those running 8.4.X.
872    </para>
873
874    <para>
875     However, if you are upgrading from a version earlier than 8.4.10,
876     see the release notes for 8.4.10.
877    </para>
878
879   </sect2>
880
881   <sect2>
882    <title>Changes</title>
883
884    <itemizedlist>
885
886     <listitem>
887      <para>
888       Fix incorrect password transformation in
889       <filename>contrib/pgcrypto</>'s DES <function>crypt()</> function
890       (Solar Designer)
891      </para>
892
893      <para>
894       If a password string contained the byte value <literal>0x80</>, the
895       remainder of the password was ignored, causing the password to be much
896       weaker than it appeared.  With this fix, the rest of the string is
897       properly included in the DES hash.  Any stored password values that are
898       affected by this bug will thus no longer match, so the stored values may
899       need to be updated.  (CVE-2012-2143)
900      </para>
901     </listitem>
902
903     <listitem>
904      <para>
905       Ignore <literal>SECURITY DEFINER</> and <literal>SET</> attributes for
906       a procedural language's call handler (Tom Lane)
907      </para>
908
909      <para>
910       Applying such attributes to a call handler could crash the server.
911       (CVE-2012-2655)
912      </para>
913     </listitem>
914
915     <listitem>
916      <para>
917       Allow numeric timezone offsets in <type>timestamp</> input to be up to
918       16 hours away from UTC (Tom Lane)
919      </para>
920
921      <para>
922       Some historical time zones have offsets larger than 15 hours, the
923       previous limit.  This could result in dumped data values being rejected
924       during reload.
925      </para>
926     </listitem>
927
928     <listitem>
929      <para>
930       Fix timestamp conversion to cope when the given time is exactly the
931       last DST transition time for the current timezone (Tom Lane)
932      </para>
933
934      <para>
935       This oversight has been there a long time, but was not noticed
936       previously because most DST-using zones are presumed to have an
937       indefinite sequence of future DST transitions.
938      </para>
939     </listitem>
940
941     <listitem>
942      <para>
943       Fix <type>text</> to <type>name</> and <type>char</> to <type>name</>
944       casts to perform string truncation correctly in multibyte encodings
945       (Karl Schnaitter)
946      </para>
947     </listitem>
948
949     <listitem>
950      <para>
951       Fix memory copying bug in <function>to_tsquery()</> (Heikki Linnakangas)
952      </para>
953     </listitem>
954
955     <listitem>
956      <para>
957       Fix planner's handling of outer PlaceHolderVars within subqueries (Tom
958       Lane)
959      </para>
960
961      <para>
962       This bug concerns sub-SELECTs that reference variables coming from the
963       nullable side of an outer join of the surrounding query.
964       In 9.1, queries affected by this bug would fail with <quote>ERROR:
965       Upper-level PlaceHolderVar found where not expected</>.  But in 9.0 and
966       8.4, you'd silently get possibly-wrong answers, since the value
967       transmitted into the subquery wouldn't go to null when it should.
968      </para>
969     </listitem>
970
971     <listitem>
972      <para>
973       Fix slow session startup when <structname>pg_attribute</> is very large
974       (Tom Lane)
975      </para>
976
977      <para>
978       If <structname>pg_attribute</> exceeds one-fourth of
979       <varname>shared_buffers</>, cache rebuilding code that is sometimes
980       needed during session start would trigger the synchronized-scan logic,
981       causing it to take many times longer than normal.  The problem was
982       particularly acute if many new sessions were starting at once.
983      </para>
984     </listitem>
985
986     <listitem>
987      <para>
988       Ensure sequential scans check for query cancel reasonably often (Merlin
989       Moncure)
990      </para>
991
992      <para>
993       A scan encountering many consecutive pages that contain no live tuples
994       would not respond to interrupts meanwhile.
995      </para>
996     </listitem>
997
998     <listitem>
999      <para>
1000       Ensure the Windows implementation of <function>PGSemaphoreLock()</>
1001       clears <varname>ImmediateInterruptOK</> before returning (Tom Lane)
1002      </para>
1003
1004      <para>
1005       This oversight meant that a query-cancel interrupt received later
1006       in the same query could be accepted at an unsafe time, with
1007       unpredictable but not good consequences.
1008      </para>
1009     </listitem>
1010
1011     <listitem>
1012      <para>
1013       Show whole-row variables safely when printing views or rules
1014       (Abbas Butt, Tom Lane)
1015      </para>
1016
1017      <para>
1018       Corner cases involving ambiguous names (that is, the name could be
1019       either a table or column name of the query) were printed in an
1020       ambiguous way, risking that the view or rule would be interpreted
1021       differently after dump and reload.  Avoid the ambiguous case by
1022       attaching a no-op cast.
1023      </para>
1024     </listitem>
1025
1026     <listitem>
1027      <para>
1028       Fix <command>COPY FROM</> to properly handle null marker strings that
1029       correspond to invalid encoding (Tom Lane)
1030      </para>
1031
1032      <para>
1033       A null marker string such as <literal>E'\\0'</> should work, and did
1034       work in the past, but the case got broken in 8.4.
1035      </para>
1036     </listitem>
1037
1038     <listitem>
1039      <para>
1040       Ensure autovacuum worker processes perform stack depth checking
1041       properly (Heikki Linnakangas)
1042      </para>
1043
1044      <para>
1045       Previously, infinite recursion in a function invoked by
1046       auto-<command>ANALYZE</> could crash worker processes.
1047      </para>
1048     </listitem>
1049
1050     <listitem>
1051      <para>
1052       Fix logging collector to not lose log coherency under high load (Andrew
1053       Dunstan)
1054      </para>
1055
1056      <para>
1057       The collector previously could fail to reassemble large messages if it
1058       got too busy.
1059      </para>
1060     </listitem>
1061
1062     <listitem>
1063      <para>
1064       Fix logging collector to ensure it will restart file rotation
1065       after receiving <systemitem>SIGHUP</> (Tom Lane)
1066      </para>
1067     </listitem>
1068
1069     <listitem>
1070      <para>
1071       Fix WAL replay logic for GIN indexes to not fail if the index was
1072       subsequently dropped (Tom Lane)
1073      </para>
1074     </listitem>
1075
1076     <listitem>
1077      <para>
1078       Fix memory leak in PL/pgSQL's <command>RETURN NEXT</> command (Joe
1079       Conway)
1080      </para>
1081     </listitem>
1082
1083     <listitem>
1084      <para>
1085       Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target
1086       is the function's first variable (Tom Lane)
1087      </para>
1088     </listitem>
1089
1090     <listitem>
1091      <para>
1092       Fix potential access off the end of memory in <application>psql</>'s
1093       expanded display (<command>\x</>) mode (Peter Eisentraut)
1094      </para>
1095     </listitem>
1096
1097     <listitem>
1098      <para>
1099       Fix several performance problems in <application>pg_dump</> when
1100       the database contains many objects (Jeff Janes, Tom Lane)
1101      </para>
1102
1103      <para>
1104       <application>pg_dump</> could get very slow if the database contained
1105       many schemas, or if many objects are in dependency loops, or if there
1106       are many owned sequences.
1107      </para>
1108     </listitem>
1109
1110     <listitem>
1111      <para>
1112       Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak
1113       temporary database connections upon error (Tom Lane)
1114      </para>
1115     </listitem>
1116
1117     <listitem>
1118      <para>
1119       Fix <filename>contrib/dblink</> to report the correct connection name in
1120       error messages (Kyotaro Horiguchi)
1121      </para>
1122     </listitem>
1123
1124     <listitem>
1125      <para>
1126       Update time zone data files to <application>tzdata</> release 2012c
1127       for DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland
1128       Islands, Gaza, Haiti, Hebron, Morocco, Syria, and Tokelau Islands;
1129       also historical corrections for Canada.
1130      </para>
1131     </listitem>
1132
1133    </itemizedlist>
1134
1135   </sect2>
1136  </sect1>
1137
1138  <sect1 id="release-8-4-11">
1139   <title>Release 8.4.11</title>
1140
1141   <note>
1142   <title>Release Date</title>
1143   <simpara>2012-02-27</simpara>
1144   </note>
1145
1146   <para>
1147    This release contains a variety of fixes from 8.4.10.
1148    For information about new features in the 8.4 major release, see
1149    <xref linkend="release-8-4">.
1150   </para>
1151
1152   <sect2>
1153    <title>Migration to Version 8.4.11</title>
1154
1155    <para>
1156     A dump/restore is not required for those running 8.4.X.
1157    </para>
1158
1159    <para>
1160     However, if you are upgrading from a version earlier than 8.4.10,
1161     see the release notes for 8.4.10.
1162    </para>
1163
1164   </sect2>
1165
1166   <sect2>
1167    <title>Changes</title>
1168
1169    <itemizedlist>
1170
1171     <listitem>
1172      <para>
1173       Require execute permission on the trigger function for
1174       <command>CREATE TRIGGER</> (Robert Haas)
1175      </para>
1176
1177      <para>
1178       This missing check could allow another user to execute a trigger
1179       function with forged input data, by installing it on a table he owns.
1180       This is only of significance for trigger functions marked
1181       <literal>SECURITY DEFINER</>, since otherwise trigger functions run
1182       as the table owner anyway.  (CVE-2012-0866)
1183      </para>
1184     </listitem>
1185
1186     <listitem>
1187      <para>
1188       Remove arbitrary limitation on length of common name in SSL
1189       certificates (Heikki Linnakangas)
1190      </para>
1191
1192      <para>
1193       Both <application>libpq</> and the server truncated the common name
1194       extracted from an SSL certificate at 32 bytes.  Normally this would
1195       cause nothing worse than an unexpected verification failure, but there
1196       are some rather-implausible scenarios in which it might allow one
1197       certificate holder to impersonate another.  The victim would have to
1198       have a common name exactly 32 bytes long, and the attacker would have
1199       to persuade a trusted CA to issue a certificate in which the common
1200       name has that string as a prefix.  Impersonating a server would also
1201       require some additional exploit to redirect client connections.
1202       (CVE-2012-0867)
1203      </para>
1204     </listitem>
1205
1206     <listitem>
1207      <para>
1208       Convert newlines to spaces in names written in <application>pg_dump</>
1209       comments (Robert Haas)
1210      </para>
1211
1212      <para>
1213       <application>pg_dump</> was incautious about sanitizing object names
1214       that are emitted within SQL comments in its output script.  A name
1215       containing a newline would at least render the script syntactically
1216       incorrect.  Maliciously crafted object names could present a SQL
1217       injection risk when the script is reloaded.  (CVE-2012-0868)
1218      </para>
1219     </listitem>
1220
1221     <listitem>
1222      <para>
1223       Fix btree index corruption from insertions concurrent with vacuuming
1224       (Tom Lane)
1225      </para>
1226
1227      <para>
1228       An index page split caused by an insertion could sometimes cause a
1229       concurrently-running <command>VACUUM</> to miss removing index entries
1230       that it should remove.  After the corresponding table rows are removed,
1231       the dangling index entries would cause errors (such as <quote>could not
1232       read block N in file ...</>) or worse, silently wrong query results
1233       after unrelated rows are re-inserted at the now-free table locations.
1234       This bug has been present since release 8.2, but occurs so infrequently
1235       that it was not diagnosed until now.  If you have reason to suspect
1236       that it has happened in your database, reindexing the affected index
1237       will fix things.
1238      </para>
1239     </listitem>
1240
1241     <listitem>
1242      <para>
1243       Update per-column permissions, not only per-table permissions, when
1244       changing table owner (Tom Lane)
1245      </para>
1246
1247      <para>
1248       Failure to do this meant that any previously granted column permissions
1249       were still shown as having been granted by the old owner.  This meant
1250       that neither the new owner nor a superuser could revoke the
1251       now-untraceable-to-table-owner permissions.
1252      </para>
1253     </listitem>
1254
1255     <listitem>
1256      <para>
1257       Allow non-existent values for some settings in <command>ALTER
1258       USER/DATABASE SET</> (Heikki Linnakangas)
1259      </para>
1260
1261      <para>
1262       Allow <varname>default_text_search_config</>,
1263       <varname>default_tablespace</>, and <varname>temp_tablespaces</> to be
1264       set to names that are not known.  This is because they might be known
1265       in another database where the setting is intended to be used, or for the
1266       tablespace cases because the tablespace might not be created yet.  The
1267       same issue was previously recognized for <varname>search_path</>, and
1268       these settings now act like that one.
1269      </para>
1270     </listitem>
1271
1272     <listitem>
1273      <para>
1274       Avoid crashing when we have problems deleting table files post-commit
1275       (Tom Lane)
1276      </para>
1277
1278      <para>
1279       Dropping a table should lead to deleting the underlying disk files only
1280       after the transaction commits.  In event of failure then (for instance,
1281       because of wrong file permissions) the code is supposed to just emit a
1282       warning message and go on, since it's too late to abort the
1283       transaction.  This logic got broken as of release 8.4, causing such
1284       situations to result in a PANIC and an unrestartable database.
1285      </para>
1286     </listitem>
1287
1288     <listitem>
1289      <para>
1290       Track the OID counter correctly during WAL replay, even when it wraps
1291       around (Tom Lane)
1292      </para>
1293
1294      <para>
1295       Previously the OID counter would remain stuck at a high value until the
1296       system exited replay mode.  The practical consequences of that are
1297       usually nil, but there are scenarios wherein a standby server that's
1298       been promoted to master might take a long time to advance the OID
1299       counter to a reasonable value once values are needed.
1300      </para>
1301     </listitem>
1302
1303     <listitem>
1304      <para>
1305       Fix regular expression back-references with <literal>*</> attached
1306       (Tom Lane)
1307      </para>
1308
1309      <para>
1310       Rather than enforcing an exact string match, the code would effectively
1311       accept any string that satisfies the pattern sub-expression referenced
1312       by the back-reference symbol.
1313      </para>
1314
1315      <para>
1316       A similar problem still afflicts back-references that are embedded in a
1317       larger quantified expression, rather than being the immediate subject
1318       of the quantifier.  This will be addressed in a future
1319       <productname>PostgreSQL</> release.
1320      </para>
1321     </listitem>
1322
1323     <listitem>
1324      <para>
1325       Fix recently-introduced memory leak in processing of
1326       <type>inet</>/<type>cidr</> values (Heikki Linnakangas)
1327      </para>
1328
1329      <para>
1330       A patch in the December 2011 releases of <productname>PostgreSQL</>
1331       caused memory leakage in these operations, which could be significant
1332       in scenarios such as building a btree index on such a column.
1333      </para>
1334     </listitem>
1335
1336     <listitem>
1337      <para>
1338       Fix dangling pointer after <command>CREATE TABLE AS</>/<command>SELECT
1339       INTO</> in a SQL-language function (Tom Lane)
1340      </para>
1341
1342      <para>
1343       In most cases this only led to an assertion failure in assert-enabled
1344       builds, but worse consequences seem possible.
1345      </para>
1346     </listitem>
1347
1348     <listitem>
1349      <para>
1350       Avoid double close of file handle in syslogger on Windows (MauMau)
1351      </para>
1352
1353      <para>
1354       Ordinarily this error was invisible, but it would cause an exception
1355       when running on a debug version of Windows.
1356      </para>
1357     </listitem>
1358
1359     <listitem>
1360      <para>
1361       Fix I/O-conversion-related memory leaks in plpgsql
1362       (Andres Freund, Jan Urbanski, Tom Lane)
1363      </para>
1364
1365      <para>
1366       Certain operations would leak memory until the end of the current
1367       function.
1368      </para>
1369     </listitem>
1370
1371     <listitem>
1372      <para>
1373       Improve <application>pg_dump</>'s handling of inherited table columns
1374       (Tom Lane)
1375      </para>
1376
1377      <para>
1378       <application>pg_dump</> mishandled situations where a child column has
1379       a different default expression than its parent column.  If the default
1380       is textually identical to the parent's default, but not actually the
1381       same (for instance, because of schema search path differences) it would
1382       not be recognized as different, so that after dump and restore the
1383       child would be allowed to inherit the parent's default.  Child columns
1384       that are <literal>NOT NULL</> where their parent is not could also be
1385       restored subtly incorrectly.
1386      </para>
1387     </listitem>
1388
1389     <listitem>
1390      <para>
1391       Fix <application>pg_restore</>'s direct-to-database mode for
1392       INSERT-style table data (Tom Lane)
1393      </para>
1394
1395      <para>
1396       Direct-to-database restores from archive files made with
1397       <option>--inserts</> or <option>--column-inserts</> options fail when
1398       using <application>pg_restore</> from a release dated September or
1399       December 2011, as a result of an oversight in a fix for another
1400       problem.  The archive file itself is not at fault, and text-mode
1401       output is okay.
1402      </para>
1403     </listitem>
1404
1405     <listitem>
1406      <para>
1407       Allow <literal>AT</> option in <application>ecpg</>
1408       <literal>DEALLOCATE</> statements (Michael Meskes)
1409      </para>
1410
1411      <para>
1412       The infrastructure to support this has been there for awhile, but
1413       through an oversight there was still an error check rejecting the case.
1414      </para>
1415     </listitem>
1416
1417     <listitem>
1418      <para>
1419       Fix error in <filename>contrib/intarray</>'s <literal>int[] &amp;
1420       int[]</> operator (Guillaume Lelarge)
1421      </para>
1422
1423      <para>
1424       If the smallest integer the two input arrays have in common is 1,
1425       and there are smaller values in either array, then 1 would be
1426       incorrectly omitted from the result.
1427      </para>
1428     </listitem>
1429
1430     <listitem>
1431      <para>
1432       Fix error detection in <filename>contrib/pgcrypto</>'s
1433       <function>encrypt_iv()</> and <function>decrypt_iv()</>
1434       (Marko Kreen)
1435      </para>
1436
1437      <para>
1438       These functions failed to report certain types of invalid-input errors,
1439       and would instead return random garbage values for incorrect input.
1440      </para>
1441     </listitem>
1442
1443     <listitem>
1444      <para>
1445       Fix one-byte buffer overrun in <filename>contrib/test_parser</>
1446       (Paul Guyot)
1447      </para>
1448
1449      <para>
1450       The code would try to read one more byte than it should, which would
1451       crash in corner cases.
1452       Since <filename>contrib/test_parser</> is only example code, this is
1453       not a security issue in itself, but bad example code is still bad.
1454      </para>
1455     </listitem>
1456
1457     <listitem>
1458      <para>
1459       Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if
1460       available (Martin Pitt)
1461      </para>
1462
1463      <para>
1464       This function replaces our previous use of the <literal>SWPB</>
1465       instruction, which is deprecated and not available on ARMv6 and later.
1466       Reports suggest that the old code doesn't fail in an obvious way on
1467       recent ARM boards, but simply doesn't interlock concurrent accesses,
1468       leading to bizarre failures in multiprocess operation.
1469      </para>
1470     </listitem>
1471
1472     <listitem>
1473      <para>
1474       Use <option>-fexcess-precision=standard</> option when building with
1475       gcc versions that accept it (Andrew Dunstan)
1476      </para>
1477
1478      <para>
1479       This prevents assorted scenarios wherein recent versions of gcc will
1480       produce creative results.
1481      </para>
1482     </listitem>
1483
1484     <listitem>
1485      <para>
1486       Allow use of threaded Python on FreeBSD (Chris Rees)
1487      </para>
1488
1489      <para>
1490       Our configure script previously believed that this combination wouldn't
1491       work; but FreeBSD fixed the problem, so remove that error check.
1492      </para>
1493     </listitem>
1494
1495    </itemizedlist>
1496
1497   </sect2>
1498  </sect1>
1499
1500  <sect1 id="release-8-4-10">
1501   <title>Release 8.4.10</title>
1502
1503   <note>
1504   <title>Release Date</title>
1505   <simpara>2011-12-05</simpara>
1506   </note>
1507
1508   <para>
1509    This release contains a variety of fixes from 8.4.9.
1510    For information about new features in the 8.4 major release, see
1511    <xref linkend="release-8-4">.
1512   </para>
1513
1514   <sect2>
1515    <title>Migration to Version 8.4.10</title>
1516
1517    <para>
1518     A dump/restore is not required for those running 8.4.X.
1519    </para>
1520
1521    <para>
1522     However, a longstanding error was discovered in the definition of the
1523     <literal>information_schema.referential_constraints</> view.  If you
1524     rely on correct results from that view, you should replace its
1525     definition as explained in the first changelog item below.
1526    </para>
1527
1528    <para>
1529     Also, if you are upgrading from a version earlier than 8.4.8,
1530     see the release notes for 8.4.8.
1531    </para>
1532
1533   </sect2>
1534
1535   <sect2>
1536    <title>Changes</title>
1537
1538    <itemizedlist>
1539
1540     <listitem>
1541      <para>
1542       Fix bugs in <literal>information_schema.referential_constraints</> view
1543       (Tom Lane)
1544      </para>
1545
1546      <para>
1547       This view was being insufficiently careful about matching the
1548       foreign-key constraint to the depended-on primary or unique key
1549       constraint.  That could result in failure to show a foreign key
1550       constraint at all, or showing it multiple times, or claiming that it
1551       depends on a different constraint than the one it really does.
1552      </para>
1553
1554      <para>
1555       Since the view definition is installed by <application>initdb</>,
1556       merely upgrading will not fix the problem.  If you need to fix this
1557       in an existing installation, you can (as a superuser) drop the
1558       <literal>information_schema</> schema then re-create it by sourcing
1559       <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>.
1560       (Run <literal>pg_config --sharedir</> if you're uncertain where
1561       <replaceable>SHAREDIR</> is.)  This must be repeated in each database
1562       to be fixed.
1563      </para>
1564     </listitem>
1565
1566     <listitem>
1567      <para>
1568       Fix incorrect replay of WAL records for GIN index updates
1569       (Tom Lane)
1570      </para>
1571
1572      <para>
1573       This could result in transiently failing to find index entries after
1574       a crash, or on a hot-standby server.  The problem would be repaired
1575       by the next <command>VACUUM</> of the index, however.
1576      </para>
1577     </listitem>
1578
1579     <listitem>
1580      <para>
1581       Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS
1582       SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</>
1583       (Tom Lane)
1584      </para>
1585
1586      <para>
1587       If a table has been modified by <command>ALTER TABLE ADD COLUMN</>,
1588       attempts to copy its data verbatim to another table could produce
1589       corrupt results in certain corner cases.
1590       The problem can only manifest in this precise form in 8.4 and later,
1591       but we patched earlier versions as well in case there are other code
1592       paths that could trigger the same bug.
1593      </para>
1594     </listitem>
1595
1596     <listitem>
1597      <para>
1598       Fix race condition during toast table access from stale syscache entries
1599       (Tom Lane)
1600      </para>
1601
1602      <para>
1603       The typical symptom was transient errors like <quote>missing chunk
1604       number 0 for toast value NNNNN in pg_toast_2619</>, where the cited
1605       toast table would always belong to a system catalog.
1606      </para>
1607     </listitem>
1608
1609     <listitem>
1610      <para>
1611       Track dependencies of functions on items used in parameter default
1612       expressions (Tom Lane)
1613      </para>
1614
1615      <para>
1616       Previously, a referenced object could be dropped without having dropped
1617       or modified the function, leading to misbehavior when the function was
1618       used.  Note that merely installing this update will not fix the missing
1619       dependency entries; to do that, you'd need to <command>CREATE OR
1620       REPLACE</> each such function afterwards.  If you have functions whose
1621       defaults depend on non-built-in objects, doing so is recommended.
1622      </para>
1623     </listitem>
1624
1625     <listitem>
1626      <para>
1627       Allow inlining of set-returning SQL functions with multiple OUT
1628       parameters (Tom Lane)
1629      </para>
1630     </listitem>
1631
1632     <listitem>
1633      <para>
1634       Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte
1635       header, and add a new macro, <function>DatumGetInetPP()</>, that does
1636       not (Heikki Linnakangas)
1637      </para>
1638
1639      <para>
1640       This change affects no core code, but might prevent crashes in add-on
1641       code that expects <function>DatumGetInetP()</> to produce an unpacked
1642       datum as per usual convention.
1643      </para>
1644     </listitem>
1645
1646     <listitem>
1647      <para>
1648       Improve locale support in <type>money</> type's input and output
1649       (Tom Lane)
1650      </para>
1651
1652      <para>
1653       Aside from not supporting all standard
1654       <link linkend="guc-lc-monetary"><varname>lc_monetary</></link>
1655       formatting options, the input and output functions were inconsistent,
1656       meaning there were locales in which dumped <type>money</> values could
1657       not be re-read.
1658      </para>
1659     </listitem>
1660
1661     <listitem>
1662      <para>
1663       Don't let <link
1664       linkend="guc-transform-null-equals"><varname>transform_null_equals</></link>
1665       affect <literal>CASE foo WHEN NULL ...</> constructs
1666       (Heikki Linnakangas)
1667      </para>
1668
1669      <para>
1670       <varname>transform_null_equals</> is only supposed to affect
1671       <literal>foo = NULL</> expressions written directly by the user, not
1672       equality checks generated internally by this form of <literal>CASE</>.
1673      </para>
1674     </listitem>
1675
1676     <listitem>
1677      <para>
1678       Change foreign-key trigger creation order to better support
1679       self-referential foreign keys (Tom Lane)
1680      </para>
1681
1682      <para>
1683       For a cascading foreign key that references its own table, a row update
1684       will fire both the <literal>ON UPDATE</> trigger and the
1685       <literal>CHECK</> trigger as one event.  The <literal>ON UPDATE</>
1686       trigger must execute first, else the <literal>CHECK</> will check a
1687       non-final state of the row and possibly throw an inappropriate error.
1688       However, the firing order of these triggers is determined by their
1689       names, which generally sort in creation order since the triggers have
1690       auto-generated names following the convention
1691       <quote>RI_ConstraintTrigger_NNNN</>.  A proper fix would require
1692       modifying that convention, which we will do in 9.2, but it seems risky
1693       to change it in existing releases.  So this patch just changes the
1694       creation order of the triggers.  Users encountering this type of error
1695       should drop and re-create the foreign key constraint to get its
1696       triggers into the right order.
1697      </para>
1698     </listitem>
1699
1700     <listitem>
1701      <para>
1702       Avoid floating-point underflow while tracking buffer allocation rate
1703       (Greg Matthews)
1704      </para>
1705
1706      <para>
1707       While harmless in itself, on certain platforms this would result in
1708       annoying kernel log messages.
1709      </para>
1710     </listitem>
1711
1712     <listitem>
1713      <para>
1714       Preserve configuration file name and line number values when starting
1715       child processes under Windows (Tom Lane)
1716      </para>
1717
1718      <para>
1719       Formerly, these would not be displayed correctly in the
1720       <structname>pg_settings</> view.
1721      </para>
1722     </listitem>
1723
1724     <listitem>
1725      <para>
1726       Preserve blank lines within commands in <application>psql</>'s command
1727       history (Robert Haas)
1728      </para>
1729
1730      <para>
1731       The former behavior could cause problems if an empty line was removed
1732       from within a string literal, for example.
1733      </para>
1734     </listitem>
1735
1736     <listitem>
1737      <para>
1738       Fix <application>pg_dump</> to dump user-defined casts between
1739       auto-generated types, such as table rowtypes (Tom Lane)
1740      </para>
1741     </listitem>
1742
1743     <listitem>
1744      <para>
1745       Use the preferred version of <application>xsubpp</> to build PL/Perl,
1746       not necessarily the operating system's main copy
1747       (David Wheeler and Alex Hunsaker)
1748      </para>
1749     </listitem>
1750
1751     <listitem>
1752      <para>
1753       Fix incorrect coding in <filename>contrib/dict_int</> and
1754       <filename>contrib/dict_xsyn</> (Tom Lane)
1755      </para>
1756
1757      <para>
1758       Some functions incorrectly assumed that memory returned by
1759       <function>palloc()</> is guaranteed zeroed.
1760      </para>
1761     </listitem>
1762
1763     <listitem>
1764      <para>
1765       Honor query cancel interrupts promptly in <function>pgstatindex()</>
1766       (Robert Haas)
1767      </para>
1768     </listitem>
1769
1770     <listitem>
1771      <para>
1772       Ensure VPATH builds properly install all server header files
1773       (Peter Eisentraut)
1774      </para>
1775     </listitem>
1776
1777     <listitem>
1778      <para>
1779       Shorten file names reported in verbose error messages (Peter Eisentraut)
1780      </para>
1781
1782      <para>
1783       Regular builds have always reported just the name of the C file
1784       containing the error message call, but VPATH builds formerly
1785       reported an absolute path name.
1786      </para>
1787     </listitem>
1788
1789     <listitem>
1790      <para>
1791       Fix interpretation of Windows timezone names for Central America
1792       (Tom Lane)
1793      </para>
1794
1795      <para>
1796       Map <quote>Central America Standard Time</> to <literal>CST6</>, not
1797       <literal>CST6CDT</>, because DST is generally not observed anywhere in
1798       Central America.
1799      </para>
1800     </listitem>
1801
1802     <listitem>
1803      <para>
1804       Update time zone data files to <application>tzdata</> release 2011n
1805       for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa;
1806       also historical corrections for Alaska and British East Africa.
1807      </para>
1808     </listitem>
1809
1810    </itemizedlist>
1811
1812   </sect2>
1813  </sect1>
1814
1815  <sect1 id="release-8-4-9">
1816   <title>Release 8.4.9</title>
1817
1818   <note>
1819   <title>Release Date</title>
1820   <simpara>2011-09-26</simpara>
1821   </note>
1822
1823   <para>
1824    This release contains a variety of fixes from 8.4.8.
1825    For information about new features in the 8.4 major release, see
1826    <xref linkend="release-8-4">.
1827   </para>
1828
1829   <sect2>
1830    <title>Migration to Version 8.4.9</title>
1831
1832    <para>
1833     A dump/restore is not required for those running 8.4.X.
1834    </para>
1835
1836    <para>
1837     However, if you are upgrading from a version earlier than 8.4.8,
1838     see the release notes for 8.4.8.
1839    </para>
1840
1841   </sect2>
1842
1843   <sect2>
1844    <title>Changes</title>
1845
1846    <itemizedlist>
1847
1848     <listitem>
1849      <para>
1850       Fix bugs in indexing of in-doubt HOT-updated tuples (Tom Lane)
1851      </para>
1852
1853      <para>
1854       These bugs could result in index corruption after reindexing a system
1855       catalog.  They are not believed to affect user indexes.
1856      </para>
1857     </listitem>
1858
1859     <listitem>
1860      <para>
1861       Fix multiple bugs in GiST index page split processing (Heikki
1862       Linnakangas)
1863      </para>
1864
1865      <para>
1866       The probability of occurrence was low, but these could lead to index
1867       corruption.
1868      </para>
1869     </listitem>
1870
1871     <listitem>
1872      <para>
1873       Fix possible buffer overrun in <function>tsvector_concat()</>
1874       (Tom Lane)
1875      </para>
1876
1877      <para>
1878       The function could underestimate the amount of memory needed for its
1879       result, leading to server crashes.
1880      </para>
1881     </listitem>
1882
1883     <listitem>
1884      <para>
1885       Fix crash in <function>xml_recv</> when processing a
1886       <quote>standalone</> parameter (Tom Lane)
1887      </para>
1888     </listitem>
1889
1890     <listitem>
1891      <para>
1892       Make <function>pg_options_to_table</> return NULL for an option with no
1893       value (Tom Lane)
1894      </para>
1895
1896      <para>
1897       Previously such cases would result in a server crash.
1898      </para>
1899     </listitem>
1900
1901     <listitem>
1902      <para>
1903       Avoid possibly accessing off the end of memory in <command>ANALYZE</>
1904       and in SJIS-2004 encoding conversion (Noah Misch)
1905      </para>
1906
1907      <para>
1908       This fixes some very-low-probability server crash scenarios.
1909      </para>
1910     </listitem>
1911
1912     <listitem>
1913      <para>
1914       Prevent intermittent hang in interactions of startup process with
1915       bgwriter process (Simon Riggs)
1916      </para>
1917
1918      <para>
1919       This affected recovery in non-hot-standby cases.
1920      </para>
1921     </listitem>
1922
1923     <listitem>
1924      <para>
1925       Fix race condition in relcache init file invalidation (Tom Lane)
1926      </para>
1927
1928      <para>
1929       There was a window wherein a new backend process could read a stale init
1930       file but miss the inval messages that would tell it the data is stale.
1931       The result would be bizarre failures in catalog accesses, typically
1932       <quote>could not read block 0 in file ...</> later during startup.
1933      </para>
1934     </listitem>
1935
1936     <listitem>
1937      <para>
1938       Fix memory leak at end of a GiST index scan (Tom Lane)
1939      </para>
1940
1941      <para>
1942       Commands that perform many separate GiST index scans, such as
1943       verification of a new GiST-based exclusion constraint on a table
1944       already containing many rows, could transiently require large amounts of
1945       memory due to this leak.
1946      </para>
1947     </listitem>
1948
1949     <listitem>
1950      <para>
1951       Fix incorrect memory accounting (leading to possible memory bloat) in
1952       tuplestores supporting holdable cursors and plpgsql's <literal>RETURN
1953       NEXT</> command (Tom Lane)
1954      </para>
1955     </listitem>
1956
1957     <listitem>
1958      <para>
1959       Fix performance problem when constructing a large, lossy bitmap
1960       (Tom Lane)
1961      </para>
1962     </listitem>
1963
1964     <listitem>
1965      <para>
1966       Fix join selectivity estimation for unique columns (Tom Lane)
1967      </para>
1968
1969      <para>
1970       This fixes an erroneous planner heuristic that could lead to poor
1971       estimates of the result size of a join.
1972      </para>
1973     </listitem>
1974
1975     <listitem>
1976      <para>
1977       Fix nested PlaceHolderVar expressions that appear only in sub-select
1978       target lists (Tom Lane)
1979      </para>
1980
1981      <para>
1982       This mistake could result in outputs of an outer join incorrectly
1983       appearing as NULL.
1984      </para>
1985     </listitem>
1986
1987     <listitem>
1988      <para>
1989       Allow nested <literal>EXISTS</> queries to be optimized properly (Tom
1990       Lane)
1991      </para>
1992     </listitem>
1993
1994     <listitem>
1995      <para>
1996       Fix array- and path-creating functions to ensure padding bytes are
1997       zeroes (Tom Lane)
1998      </para>
1999
2000      <para>
2001       This avoids some situations where the planner will think that
2002       semantically-equal constants are not equal, resulting in poor
2003       optimization.
2004      </para>
2005     </listitem>
2006
2007     <listitem>
2008      <para>
2009       Fix <command>EXPLAIN</> to handle gating Result nodes within
2010       inner-indexscan subplans (Tom Lane)
2011      </para>
2012
2013      <para>
2014       The usual symptom of this oversight was <quote>bogus varno</> errors.
2015      </para>
2016     </listitem>
2017
2018     <listitem>
2019      <para>
2020       Work around gcc 4.6.0 bug that breaks WAL replay (Tom Lane)
2021      </para>
2022
2023      <para>
2024       This could lead to loss of committed transactions after a server crash.
2025      </para>
2026     </listitem>
2027
2028     <listitem>
2029      <para>
2030       Fix dump bug for <literal>VALUES</> in a view (Tom Lane)
2031      </para>
2032     </listitem>
2033
2034     <listitem>
2035      <para>
2036       Disallow <literal>SELECT FOR UPDATE/SHARE</> on sequences (Tom Lane)
2037      </para>
2038
2039      <para>
2040       This operation doesn't work as expected and can lead to failures.
2041      </para>
2042     </listitem>
2043
2044     <listitem>
2045      <para>
2046       Fix <command>VACUUM</> so that it always updates
2047       <literal>pg_class</>.<literal>reltuples</>/<literal>relpages</> (Tom
2048       Lane)
2049      </para>
2050
2051      <para>
2052       This fixes some scenarios where autovacuum could make increasingly poor
2053       decisions about when to vacuum tables.
2054      </para>
2055     </listitem>
2056
2057     <listitem>
2058      <para>
2059       Defend against integer overflow when computing size of a hash table (Tom
2060       Lane)
2061      </para>
2062     </listitem>
2063
2064     <listitem>
2065      <para>
2066       Fix cases where <command>CLUSTER</> might attempt to access
2067       already-removed TOAST data (Tom Lane)
2068      </para>
2069     </listitem>
2070
2071     <listitem>
2072      <para>
2073       Fix portability bugs in use of credentials control messages for
2074       <quote>peer</> authentication (Tom Lane)
2075      </para>
2076     </listitem>
2077
2078     <listitem>
2079      <para>
2080       Fix SSPI login when multiple roundtrips are required (Ahmed Shinwari,
2081       Magnus Hagander)
2082      </para>
2083
2084      <para>
2085       The typical symptom of this problem was <quote>The function requested is
2086       not supported</> errors during SSPI login.
2087      </para>
2088     </listitem>
2089
2090     <listitem>
2091      <para>
2092       Throw an error if <filename>pg_hba.conf</> contains <literal>hostssl</>
2093       but SSL is disabled (Tom Lane)
2094      </para>
2095
2096      <para>
2097       This was concluded to be more user-friendly than the previous behavior
2098       of silently ignoring such lines.
2099      </para>
2100     </listitem>
2101
2102     <listitem>
2103      <para>
2104       Fix typo in <function>pg_srand48</> seed initialization (Andres Freund)
2105      </para>
2106
2107      <para>
2108       This led to failure to use all bits of the provided seed.  This function
2109       is not used on most platforms (only those without <function>srandom</>),
2110       and the potential security exposure from a less-random-than-expected
2111       seed seems minimal in any case.
2112      </para>
2113     </listitem>
2114
2115     <listitem>
2116      <para>
2117       Avoid integer overflow when the sum of <literal>LIMIT</> and
2118       <literal>OFFSET</> values exceeds 2^63 (Heikki Linnakangas)
2119      </para>
2120     </listitem>
2121
2122     <listitem>
2123      <para>
2124       Add overflow checks to <type>int4</> and <type>int8</> versions of
2125       <function>generate_series()</> (Robert Haas)
2126      </para>
2127     </listitem>
2128
2129     <listitem>
2130      <para>
2131       Fix trailing-zero removal in <function>to_char()</> (Marti Raudsepp)
2132      </para>
2133
2134      <para>
2135       In a format with <literal>FM</> and no digit positions
2136       after the decimal point, zeroes to the left of the decimal point could
2137       be removed incorrectly.
2138      </para>
2139     </listitem>
2140
2141     <listitem>
2142      <para>
2143       Fix <function>pg_size_pretty()</> to avoid overflow for inputs close to
2144       2^63 (Tom Lane)
2145      </para>
2146     </listitem>
2147
2148     <listitem>
2149      <para>
2150       Weaken plpgsql's check for typmod matching in record values (Tom Lane)
2151      </para>
2152
2153      <para>
2154       An overly enthusiastic check could lead to discarding length modifiers
2155       that should have been kept.
2156      </para>
2157     </listitem>
2158
2159     <listitem>
2160      <para>
2161       Correctly handle quotes in locale names during <application>initdb</>
2162       (Heikki Linnakangas)
2163      </para>
2164
2165      <para>
2166       The case can arise with some Windows locales, such as <quote>People's
2167       Republic of China</>.
2168      </para>
2169     </listitem>
2170
2171     <listitem>
2172      <para>
2173       Fix <application>pg_upgrade</> to preserve toast tables' relfrozenxids
2174       during an upgrade from 8.3 (Bruce Momjian)
2175      </para>
2176
2177      <para>
2178       Failure to do this could lead to <filename>pg_clog</> files being
2179       removed too soon after the upgrade.
2180      </para>
2181     </listitem>
2182
2183     <listitem>
2184      <para>
2185       In <application>pg_ctl</>, support silent mode for service registrations
2186       on Windows (MauMau)
2187      </para>
2188     </listitem>
2189
2190     <listitem>
2191      <para>
2192       Fix <application>psql</>'s counting of script file line numbers during
2193       <literal>COPY</> from a different file (Tom Lane)
2194      </para>
2195     </listitem>
2196
2197     <listitem>
2198      <para>
2199       Fix <application>pg_restore</>'s direct-to-database mode for
2200       <varname>standard_conforming_strings</> (Tom Lane)
2201      </para>
2202
2203      <para>
2204       <application>pg_restore</> could emit incorrect commands when restoring
2205       directly to a database server from an archive file that had been made
2206       with <varname>standard_conforming_strings</> set to <literal>on</>.
2207      </para>
2208     </listitem>
2209
2210     <listitem>
2211      <para>
2212       Be more user-friendly about unsupported cases for parallel
2213       <application>pg_restore</> (Tom Lane)
2214      </para>
2215
2216      <para>
2217       This change ensures that such cases are detected and reported before
2218       any restore actions have been taken.
2219      </para>
2220     </listitem>
2221
2222     <listitem>
2223      <para>
2224       Fix write-past-buffer-end and memory leak in <application>libpq</>'s
2225       LDAP service lookup code (Albe Laurenz)
2226      </para>
2227     </listitem>
2228
2229     <listitem>
2230      <para>
2231       In <application>libpq</>, avoid failures when using nonblocking I/O
2232       and an SSL connection (Martin Pihlak, Tom Lane)
2233      </para>
2234     </listitem>
2235
2236     <listitem>
2237      <para>
2238       Improve libpq's handling of failures during connection startup
2239       (Tom Lane)
2240      </para>
2241
2242      <para>
2243       In particular, the response to a server report of <function>fork()</>
2244       failure during SSL connection startup is now saner.
2245      </para>
2246     </listitem>
2247
2248     <listitem>
2249      <para>
2250       Improve <application>libpq</>'s error reporting for SSL failures (Tom
2251       Lane)
2252      </para>
2253     </listitem>
2254
2255     <listitem>
2256      <para>
2257       Fix <function>PQsetvalue()</> to avoid possible crash when adding a new
2258       tuple to a <structname>PGresult</> originally obtained from a server
2259       query (Andrew Chernow)
2260      </para>
2261     </listitem>
2262
2263     <listitem>
2264      <para>
2265       Make <application>ecpglib</> write <type>double</> values with 15 digits
2266       precision (Akira Kurosawa)
2267      </para>
2268     </listitem>
2269
2270     <listitem>
2271      <para>
2272       In <application>ecpglib</>, be sure <literal>LC_NUMERIC</> setting is
2273       restored after an error (Michael Meskes)
2274      </para>
2275     </listitem>
2276
2277     <listitem>
2278      <para>
2279       Apply upstream fix for blowfish signed-character bug (CVE-2011-2483)
2280       (Tom Lane)
2281      </para>
2282
2283      <para>
2284       <filename>contrib/pg_crypto</>'s blowfish encryption code could give
2285       wrong results on platforms where char is signed (which is most),
2286       leading to encrypted passwords being weaker than they should be.
2287      </para>
2288     </listitem>
2289
2290     <listitem>
2291      <para>
2292       Fix memory leak in <filename>contrib/seg</> (Heikki Linnakangas)
2293      </para>
2294     </listitem>
2295
2296     <listitem>
2297      <para>
2298       Fix <function>pgstatindex()</> to give consistent results for empty
2299       indexes (Tom Lane)
2300      </para>
2301     </listitem>
2302
2303     <listitem>
2304      <para>
2305       Allow building with perl 5.14 (Alex Hunsaker)
2306      </para>
2307     </listitem>
2308
2309     <listitem>
2310      <para>
2311       Update configure script's method for probing existence of system
2312       functions (Tom Lane)
2313      </para>
2314
2315      <para>
2316       The version of autoconf we used in 8.3 and 8.2 could be fooled by
2317       compilers that perform link-time optimization.
2318      </para>
2319     </listitem>
2320
2321     <listitem>
2322      <para>
2323       Fix assorted issues with build and install file paths containing spaces
2324       (Tom Lane)
2325      </para>
2326     </listitem>
2327
2328     <listitem>
2329      <para>
2330       Update time zone data files to <application>tzdata</> release 2011i
2331       for DST law changes in Canada, Egypt, Russia, Samoa, and South Sudan.
2332      </para>
2333     </listitem>
2334
2335    </itemizedlist>
2336
2337   </sect2>
2338  </sect1>
2339
2340  <sect1 id="release-8-4-8">
2341   <title>Release 8.4.8</title>
2342
2343   <note>
2344   <title>Release Date</title>
2345   <simpara>2011-04-18</simpara>
2346   </note>
2347
2348   <para>
2349    This release contains a variety of fixes from 8.4.7.
2350    For information about new features in the 8.4 major release, see
2351    <xref linkend="release-8-4">.
2352   </para>
2353
2354   <sect2>
2355    <title>Migration to Version 8.4.8</title>
2356
2357    <para>
2358     A dump/restore is not required for those running 8.4.X.
2359    </para>
2360
2361    <para>
2362     However, if your installation was upgraded from a previous major
2363     release by running <application>pg_upgrade</>, you should take
2364     action to prevent possible data loss due to a now-fixed bug in
2365     <application>pg_upgrade</>.  The recommended solution is to run
2366     <command>VACUUM FREEZE</> on all TOAST tables.
2367     More information is available at <ulink
2368     url="http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix">
2369     http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix</ulink>.
2370    </para>
2371
2372    <para>
2373     Also, if you are upgrading from a version earlier than 8.4.2,
2374     see the release notes for 8.4.2.
2375    </para>
2376
2377   </sect2>
2378
2379   <sect2>
2380    <title>Changes</title>
2381
2382    <itemizedlist>
2383
2384     <listitem>
2385      <para>
2386       Fix <application>pg_upgrade</>'s handling of TOAST tables
2387       (Bruce Momjian)
2388      </para>
2389
2390      <para>
2391       The <structname>pg_class</>.<structfield>relfrozenxid</> value for
2392       TOAST tables was not correctly copied into the new installation
2393       during <application>pg_upgrade</>.  This could later result in
2394       <literal>pg_clog</> files being discarded while they were still
2395       needed to validate tuples in the TOAST tables, leading to
2396       <quote>could not access status of transaction</> failures.
2397      </para>
2398
2399      <para>
2400       This error poses a significant risk of data loss for installations
2401       that have been upgraded with <application>pg_upgrade</>.  This patch
2402       corrects the problem for future uses of <application>pg_upgrade</>,
2403       but does not in itself cure the issue in installations that have been
2404       processed with a buggy version of <application>pg_upgrade</>.
2405      </para>
2406     </listitem>
2407
2408     <listitem>
2409      <para>
2410       Suppress incorrect <quote>PD_ALL_VISIBLE flag was incorrectly set</>
2411       warning (Heikki Linnakangas)
2412      </para>
2413
2414      <para>
2415       <command>VACUUM</> would sometimes issue this warning in cases that
2416       are actually valid.
2417      </para>
2418     </listitem>
2419
2420     <listitem>
2421      <para>
2422       Disallow including a composite type in itself (Tom Lane)
2423      </para>
2424
2425      <para>
2426       This prevents scenarios wherein the server could recurse infinitely
2427       while processing the composite type.  While there are some possible
2428       uses for such a structure, they don't seem compelling enough to
2429       justify the effort required to make sure it always works safely.
2430      </para>
2431     </listitem>
2432
2433     <listitem>
2434      <para>
2435       Avoid potential deadlock during catalog cache initialization
2436       (Nikhil Sontakke)
2437      </para>
2438
2439      <para>
2440       In some cases the cache loading code would acquire share lock on a
2441       system index before locking the index's catalog.  This could deadlock
2442       against processes trying to acquire exclusive locks in the other,
2443       more standard order.
2444      </para>
2445     </listitem>
2446
2447     <listitem>
2448      <para>
2449       Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</> trigger
2450       handling when there was a concurrent update to the target tuple
2451       (Tom Lane)
2452      </para>
2453
2454      <para>
2455       This bug has been observed to result in intermittent <quote>cannot
2456       extract system attribute from virtual tuple</> failures while trying to
2457       do <literal>UPDATE RETURNING ctid</>.  There is a very small probability
2458       of more serious errors, such as generating incorrect index entries for
2459       the updated tuple.
2460      </para>
2461     </listitem>
2462
2463     <listitem>
2464      <para>
2465       Disallow <command>DROP TABLE</> when there are pending deferred trigger
2466       events for the table (Tom Lane)
2467      </para>
2468
2469      <para>
2470       Formerly the <command>DROP</> would go through, leading to
2471       <quote>could not open relation with OID nnn</> errors when the
2472       triggers were eventually fired.
2473      </para>
2474     </listitem>
2475
2476     <listitem>
2477      <para>
2478       Prevent crash triggered by constant-false WHERE conditions during
2479       GEQO optimization (Tom Lane)
2480      </para>
2481
2482      <para>
2483      </para>
2484     </listitem>
2485
2486     <listitem>
2487      <para>
2488       Improve planner's handling of semi-join and anti-join cases
2489       (Tom Lane)
2490      </para>
2491     </listitem>
2492
2493     <listitem>
2494      <para>
2495       Fix selectivity estimation for text search to account for NULLs
2496       (Jesper Krogh)
2497      </para>
2498     </listitem>
2499
2500     <listitem>
2501      <para>
2502       Improve PL/pgSQL's ability to handle row types with dropped columns
2503       (Pavel Stehule)
2504      </para>
2505
2506      <para>
2507       This is a back-patch of fixes previously made in 9.0.
2508      </para>
2509     </listitem>
2510
2511     <listitem>
2512      <para>
2513       Fix PL/Python memory leak involving array slices (Daniel Popowich)
2514      </para>
2515     </listitem>
2516
2517     <listitem>
2518      <para>
2519       Fix <application>pg_restore</> to cope with long lines (over 1KB) in
2520       TOC files (Tom Lane)
2521      </para>
2522     </listitem>
2523
2524     <listitem>
2525      <para>
2526       Put in more safeguards against crashing due to division-by-zero
2527       with overly enthusiastic compiler optimization (Aurelien Jarno)
2528      </para>
2529     </listitem>
2530
2531     <listitem>
2532      <para>
2533       Support use of dlopen() in FreeBSD and OpenBSD on MIPS (Tom Lane)
2534      </para>
2535
2536      <para>
2537       There was a hard-wired assumption that this system function was not
2538       available on MIPS hardware on these systems.  Use a compile-time test
2539       instead, since more recent versions have it.
2540      </para>
2541     </listitem>
2542
2543     <listitem>
2544      <para>
2545       Fix compilation failures on HP-UX (Heikki Linnakangas)
2546      </para>
2547     </listitem>
2548
2549     <listitem>
2550      <para>
2551       Fix version-incompatibility problem with <application>libintl</> on
2552       Windows (Hiroshi Inoue)
2553      </para>
2554     </listitem>
2555
2556     <listitem>
2557      <para>
2558       Fix usage of <application>xcopy</> in Windows build scripts to
2559       work correctly under Windows 7 (Andrew Dunstan)
2560      </para>
2561
2562      <para>
2563       This affects the build scripts only, not installation or usage.
2564      </para>
2565     </listitem>
2566
2567     <listitem>
2568      <para>
2569       Fix path separator used by <application>pg_regress</> on Cygwin
2570       (Andrew Dunstan)
2571      </para>
2572     </listitem>
2573
2574     <listitem>
2575      <para>
2576       Update time zone data files to <application>tzdata</> release 2011f
2577       for DST law changes in Chile, Cuba, Falkland Islands, Morocco, Samoa,
2578       and Turkey; also historical corrections for South Australia, Alaska,
2579       and Hawaii.
2580      </para>
2581     </listitem>
2582
2583    </itemizedlist>
2584
2585   </sect2>
2586  </sect1>
2587
2588  <sect1 id="release-8-4-7">
2589   <title>Release 8.4.7</title>
2590
2591   <note>
2592   <title>Release Date</title>
2593   <simpara>2011-01-31</simpara>
2594   </note>
2595
2596   <para>
2597    This release contains a variety of fixes from 8.4.6.
2598    For information about new features in the 8.4 major release, see
2599    <xref linkend="release-8-4">.
2600   </para>
2601
2602   <sect2>
2603    <title>Migration to Version 8.4.7</title>
2604
2605    <para>
2606     A dump/restore is not required for those running 8.4.X.
2607     However, if you are upgrading from a version earlier than 8.4.2,
2608     see the release notes for 8.4.2.
2609    </para>
2610
2611   </sect2>
2612
2613   <sect2>
2614    <title>Changes</title>
2615
2616    <itemizedlist>
2617
2618     <listitem>
2619      <para>
2620       Avoid failures when <command>EXPLAIN</> tries to display a simple-form
2621       <literal>CASE</> expression (Tom Lane)
2622      </para>
2623
2624      <para>
2625       If the <literal>CASE</>'s test expression was a constant, the planner
2626       could simplify the <literal>CASE</> into a form that confused the
2627       expression-display code, resulting in <quote>unexpected CASE WHEN
2628       clause</> errors.
2629      </para>
2630     </listitem>
2631
2632     <listitem>
2633      <para>
2634       Fix assignment to an array slice that is before the existing range
2635       of subscripts (Tom Lane)
2636      </para>
2637
2638      <para>
2639       If there was a gap between the newly added subscripts and the first
2640       pre-existing subscript, the code miscalculated how many entries needed
2641       to be copied from the old array's null bitmap, potentially leading to
2642       data corruption or crash.
2643      </para>
2644     </listitem>
2645
2646     <listitem>
2647      <para>
2648       Avoid unexpected conversion overflow in planner for very distant date
2649       values (Tom Lane)
2650      </para>
2651
2652      <para>
2653       The <type>date</> type supports a wider range of dates than can be
2654       represented by the <type>timestamp</> types, but the planner assumed it
2655       could always convert a date to timestamp with impunity.
2656      </para>
2657     </listitem>
2658
2659     <listitem>
2660      <para>
2661       Fix <application>pg_restore</>'s text output for large objects (BLOBs)
2662       when <varname>standard_conforming_strings</> is on (Tom Lane)
2663      </para>
2664
2665      <para>
2666       Although restoring directly to a database worked correctly, string
2667       escaping was incorrect if <application>pg_restore</> was asked for
2668       SQL text output and <varname>standard_conforming_strings</> had been
2669       enabled in the source database.
2670      </para>
2671     </listitem>
2672
2673     <listitem>
2674      <para>
2675       Fix erroneous parsing of <type>tsquery</> values containing
2676       <literal>... &amp; !(subexpression) | ...</literal> (Tom Lane)
2677      </para>
2678
2679      <para>
2680       Queries containing this combination of operators were not executed
2681       correctly.  The same error existed in <filename>contrib/intarray</>'s
2682       <type>query_int</> type and <filename>contrib/ltree</>'s
2683       <type>ltxtquery</> type.
2684      </para>
2685     </listitem>
2686
2687     <listitem>
2688      <para>
2689       Fix buffer overrun in <filename>contrib/intarray</>'s input function
2690       for the <type>query_int</> type (Apple)
2691      </para>
2692
2693      <para>
2694       This bug is a security risk since the function's return address could
2695       be overwritten.  Thanks to Apple Inc's security team for reporting this
2696       issue and supplying the fix.  (CVE-2010-4015)
2697      </para>
2698     </listitem>
2699
2700     <listitem>
2701      <para>
2702       Fix bug in <filename>contrib/seg</>'s GiST picksplit algorithm
2703       (Alexander Korotkov)
2704      </para>
2705
2706      <para>
2707       This could result in considerable inefficiency, though not actually
2708       incorrect answers, in a GiST index on a <type>seg</> column.
2709       If you have such an index, consider <command>REINDEX</>ing it after
2710       installing this update.  (This is identical to the bug that was fixed in
2711       <filename>contrib/cube</> in the previous update.)
2712      </para>
2713     </listitem>
2714
2715    </itemizedlist>
2716
2717   </sect2>
2718  </sect1>
2719
2720  <sect1 id="release-8-4-6">
2721   <title>Release 8.4.6</title>
2722
2723   <note>
2724   <title>Release Date</title>
2725   <simpara>2010-12-16</simpara>
2726   </note>
2727
2728   <para>
2729    This release contains a variety of fixes from 8.4.5.
2730    For information about new features in the 8.4 major release, see
2731    <xref linkend="release-8-4">.
2732   </para>
2733
2734   <sect2>
2735    <title>Migration to Version 8.4.6</title>
2736
2737    <para>
2738     A dump/restore is not required for those running 8.4.X.
2739     However, if you are upgrading from a version earlier than 8.4.2,
2740     see the release notes for 8.4.2.
2741    </para>
2742
2743   </sect2>
2744
2745   <sect2>
2746    <title>Changes</title>
2747
2748    <itemizedlist>
2749
2750     <listitem>
2751      <para>
2752       Force the default
2753       <link linkend="guc-wal-sync-method"><varname>wal_sync_method</></link>
2754       to be <literal>fdatasync</> on Linux (Tom Lane, Marti Raudsepp)
2755      </para>
2756
2757      <para>
2758       The default on Linux has actually been <literal>fdatasync</> for many
2759       years, but recent kernel changes caused <productname>PostgreSQL</> to
2760       choose <literal>open_datasync</> instead.  This choice did not result
2761       in any performance improvement, and caused outright failures on
2762       certain filesystems, notably <literal>ext4</> with the
2763       <literal>data=journal</> mount option.
2764      </para>
2765     </listitem>
2766
2767     <listitem>
2768      <para>
2769       Fix assorted bugs in WAL replay logic for GIN indexes (Tom Lane)
2770      </para>
2771
2772      <para>
2773       This could result in <quote>bad buffer id: 0</> failures or
2774       corruption of index contents during replication.
2775      </para>
2776     </listitem>
2777
2778     <listitem>
2779      <para>
2780       Fix recovery from base backup when the starting checkpoint WAL record
2781       is not in the same WAL segment as its redo point (Jeff Davis)
2782      </para>
2783     </listitem>
2784
2785     <listitem>
2786      <para>
2787       Fix persistent slowdown of autovacuum workers when multiple workers
2788       remain active for a long time (Tom Lane)
2789      </para>
2790
2791      <para>
2792       The effective <varname>vacuum_cost_limit</> for an autovacuum worker
2793       could drop to nearly zero if it processed enough tables, causing it
2794       to run extremely slowly.
2795      </para>
2796     </listitem>
2797
2798     <listitem>
2799      <para>
2800       Add support for detecting register-stack overrun on <literal>IA64</>
2801       (Tom Lane)
2802      </para>
2803
2804      <para>
2805       The <literal>IA64</> architecture has two hardware stacks.  Full
2806       prevention of stack-overrun failures requires checking both.
2807      </para>
2808     </listitem>
2809
2810     <listitem>
2811      <para>
2812       Add a check for stack overflow in <function>copyObject()</> (Tom Lane)
2813      </para>
2814
2815      <para>
2816       Certain code paths could crash due to stack overflow given a
2817       sufficiently complex query.
2818      </para>
2819     </listitem>
2820
2821     <listitem>
2822      <para>
2823       Fix detection of page splits in temporary GiST indexes (Heikki
2824       Linnakangas)
2825      </para>
2826
2827      <para>
2828       It is possible to have a <quote>concurrent</> page split in a
2829       temporary index, if for example there is an open cursor scanning the
2830       index when an insertion is done.  GiST failed to detect this case and
2831       hence could deliver wrong results when execution of the cursor
2832       continued.
2833      </para>
2834     </listitem>
2835
2836     <listitem>
2837      <para>
2838       Fix error checking during early connection processing (Tom Lane)
2839      </para>
2840
2841      <para>
2842       The check for too many child processes was skipped in some cases,
2843       possibly leading to postmaster crash when attempting to add the new
2844       child process to fixed-size arrays.
2845      </para>
2846     </listitem>
2847
2848     <listitem>
2849      <para>
2850       Improve efficiency of window functions (Tom Lane)
2851      </para>
2852
2853      <para>
2854       Certain cases where a large number of tuples needed to be read in
2855       advance, but <varname>work_mem</> was large enough to allow them all
2856       to be held in memory, were unexpectedly slow.
2857       <function>percent_rank()</>, <function>cume_dist()</> and
2858       <function>ntile()</> in particular were subject to this problem.
2859      </para>
2860     </listitem>
2861
2862     <listitem>
2863      <para>
2864       Avoid memory leakage while <command>ANALYZE</>'ing complex index
2865       expressions (Tom Lane)
2866      </para>
2867     </listitem>
2868
2869     <listitem>
2870      <para>
2871       Ensure an index that uses a whole-row Var still depends on its table
2872       (Tom Lane)
2873      </para>
2874
2875      <para>
2876       An index declared like <literal>create index i on t (foo(t.*))</>
2877       would not automatically get dropped when its table was dropped.
2878      </para>
2879     </listitem>
2880
2881     <listitem>
2882      <para>
2883       Do not <quote>inline</> a SQL function with multiple <literal>OUT</>
2884       parameters (Tom Lane)
2885      </para>
2886
2887      <para>
2888       This avoids a possible crash due to loss of information about the
2889       expected result rowtype.
2890      </para>
2891     </listitem>
2892
2893     <listitem>
2894      <para>
2895       Behave correctly if <literal>ORDER BY</>, <literal>LIMIT</>,
2896       <literal>FOR UPDATE</>, or <literal>WITH</> is attached to the
2897       <literal>VALUES</> part of <literal>INSERT ... VALUES</> (Tom Lane)
2898      </para>
2899     </listitem>
2900
2901     <listitem>
2902      <para>
2903       Fix constant-folding of <literal>COALESCE()</> expressions (Tom Lane)
2904      </para>
2905
2906      <para>
2907       The planner would sometimes attempt to evaluate sub-expressions that
2908       in fact could never be reached, possibly leading to unexpected errors.
2909      </para>
2910     </listitem>
2911
2912     <listitem>
2913      <para>
2914       Fix postmaster crash when connection acceptance
2915       (<function>accept()</> or one of the calls made immediately after it)
2916       fails, and the postmaster was compiled with GSSAPI support (Alexander
2917       Chernikov)
2918      </para>
2919     </listitem>
2920
2921     <listitem>
2922      <para>
2923       Fix missed unlink of temporary files when <varname>log_temp_files</>
2924       is active (Tom Lane)
2925      </para>
2926
2927      <para>
2928       If an error occurred while attempting to emit the log message, the
2929       unlink was not done, resulting in accumulation of temp files.
2930      </para>
2931     </listitem>
2932
2933     <listitem>
2934      <para>
2935       Add print functionality for <structname>InhRelation</> nodes (Tom Lane)
2936      </para>
2937
2938      <para>
2939       This avoids a failure when <varname>debug_print_parse</> is enabled
2940       and certain types of query are executed.
2941      </para>
2942     </listitem>
2943
2944     <listitem>
2945      <para>
2946       Fix incorrect calculation of distance from a point to a horizontal
2947       line segment (Tom Lane)
2948      </para>
2949
2950      <para>
2951       This bug affected several different geometric distance-measurement
2952       operators.
2953      </para>
2954     </listitem>
2955
2956     <listitem>
2957      <para>
2958       Fix incorrect calculation of transaction status in
2959       <application>ecpg</> (Itagaki Takahiro)
2960      </para>
2961     </listitem>
2962
2963     <listitem>
2964      <para>
2965       Fix <application>PL/pgSQL</>'s handling of <quote>simple</>
2966       expressions to not fail in recursion or error-recovery cases (Tom Lane)
2967      </para>
2968     </listitem>
2969
2970     <listitem>
2971      <para>
2972       Fix <application>PL/Python</>'s handling of set-returning functions
2973       (Jan Urbanski)
2974      </para>
2975
2976      <para>
2977       Attempts to call SPI functions within the iterator generating a set
2978       result would fail.
2979      </para>
2980     </listitem>
2981
2982     <listitem>
2983      <para>
2984       Fix bug in <filename>contrib/cube</>'s GiST picksplit algorithm
2985       (Alexander Korotkov)
2986      </para>
2987
2988      <para>
2989       This could result in considerable inefficiency, though not actually
2990       incorrect answers, in a GiST index on a <type>cube</> column.
2991       If you have such an index, consider <command>REINDEX</>ing it after
2992       installing this update.
2993      </para>
2994     </listitem>
2995
2996     <listitem>
2997      <para>
2998       Don't emit <quote>identifier will be truncated</> notices in
2999       <filename>contrib/dblink</> except when creating new connections
3000       (Itagaki Takahiro)
3001      </para>
3002     </listitem>
3003
3004     <listitem>
3005      <para>
3006       Fix potential coredump on missing public key in
3007       <filename>contrib/pgcrypto</> (Marti Raudsepp)
3008      </para>
3009     </listitem>
3010
3011     <listitem>
3012      <para>
3013       Fix memory leak in <filename>contrib/xml2</>'s XPath query functions
3014       (Tom Lane)
3015      </para>
3016     </listitem>
3017
3018     <listitem>
3019      <para>
3020       Update time zone data files to <application>tzdata</> release 2010o
3021       for DST law changes in Fiji and Samoa;
3022       also historical corrections for Hong Kong.
3023      </para>
3024     </listitem>
3025
3026    </itemizedlist>
3027
3028   </sect2>
3029  </sect1>
3030
3031  <sect1 id="release-8-4-5">
3032   <title>Release 8.4.5</title>
3033
3034   <note>
3035   <title>Release Date</title>
3036   <simpara>2010-10-04</simpara>
3037   </note>
3038
3039   <para>
3040    This release contains a variety of fixes from 8.4.4.
3041    For information about new features in the 8.4 major release, see
3042    <xref linkend="release-8-4">.
3043   </para>
3044
3045   <sect2>
3046    <title>Migration to Version 8.4.5</title>
3047
3048    <para>
3049     A dump/restore is not required for those running 8.4.X.
3050     However, if you are upgrading from a version earlier than 8.4.2,
3051     see the release notes for 8.4.2.
3052    </para>
3053
3054   </sect2>
3055
3056   <sect2>
3057    <title>Changes</title>
3058
3059    <itemizedlist>
3060
3061     <listitem>
3062      <para>
3063       Use a separate interpreter for each calling SQL userid in PL/Perl and
3064       PL/Tcl (Tom Lane)
3065      </para>
3066
3067      <para>
3068       This change prevents security problems that can be caused by subverting
3069       Perl or Tcl code that will be executed later in the same session under
3070       another SQL user identity (for example, within a <literal>SECURITY
3071       DEFINER</> function).  Most scripting languages offer numerous ways that
3072       that might be done, such as redefining standard functions or operators
3073       called by the target function.  Without this change, any SQL user with
3074       Perl or Tcl language usage rights can do essentially anything with the
3075       SQL privileges of the target function's owner.
3076      </para>
3077
3078      <para>
3079       The cost of this change is that intentional communication among Perl
3080       and Tcl functions becomes more difficult.  To provide an escape hatch,
3081       PL/PerlU and PL/TclU functions continue to use only one interpreter
3082       per session.  This is not considered a security issue since all such
3083       functions execute at the trust level of a database superuser already.
3084      </para>
3085
3086      <para>
3087       It is likely that third-party procedural languages that claim to offer
3088       trusted execution have similar security issues.  We advise contacting
3089       the authors of any PL you are depending on for security-critical
3090       purposes.
3091      </para>
3092
3093      <para>
3094       Our thanks to Tim Bunce for pointing out this issue (CVE-2010-3433).
3095      </para>
3096     </listitem>
3097
3098     <listitem>
3099      <para>
3100       Prevent possible crashes in <function>pg_get_expr()</> by disallowing
3101       it from being called with an argument that is not one of the system
3102       catalog columns it's intended to be used with
3103       (Heikki Linnakangas, Tom Lane)
3104      </para>
3105     </listitem>
3106
3107     <listitem>
3108      <para>
3109       Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</>) as non-fatal on
3110       Windows (Magnus Hagander)
3111      </para>
3112
3113      <para>
3114       Under high load, Windows processes will sometimes fail at startup with
3115       this error code.  Formerly the postmaster treated this as a panic
3116       condition and restarted the whole database, but that seems to be
3117       an overreaction.
3118      </para>
3119     </listitem>
3120
3121     <listitem>
3122      <para>
3123       Fix incorrect placement of placeholder evaluation (Tom Lane)
3124      </para>
3125
3126      <para>
3127       This bug could result in query outputs being non-null when they
3128       should be null, in cases where the inner side of an outer join
3129       is a sub-select with non-strict expressions in its output list.
3130      </para>
3131     </listitem>
3132
3133     <listitem>
3134      <para>
3135       Fix possible duplicate scans of <literal>UNION ALL</> member relations
3136       (Tom Lane)
3137      </para>
3138     </listitem>
3139
3140     <listitem>
3141      <para>
3142       Fix <quote>cannot handle unplanned sub-select</quote> error (Tom Lane)
3143      </para>
3144
3145      <para>
3146       This occurred when a sub-select contains a join alias reference that
3147       expands into an expression containing another sub-select.
3148      </para>
3149     </listitem>
3150
3151     <listitem>
3152      <para>
3153       Fix mishandling of whole-row Vars that reference a view or sub-select
3154       and appear within a nested sub-select (Tom Lane)
3155      </para>
3156     </listitem>
3157
3158     <listitem>
3159      <para>
3160       Fix mishandling of cross-type <literal>IN</> comparisons (Tom Lane)
3161      </para>
3162
3163      <para>
3164       This could result in failures if the planner tried to implement an
3165       <literal>IN</> join with a sort-then-unique-then-plain-join plan.
3166      </para>
3167     </listitem>
3168
3169     <listitem>
3170      <para>
3171       Fix computation of <command>ANALYZE</> statistics for <type>tsvector</>
3172       columns (Jan Urbanski)
3173      </para>
3174
3175      <para>
3176       The original coding could produce incorrect statistics, leading to
3177       poor plan choices later.
3178      </para>
3179     </listitem>
3180
3181     <listitem>
3182      <para>
3183       Improve planner's estimate of memory used by <function>array_agg()</>,
3184       <function>string_agg()</>, and similar aggregate functions
3185       (Hitoshi Harada)
3186      </para>
3187
3188      <para>
3189       The previous drastic underestimate could lead to out-of-memory failures
3190       due to inappropriate choice of a hash-aggregation plan.
3191      </para>
3192     </listitem>
3193
3194     <listitem>
3195      <para>
3196       Fix failure to mark cached plans as transient (Tom Lane)
3197      </para>
3198
3199      <para>
3200       If a plan is prepared while <command>CREATE INDEX CONCURRENTLY</> is
3201       in progress for one of the referenced tables, it is supposed to be
3202       re-planned once the index is ready for use.  This was not happening
3203       reliably.
3204      </para>
3205     </listitem>
3206
3207     <listitem>
3208      <para>
3209       Reduce PANIC to ERROR in some occasionally-reported btree failure cases,
3210       and provide additional detail in the resulting error messages
3211       (Tom Lane)
3212      </para>
3213
3214      <para>
3215       This should improve the system's robustness with corrupted indexes.
3216      </para>
3217     </listitem>
3218
3219     <listitem>
3220      <para>
3221       Fix incorrect search logic for partial-match queries with GIN indexes
3222       (Tom Lane)
3223      </para>
3224
3225      <para>
3226       Cases involving AND/OR combination of several GIN index conditions
3227       didn't always give the right answer, and were sometimes much slower
3228       than necessary.
3229      </para>
3230     </listitem>
3231
3232     <listitem>
3233      <para>
3234       Prevent show_session_authorization() from crashing within autovacuum
3235       processes (Tom Lane)
3236      </para>
3237     </listitem>
3238
3239     <listitem>
3240      <para>
3241       Defend against functions returning setof record where not all the
3242       returned rows are actually of the same rowtype (Tom Lane)
3243      </para>
3244     </listitem>
3245
3246     <listitem>
3247      <para>
3248       Fix possible corruption of pending trigger event lists during
3249       subtransaction rollback (Tom Lane)
3250      </para>
3251
3252      <para>
3253       This could lead to a crash or incorrect firing of triggers.
3254      </para>
3255     </listitem>
3256
3257     <listitem>
3258      <para>
3259       Fix possible failure when hashing a pass-by-reference function result
3260       (Tao Ma, Tom Lane)
3261      </para>
3262     </listitem>
3263
3264     <listitem>
3265      <para>
3266       Improve merge join's handling of NULLs in the join columns (Tom Lane)
3267      </para>
3268
3269      <para>
3270       A merge join can now stop entirely upon reaching the first NULL,
3271       if the sort order is such that NULLs sort high.
3272      </para>
3273     </listitem>
3274
3275     <listitem>
3276      <para>
3277       Take care to fsync the contents of lockfiles (both
3278       <filename>postmaster.pid</> and the socket lockfile) while writing them
3279       (Tom Lane)
3280      </para>
3281
3282      <para>
3283       This omission could result in corrupted lockfile contents if the
3284       machine crashes shortly after postmaster start.  That could in turn
3285       prevent subsequent attempts to start the postmaster from succeeding,
3286       until the lockfile is manually removed.
3287      </para>
3288     </listitem>
3289
3290     <listitem>
3291      <para>
3292       Avoid recursion while assigning XIDs to heavily-nested
3293       subtransactions (Andres Freund, Robert Haas)
3294      </para>
3295
3296      <para>
3297       The original coding could result in a crash if there was limited
3298       stack space.
3299      </para>
3300     </listitem>
3301
3302     <listitem>
3303      <para>
3304       Avoid holding open old WAL segments in the walwriter process
3305       (Magnus Hagander, Heikki Linnakangas)
3306      </para>
3307
3308      <para>
3309       The previous coding would prevent removal of no-longer-needed segments.
3310      </para>
3311     </listitem>
3312
3313     <listitem>
3314      <para>
3315       Fix <varname>log_line_prefix</>'s <literal>%i</> escape,
3316       which could produce junk early in backend startup (Tom Lane)
3317      </para>
3318     </listitem>
3319
3320     <listitem>
3321      <para>
3322       Prevent misinterpretation of partially-specified relation options
3323       for TOAST tables (Itagaki Takahiro)
3324      </para>
3325
3326      <para>
3327       In particular, <literal>fillfactor</> would be read as zero if any
3328       other reloption had been set for the table, leading to serious bloat.
3329      </para>
3330     </listitem>
3331
3332     <listitem>
3333      <para>
3334       Fix inheritance count tracking in <command>ALTER TABLE ... ADD
3335       CONSTRAINT</> (Robert Haas)
3336      </para>
3337     </listitem>
3338
3339     <listitem>
3340      <para>
3341       Fix possible data corruption in <command>ALTER TABLE ... SET
3342       TABLESPACE</> when archiving is enabled (Jeff Davis)
3343      </para>
3344     </listitem>
3345
3346     <listitem>
3347      <para>
3348       Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET
3349       TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge)
3350      </para>
3351     </listitem>
3352
3353     <listitem>
3354      <para>
3355       Improve <command>CREATE INDEX</>'s checking of whether proposed index
3356       expressions are immutable (Tom Lane)
3357      </para>
3358     </listitem>
3359
3360     <listitem>
3361      <para>
3362       Fix <command>REASSIGN OWNED</> to handle operator classes and families
3363       (Asko Tiidumaa)
3364      </para>
3365     </listitem>
3366
3367     <listitem>
3368      <para>
3369       Fix possible core dump when comparing two empty <type>tsquery</> values
3370       (Tom Lane)
3371      </para>
3372     </listitem>
3373
3374     <listitem>
3375      <para>
3376       Fix <literal>LIKE</>'s handling of patterns containing <literal>%</>
3377       followed by <literal>_</> (Tom Lane)
3378      </para>
3379
3380      <para>
3381       We've fixed this before, but there were still some incorrectly-handled
3382       cases.
3383      </para>
3384     </listitem>
3385
3386     <listitem>
3387      <para>
3388       Re-allow input of Julian dates prior to 0001-01-01 AD (Tom Lane)
3389      </para>
3390
3391      <para>
3392       Input such as <literal>'J100000'::date</> worked before 8.4,
3393       but was unintentionally broken by added error-checking.
3394      </para>
3395     </listitem>
3396
3397     <listitem>
3398      <para>
3399       Fix PL/pgSQL to throw an error, not crash, if a cursor is closed within
3400       a <literal>FOR</> loop that is iterating over that cursor
3401       (Heikki Linnakangas)
3402      </para>
3403     </listitem>
3404
3405     <listitem>
3406      <para>
3407       In PL/Python, defend against null pointer results from
3408       <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</>
3409       (Peter Eisentraut)
3410      </para>
3411     </listitem>
3412
3413     <listitem>
3414      <para>
3415       In <application>libpq</>, fix full SSL certificate verification for the
3416       case where both <literal>host</> and <literal>hostaddr</> are specified
3417       (Tom Lane)
3418      </para>
3419     </listitem>
3420
3421     <listitem>
3422      <para>
3423       Make psql recognize <command>DISCARD ALL</> as a command that should
3424       not be encased in a transaction block in autocommit-off mode
3425       (Itagaki Takahiro)
3426      </para>
3427     </listitem>
3428
3429     <listitem>
3430      <para>
3431       Fix some issues in <application>pg_dump</>'s handling of SQL/MED objects
3432       (Tom Lane)
3433      </para>
3434
3435      <para>
3436       Notably, <application>pg_dump</> would always fail if run by a
3437       non-superuser, which was not intended.
3438      </para>
3439     </listitem>
3440
3441     <listitem>
3442      <para>
3443       Improve <application>pg_dump</> and <application>pg_restore</>'s
3444       handling of non-seekable archive files (Tom Lane, Robert Haas)
3445      </para>
3446
3447      <para>
3448       This is important for proper functioning of parallel restore.
3449      </para>
3450     </listitem>
3451
3452     <listitem>
3453      <para>
3454       Improve parallel pg_restore's ability to cope with selective restore
3455       (<literal>-L</> option) (Tom Lane)
3456      </para>
3457
3458      <para>
3459       The original code tended to fail if the <literal>-L</> file commanded
3460       a non-default restore ordering.
3461      </para>
3462     </listitem>
3463
3464     <listitem>
3465      <para>
3466       Fix <application>ecpg</> to process data from <literal>RETURNING</>
3467       clauses correctly (Michael Meskes)
3468      </para>
3469     </listitem>
3470
3471     <listitem>
3472      <para>
3473       Fix some memory leaks in <application>ecpg</> (Zoltan Boszormenyi)
3474      </para>
3475     </listitem>
3476
3477     <listitem>
3478      <para>
3479       Improve <filename>contrib/dblink</>'s handling of tables containing
3480       dropped columns (Tom Lane)
3481      </para>
3482     </listitem>
3483
3484     <listitem>
3485      <para>
3486       Fix connection leak after <quote>duplicate connection name</quote>
3487       errors in <filename>contrib/dblink</> (Itagaki Takahiro)
3488      </para>
3489     </listitem>
3490
3491     <listitem>
3492      <para>
3493       Fix <filename>contrib/dblink</> to handle connection names longer than
3494       62 bytes correctly (Itagaki Takahiro)
3495      </para>
3496     </listitem>
3497
3498     <listitem>
3499      <para>
3500       Add <function>hstore(text, text)</>
3501       function to <filename>contrib/hstore</> (Robert Haas)
3502      </para>
3503
3504      <para>
3505       This function is the recommended substitute for the now-deprecated
3506       <literal>=&gt;</> operator.  It was back-patched so that future-proofed
3507       code can be used with older server versions.  Note that the patch will
3508       be effective only after <filename>contrib/hstore</> is installed or
3509       reinstalled in a particular database.  Users might prefer to execute
3510       the <command>CREATE FUNCTION</> command by hand, instead.
3511      </para>
3512     </listitem>
3513
3514     <listitem>
3515      <para>
3516       Update build infrastructure and documentation to reflect the source code
3517       repository's move from CVS to Git (Magnus Hagander and others)
3518      </para>
3519     </listitem>
3520
3521     <listitem>
3522      <para>
3523       Update time zone data files to <application>tzdata</> release 2010l
3524       for DST law changes in Egypt and Palestine; also historical corrections
3525       for Finland.
3526      </para>
3527
3528      <para>
3529       This change also adds new names for two Micronesian timezones:
3530       Pacific/Chuuk is now preferred over Pacific/Truk (and the preferred
3531       abbreviation is CHUT not TRUT) and Pacific/Pohnpei is preferred over
3532       Pacific/Ponape.
3533      </para>
3534     </listitem>
3535
3536     <listitem>
3537      <para>
3538       Make Windows' <quote>N. Central Asia Standard Time</> timezone map to
3539       Asia/Novosibirsk, not Asia/Almaty (Magnus Hagander)
3540      </para>
3541
3542      <para>
3543       Microsoft changed the DST behavior of this zone in the timezone update
3544       from KB976098. Asia/Novosibirsk is a better match to its new behavior.
3545      </para>
3546     </listitem>
3547
3548    </itemizedlist>
3549
3550   </sect2>
3551  </sect1>
3552
3553  <sect1 id="release-8-4-4">
3554   <title>Release 8.4.4</title>
3555
3556   <note>
3557   <title>Release Date</title>
3558   <simpara>2010-05-17</simpara>
3559   </note>
3560
3561   <para>
3562    This release contains a variety of fixes from 8.4.3.
3563    For information about new features in the 8.4 major release, see
3564    <xref linkend="release-8-4">.
3565   </para>
3566
3567   <sect2>
3568    <title>Migration to Version 8.4.4</title>
3569
3570    <para>
3571     A dump/restore is not required for those running 8.4.X.
3572     However, if you are upgrading from a version earlier than 8.4.2,
3573     see the release notes for 8.4.2.
3574    </para>
3575
3576   </sect2>
3577
3578   <sect2>
3579    <title>Changes</title>
3580
3581    <itemizedlist>
3582
3583     <listitem>
3584      <para>
3585       Enforce restrictions in <literal>plperl</> using an opmask applied to
3586       the whole interpreter, instead of using <filename>Safe.pm</>
3587       (Tim Bunce, Andrew Dunstan)
3588      </para>
3589
3590      <para>
3591       Recent developments have convinced us that <filename>Safe.pm</> is too
3592       insecure to rely on for making <literal>plperl</> trustable.  This
3593       change removes use of <filename>Safe.pm</> altogether, in favor of using
3594       a separate interpreter with an opcode mask that is always applied.
3595       Pleasant side effects of the change include that it is now possible to
3596       use Perl's <literal>strict</> pragma in a natural way in
3597       <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</>
3598       variables work as expected in sort routines, and that function
3599       compilation is significantly faster.  (CVE-2010-1169)
3600      </para>
3601     </listitem>
3602
3603     <listitem>
3604      <para>
3605       Prevent PL/Tcl from executing untrustworthy code from
3606       <structname>pltcl_modules</> (Tom)
3607      </para>
3608
3609      <para>
3610       PL/Tcl's feature for autoloading Tcl code from a database table
3611       could be exploited for trojan-horse attacks, because there was no
3612       restriction on who could create or insert into that table.  This change
3613       disables the feature unless <structname>pltcl_modules</> is owned by a
3614       superuser.  (However, the permissions on the table are not checked, so
3615       installations that really need a less-than-secure modules table can
3616       still grant suitable privileges to trusted non-superusers.)  Also,
3617       prevent loading code into the unrestricted <quote>normal</> Tcl
3618       interpreter unless we are really going to execute a <literal>pltclu</>
3619       function.  (CVE-2010-1170)
3620      </para>
3621     </listitem>
3622
3623     <listitem>
3624      <para>
3625       Fix data corruption during WAL replay of
3626       <literal>ALTER ... SET TABLESPACE</> (Tom)
3627      </para>
3628
3629      <para>
3630       When <varname>archive_mode</> is on, <literal>ALTER ... SET TABLESPACE</>
3631       generates a WAL record whose replay logic was incorrect.  It could write
3632       the data to the wrong place, leading to possibly-unrecoverable data
3633       corruption.  Data corruption would be observed on standby slaves, and
3634       could occur on the master as well if a database crash and recovery
3635       occurred after committing the <literal>ALTER</> and before the next
3636       checkpoint.
3637      </para>
3638     </listitem>
3639
3640     <listitem>
3641      <para>
3642       Fix possible crash if a cache reset message is received during
3643       rebuild of a relcache entry (Heikki)
3644      </para>
3645
3646      <para>
3647       This error was introduced in 8.4.3 while fixing a related failure.
3648      </para>
3649     </listitem>
3650
3651     <listitem>
3652      <para>
3653       Apply per-function GUC settings while running the language validator
3654       for the function (Itagaki Takahiro)
3655      </para>
3656
3657      <para>
3658       This avoids failures if the function's code is invalid without the
3659       setting; an example is that SQL functions may not parse if the
3660       <varname>search_path</> is not correct.
3661      </para>
3662     </listitem>
3663
3664     <listitem>
3665      <para>
3666       Do constraint exclusion for inherited <command>UPDATE</> and
3667       <command>DELETE</> target tables when
3668       <varname>constraint_exclusion</> = <literal>partition</> (Tom)
3669      </para>
3670
3671      <para>
3672       Due to an oversight, this setting previously only caused constraint
3673       exclusion to be checked in <command>SELECT</> commands.
3674      </para>
3675     </listitem>
3676
3677     <listitem>
3678      <para>
3679       Do not allow an unprivileged user to reset superuser-only parameter
3680       settings (Alvaro)
3681      </para>
3682
3683      <para>
3684       Previously, if an unprivileged user ran <literal>ALTER USER ... RESET
3685       ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for
3686       a database he owns, this would remove all special parameter settings
3687       for the user or database, even ones that are only supposed to be
3688       changeable by a superuser.  Now, the <command>ALTER</> will only
3689       remove the parameters that the user has permission to change.
3690      </para>
3691     </listitem>
3692
3693     <listitem>
3694      <para>
3695       Avoid possible crash during backend shutdown if shutdown occurs
3696       when a <literal>CONTEXT</> addition would be made to log entries (Tom)
3697      </para>
3698
3699      <para>
3700       In some cases the context-printing function would fail because the
3701       current transaction had already been rolled back when it came time
3702       to print a log message.
3703      </para>
3704     </listitem>
3705
3706     <listitem>
3707      <para>
3708       Fix erroneous handling of <literal>%r</> parameter in
3709       <varname>recovery_end_command</> (Heikki)
3710      </para>
3711
3712      <para>
3713       The value always came out zero.
3714      </para>
3715     </listitem>
3716
3717     <listitem>
3718      <para>
3719       Ensure the archiver process responds to changes in
3720       <varname>archive_command</> as soon as possible (Tom)
3721      </para>
3722     </listitem>
3723
3724     <listitem>
3725      <para>
3726       Fix pl/pgsql's <literal>CASE</> statement to not fail when the
3727       case expression is a query that returns no rows (Tom)
3728      </para>
3729     </listitem>
3730
3731     <listitem>
3732      <para>
3733       Update pl/perl's <filename>ppport.h</> for modern Perl versions
3734       (Andrew)
3735      </para>
3736     </listitem>
3737
3738     <listitem>
3739      <para>
3740       Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
3741      </para>
3742     </listitem>
3743
3744     <listitem>
3745      <para>
3746       Handle empty-string connect parameters properly in ecpg (Michael)
3747      </para>
3748     </listitem>
3749
3750     <listitem>
3751      <para>
3752       Prevent infinite recursion in <application>psql</> when expanding
3753       a variable that refers to itself (Tom)
3754      </para>
3755     </listitem>
3756
3757     <listitem>
3758      <para>
3759       Fix <application>psql</>'s <literal>\copy</> to not add spaces around
3760       a dot within <literal>\copy (select ...)</> (Tom)
3761      </para>
3762
3763      <para>
3764       Addition of spaces around the decimal point in a numeric literal would
3765       result in a syntax error.
3766      </para>
3767     </listitem>
3768
3769     <listitem>
3770      <para>
3771       Avoid formatting failure in <application>psql</> when running in a
3772       locale context that doesn't match the <varname>client_encoding</>
3773       (Tom)
3774      </para>
3775     </listitem>
3776
3777     <listitem>
3778      <para>
3779       Fix unnecessary <quote>GIN indexes do not support whole-index scans</>
3780       errors for unsatisfiable queries using <filename>contrib/intarray</>
3781       operators (Tom)
3782      </para>
3783     </listitem>
3784
3785     <listitem>
3786      <para>
3787       Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
3788       interrupts promptly (Tatsuhito Kasahara)
3789      </para>
3790     </listitem>
3791
3792     <listitem>
3793      <para>
3794       Make server startup deal properly with the case that
3795       <function>shmget()</> returns <literal>EINVAL</> for an existing
3796       shared memory segment (Tom)
3797      </para>
3798
3799      <para>
3800       This behavior has been observed on BSD-derived kernels including OS X.
3801       It resulted in an entirely-misleading startup failure complaining that
3802       the shared memory request size was too large.
3803      </para>
3804     </listitem>
3805
3806     <listitem>
3807      <para>
3808       Avoid possible crashes in syslogger process on Windows (Heikki)
3809      </para>
3810     </listitem>
3811
3812     <listitem>
3813      <para>
3814       Deal more robustly with incomplete time zone information in the
3815       Windows registry (Magnus)
3816      </para>
3817     </listitem>
3818
3819     <listitem>
3820      <para>
3821       Update the set of known Windows time zone names (Magnus)
3822      </para>
3823     </listitem>
3824
3825     <listitem>
3826      <para>
3827       Update time zone data files to <application>tzdata</> release 2010j
3828       for DST law changes in Argentina, Australian Antarctic, Bangladesh,
3829       Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia;
3830       also historical corrections for Taiwan.
3831      </para>
3832
3833      <para>
3834       Also, add <literal>PKST</> (Pakistan Summer Time) to the default set of
3835       timezone abbreviations.
3836      </para>
3837     </listitem>
3838
3839    </itemizedlist>
3840
3841   </sect2>
3842  </sect1>
3843
3844  <sect1 id="release-8-4-3">
3845   <title>Release 8.4.3</title>
3846
3847   <note>
3848   <title>Release Date</title>
3849   <simpara>2010-03-15</simpara>
3850   </note>
3851
3852   <para>
3853    This release contains a variety of fixes from 8.4.2.
3854    For information about new features in the 8.4 major release, see
3855    <xref linkend="release-8-4">.
3856   </para>
3857
3858   <sect2>
3859    <title>Migration to Version 8.4.3</title>
3860
3861    <para>
3862     A dump/restore is not required for those running 8.4.X.
3863     However, if you are upgrading from a version earlier than 8.4.2,
3864     see the release notes for 8.4.2.
3865    </para>
3866
3867   </sect2>
3868
3869   <sect2>
3870    <title>Changes</title>
3871
3872    <itemizedlist>
3873
3874     <listitem>
3875      <para>
3876       Add new configuration parameter <varname>ssl_renegotiation_limit</> to
3877       control how often we do session key renegotiation for an SSL connection
3878       (Magnus)
3879      </para>
3880
3881      <para>
3882       This can be set to zero to disable renegotiation completely, which may
3883       be required if a broken SSL library is used.  In particular, some
3884       vendors are shipping stopgap patches for CVE-2009-3555 that cause
3885       renegotiation attempts to fail.
3886      </para>
3887     </listitem>
3888
3889     <listitem>
3890      <para>
3891       Fix possible deadlock during backend startup (Tom)
3892      </para>
3893     </listitem>
3894
3895     <listitem>
3896      <para>
3897       Fix possible crashes due to not handling errors during relcache reload
3898       cleanly (Tom)
3899      </para>
3900     </listitem>
3901
3902     <listitem>
3903      <para>
3904       Fix possible crash due to use of dangling pointer to a cached plan
3905       (Tatsuo)
3906      </para>
3907     </listitem>
3908
3909     <listitem>
3910      <para>
3911       Fix possible crash due to overenthusiastic invalidation of cached
3912       plan for <command>ROLLBACK</> (Tom)
3913      </para>
3914     </listitem>
3915
3916     <listitem>
3917      <para>
3918       Fix possible crashes when trying to recover from a failure in
3919       subtransaction start (Tom)
3920      </para>
3921     </listitem>
3922
3923     <listitem>
3924      <para>
3925       Fix server memory leak associated with use of savepoints and a client
3926       encoding different from server's encoding (Tom)
3927      </para>
3928     </listitem>
3929
3930     <listitem>
3931      <para>
3932       Fix incorrect WAL data emitted during end-of-recovery cleanup of a GIST
3933       index page split (Yoichi Hirai)
3934      </para>
3935
3936      <para>
3937       This would result in index corruption, or even more likely an error
3938       during WAL replay, if we were unlucky enough to crash during
3939       end-of-recovery cleanup after having completed an incomplete GIST
3940       insertion.
3941      </para>
3942     </listitem>
3943
3944     <listitem>
3945      <para>
3946       Fix bug in WAL redo cleanup method for GIN indexes (Heikki)
3947      </para>
3948     </listitem>
3949
3950     <listitem>
3951      <para>
3952       Fix incorrect comparison of scan key in GIN index search (Teodor)
3953      </para>
3954     </listitem>
3955
3956     <listitem>
3957      <para>
3958       Make <function>substring()</> for <type>bit</> types treat any negative
3959       length as meaning <quote>all the rest of the string</> (Tom)
3960      </para>
3961
3962      <para>
3963       The previous coding treated only -1 that way, and would produce an
3964       invalid result value for other negative values, possibly leading to
3965       a crash (CVE-2010-0442).
3966      </para>
3967     </listitem>
3968
3969     <listitem>
3970      <para>
3971       Fix integer-to-bit-string conversions to handle the first fractional
3972       byte correctly when the output bit width is wider than the given
3973       integer by something other than a multiple of 8 bits (Tom)
3974      </para>
3975     </listitem>
3976
3977     <listitem>
3978      <para>
3979       Fix some cases of pathologically slow regular expression matching (Tom)
3980      </para>
3981     </listitem>
3982
3983     <listitem>
3984      <para>
3985       Fix bug occurring when trying to inline a SQL function that returns
3986       a set of a composite type that contains dropped columns (Tom)
3987      </para>
3988     </listitem>
3989
3990     <listitem>
3991      <para>
3992       Fix bug with trying to update a field of an element of a
3993       composite-type array column (Tom)
3994      </para>
3995     </listitem>
3996
3997     <listitem>
3998      <para>
3999       Avoid failure when <command>EXPLAIN</> has to print a FieldStore or
4000       assignment ArrayRef expression (Tom)
4001      </para>
4002
4003      <para>
4004       These cases can arise now that <command>EXPLAIN VERBOSE</> tries to
4005       print plan node target lists.
4006      </para>
4007     </listitem>
4008
4009     <listitem>
4010      <para>
4011       Avoid an unnecessary coercion failure in some cases where an undecorated
4012       literal string appears in a subquery within
4013       <command>UNION</>/<command>INTERSECT</>/<command>EXCEPT</> (Tom)
4014      </para>
4015
4016      <para>
4017       This fixes a regression for some cases that worked before 8.4.
4018      </para>
4019     </listitem>
4020
4021     <listitem>
4022      <para>
4023       Avoid undesirable rowtype compatibility check failures in some cases
4024       where a whole-row Var has a rowtype that contains dropped columns (Tom)
4025      </para>
4026     </listitem>
4027
4028     <listitem>
4029      <para>
4030       Fix the <literal>STOP WAL LOCATION</> entry in backup history files to
4031       report the next WAL segment's name when the end location is exactly at a
4032       segment boundary (Itagaki Takahiro)
4033      </para>
4034     </listitem>
4035
4036     <listitem>
4037      <para>
4038       Always pass the catalog ID to an option validator function specified in
4039       <command>CREATE FOREIGN DATA WRAPPER</> (Martin Pihlak)
4040      </para>
4041     </listitem>
4042
4043     <listitem>
4044      <para>
4045       Fix some more cases of temporary-file leakage (Heikki)
4046      </para>
4047
4048      <para>
4049       This corrects a problem introduced in the previous minor release.
4050       One case that failed is when a plpgsql function returning set is
4051       called within another function's exception handler.
4052      </para>
4053     </listitem>
4054
4055     <listitem>
4056      <para>
4057       Add support for doing <literal>FULL JOIN ON FALSE</> (Tom)
4058      </para>
4059
4060      <para>
4061       This prevents a regression from pre-8.4 releases for some queries that
4062       can now be simplified to a constant-false join condition.
4063      </para>
4064     </listitem>
4065
4066     <listitem>
4067      <para>
4068       Improve constraint exclusion processing of boolean-variable cases,
4069       in particular make it possible to exclude a partition that has a
4070       <quote>bool_column = false</> constraint (Tom)
4071      </para>
4072     </listitem>
4073
4074     <listitem>
4075      <para>
4076       Prevent treating an <literal>INOUT</> cast as representing binary
4077       compatibility (Heikki)
4078      </para>
4079     </listitem>
4080
4081     <listitem>
4082      <para>
4083       Include column name in the message when warning about inability to
4084       grant or revoke column-level privileges (Stephen Frost)
4085      </para>
4086
4087      <para>
4088       This is more useful than before and helps to prevent confusion when
4089       a <command>REVOKE</> generates multiple messages, which formerly
4090       appeared to be duplicates.
4091      </para>
4092     </listitem>
4093
4094     <listitem>
4095      <para>
4096       When reading <filename>pg_hba.conf</> and related files, do not treat
4097       <literal>@something</> as a file inclusion request if the <literal>@</>
4098       appears inside quote marks; also, never treat <literal>@</> by itself
4099       as a file inclusion request (Tom)
4100      </para>
4101
4102      <para>
4103       This prevents erratic behavior if a role or database name starts with
4104       <literal>@</>.  If you need to include a file whose path name
4105       contains spaces, you can still do so, but you must write
4106       <literal>@"/path to/file"</> rather than putting the quotes around
4107       the whole construct.
4108      </para>
4109     </listitem>
4110
4111     <listitem>
4112      <para>
4113       Prevent infinite loop on some platforms if a directory is named as
4114       an inclusion target in <filename>pg_hba.conf</> and related files
4115       (Tom)
4116      </para>
4117     </listitem>
4118
4119     <listitem>
4120      <para>
4121       Fix possible infinite loop if <function>SSL_read</> or
4122       <function>SSL_write</> fails without setting <varname>errno</> (Tom)
4123      </para>
4124
4125      <para>
4126       This is reportedly possible with some Windows versions of
4127       <application>openssl</>.
4128      </para>
4129     </listitem>
4130
4131     <listitem>
4132      <para>
4133       Disallow <acronym>GSSAPI</> authentication on local connections,
4134       since it requires a hostname to function correctly (Magnus)
4135      </para>
4136     </listitem>
4137
4138     <listitem>
4139      <para>
4140       Protect <application>ecpg</> against applications freeing strings
4141       unexpectedly (Michael)
4142      </para>
4143     </listitem>
4144
4145     <listitem>
4146      <para>
4147       Make <application>ecpg</> report the proper SQLSTATE if the connection
4148       disappears (Michael)
4149      </para>
4150     </listitem>
4151
4152     <listitem>
4153      <para>
4154       Fix translation of cell contents in <application>psql</> <literal>\d</>
4155       output (Heikki)
4156      </para>
4157     </listitem>
4158
4159     <listitem>
4160      <para>
4161       Fix <application>psql</>'s <literal>numericlocale</> option to not
4162       format strings it shouldn't in latex and troff output formats (Heikki)
4163      </para>
4164     </listitem>
4165
4166     <listitem>
4167      <para>
4168       Fix a small per-query memory leak in <application>psql</> (Tom)
4169      </para>
4170     </listitem>
4171
4172     <listitem>
4173      <para>
4174       Make <application>psql</> return the correct exit status (3) when
4175       <literal>ON_ERROR_STOP</> and <literal>--single-transaction</> are
4176       both specified and an error occurs during the implied <command>COMMIT</>
4177       (Bruce)
4178      </para>
4179     </listitem>
4180
4181     <listitem>
4182      <para>
4183       Fix <application>pg_dump</>'s output of permissions for foreign servers
4184       (Heikki)
4185      </para>
4186     </listitem>
4187
4188     <listitem>
4189      <para>
4190       Fix possible crash in parallel <application>pg_restore</> due to
4191       out-of-range dependency IDs (Tom)
4192      </para>
4193     </listitem>
4194
4195     <listitem>
4196      <para>
4197       Fix plpgsql failure in one case where a composite column is set to NULL
4198       (Tom)
4199      </para>
4200     </listitem>
4201
4202     <listitem>
4203      <para>
4204       Fix possible failure when calling PL/Perl functions from PL/PerlU
4205       or vice versa (Tim Bunce)
4206      </para>
4207     </listitem>
4208
4209     <listitem>
4210      <para>
4211       Add <literal>volatile</> markings in PL/Python to avoid possible
4212       compiler-specific misbehavior (Zdenek Kotala)
4213      </para>
4214     </listitem>
4215
4216     <listitem>
4217      <para>
4218       Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
4219      </para>
4220
4221      <para>
4222       The only known symptom of this oversight is that the Tcl
4223       <literal>clock</> command misbehaves if using Tcl 8.5 or later.
4224      </para>
4225     </listitem>
4226
4227     <listitem>
4228      <para>
4229       Prevent <function>ExecutorEnd</> from being run on portals created
4230       within a failed transaction or subtransaction (Tom)
4231      </para>
4232
4233      <para>
4234       This is known to cause issues when using
4235       <filename>contrib/auto_explain</>.
4236      </para>
4237     </listitem>
4238
4239     <listitem>
4240      <para>
4241       Prevent crash in <filename>contrib/dblink</> when too many key
4242       columns are specified to a <function>dblink_build_sql_*</> function
4243       (Rushabh Lathia, Joe Conway)
4244      </para>
4245     </listitem>
4246
4247     <listitem>
4248      <para>
4249       Allow zero-dimensional arrays in <filename>contrib/ltree</> operations
4250       (Tom)
4251      </para>
4252
4253      <para>
4254       This case was formerly rejected as an error, but it's more convenient to
4255       treat it the same as a zero-element array.  In particular this avoids
4256       unnecessary failures when an <type>ltree</> operation is applied to the
4257       result of <literal>ARRAY(SELECT ...)</> and the sub-select returns no
4258       rows.
4259      </para>
4260     </listitem>
4261
4262     <listitem>
4263      <para>
4264       Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy
4265       memory management (Tom)
4266      </para>
4267     </listitem>
4268
4269     <listitem>
4270      <para>
4271       Make building of <filename>contrib/xml2</> more robust on Windows
4272       (Andrew)
4273      </para>
4274     </listitem>
4275
4276     <listitem>
4277      <para>
4278       Fix race condition in Windows signal handling (Radu Ilie)
4279      </para>
4280
4281      <para>
4282       One known symptom of this bug is that rows in <structname>pg_listener</>
4283       could be dropped under heavy load.
4284      </para>
4285     </listitem>
4286
4287     <listitem>
4288      <para>
4289       Make the configure script report failure if the C compiler does
4290       not provide a working 64-bit integer datatype (Tom)
4291      </para>
4292
4293      <para>
4294       This case has been broken for some time, and no longer seems worth
4295       supporting, so just reject it at configure time instead.
4296      </para>
4297     </listitem>
4298
4299     <listitem>
4300      <para>
4301       Update time zone data files to <application>tzdata</> release 2010e
4302       for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa.
4303      </para>
4304     </listitem>
4305
4306    </itemizedlist>
4307
4308   </sect2>
4309  </sect1>
4310
4311  <sect1 id="release-8-4-2">
4312   <title>Release 8.4.2</title>
4313
4314   <note>
4315   <title>Release Date</title>
4316   <simpara>2009-12-14</simpara>
4317   </note>
4318
4319   <para>
4320    This release contains a variety of fixes from 8.4.1.
4321    For information about new features in the 8.4 major release, see
4322    <xref linkend="release-8-4">.
4323   </para>
4324
4325   <sect2>
4326    <title>Migration to Version 8.4.2</title>
4327
4328    <para>
4329     A dump/restore is not required for those running 8.4.X.
4330     However, if you have any hash indexes,
4331     you should <command>REINDEX</> them after updating to 8.4.2,
4332     to repair possible damage.
4333    </para>
4334
4335   </sect2>
4336
4337   <sect2>
4338    <title>Changes</title>
4339
4340    <itemizedlist>
4341
4342     <listitem>
4343      <para>
4344       Protect against indirect security threats caused by index functions
4345       changing session-local state (Gurjeet Singh, Tom)
4346      </para>
4347
4348      <para>
4349       This change prevents allegedly-immutable index functions from possibly
4350       subverting a superuser's session (CVE-2009-4136).
4351      </para>
4352     </listitem>
4353
4354     <listitem>
4355      <para>
4356       Reject SSL certificates containing an embedded null byte in the common
4357       name (CN) field (Magnus)
4358      </para>
4359
4360      <para>
4361       This prevents unintended matching of a certificate to a server or client
4362       name during SSL validation (CVE-2009-4034).
4363      </para>
4364     </listitem>
4365
4366     <listitem>
4367      <para>
4368       Fix hash index corruption (Tom)
4369      </para>
4370
4371      <para>
4372       The 8.4 change that made hash indexes keep entries sorted by hash value
4373       failed to update the bucket splitting and compaction routines to
4374       preserve the ordering.  So application of either of those operations
4375       could lead to permanent corruption of an index, in the sense that
4376       searches might fail to find entries that are present.  To deal with
4377       this, it is recommended to <literal>REINDEX</> any hash indexes you may
4378       have after installing this update.
4379      </para>
4380     </listitem>
4381
4382     <listitem>
4383      <para>
4384       Fix possible crash during backend-startup-time cache initialization (Tom)
4385      </para>
4386     </listitem>
4387
4388     <listitem>
4389      <para>
4390       Avoid crash on empty thesaurus dictionary (Tom)
4391      </para>
4392     </listitem>
4393
4394     <listitem>
4395      <para>
4396       Prevent signals from interrupting <literal>VACUUM</> at unsafe times
4397       (Alvaro)
4398      </para>
4399
4400      <para>
4401       This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
4402       after it's already committed its tuple movements, as well as transient
4403       errors if a plain <literal>VACUUM</> is interrupted after having
4404       truncated the table.
4405      </para>
4406     </listitem>
4407
4408     <listitem>
4409      <para>
4410       Fix possible crash due to integer overflow in hash table size
4411       calculation (Tom)
4412      </para>
4413
4414      <para>
4415       This could occur with extremely large planner estimates for the size of
4416       a hashjoin's result.
4417      </para>
4418     </listitem>
4419
4420     <listitem>
4421      <para>
4422       Fix crash if a <literal>DROP</> is attempted on an internally-dependent
4423       object (Tom)
4424      </para>
4425     </listitem>
4426
4427     <listitem>
4428      <para>
4429       Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
4430       Mikkelson)
4431      </para>
4432     </listitem>
4433
4434     <listitem>
4435      <para>
4436       Ensure that shared tuple-level locks held by prepared transactions are
4437       not ignored (Heikki)
4438      </para>
4439     </listitem>
4440
4441     <listitem>
4442      <para>
4443       Fix premature drop of temporary files used for a cursor that is accessed
4444       within a subtransaction (Heikki)
4445      </para>
4446     </listitem>
4447
4448     <listitem>
4449      <para>
4450       Fix memory leak in syslogger process when rotating to a new CSV logfile
4451       (Tom)
4452      </para>
4453     </listitem>
4454
4455     <listitem>
4456      <para>
4457       Fix memory leak in postmaster when re-parsing <filename>pg_hba.conf</>
4458       (Tom)
4459      </para>
4460     </listitem>
4461
4462     <listitem>
4463      <para>
4464       Fix Windows permission-downgrade logic (Jesse Morris)
4465      </para>
4466
4467      <para>
4468       This fixes some cases where the database failed to start on Windows,
4469       often with misleading error messages such as <quote>could not locate
4470       matching postgres executable</quote>.
4471      </para>
4472     </listitem>
4473
4474     <listitem>
4475      <para>
4476       Make <literal>FOR UPDATE/SHARE</> in the primary query not propagate
4477       into <literal>WITH</> queries (Tom)
4478      </para>
4479
4480      <para>
4481       For example, in
4482 <programlisting>
4483 WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE
4484 </programlisting>
4485       the <literal>FOR UPDATE</> will now affect <literal>bar</> but not
4486       <literal>foo</>.  This is more useful and consistent than the original
4487       8.4 behavior, which tried to propagate <literal>FOR UPDATE</> into the
4488       <literal>WITH</> query but always failed due to assorted implementation
4489       restrictions.  It also follows the design rule that <literal>WITH</>
4490       queries are executed as if independent of the main query.
4491      </para>
4492     </listitem>
4493
4494     <listitem>
4495      <para>
4496       Fix bug with a <literal>WITH RECURSIVE</> query immediately inside
4497       another one (Tom)
4498      </para>
4499     </listitem>
4500
4501     <listitem>
4502      <para>
4503       Fix concurrency bug in hash indexes (Tom)
4504      </para>
4505
4506      <para>
4507       Concurrent insertions could cause index scans to transiently report
4508       wrong results.
4509      </para>
4510     </listitem>
4511
4512     <listitem>
4513      <para>
4514       Fix incorrect logic for GiST index page splits, when the split depends
4515       on a non-first column of the index (Paul Ramsey)
4516      </para>
4517     </listitem>
4518
4519     <listitem>
4520      <para>
4521       Fix wrong search results for a multi-column GIN index with
4522       <literal>fastupdate</> enabled (Teodor)
4523      </para>
4524     </listitem>
4525
4526     <listitem>
4527      <para>
4528       Fix bugs in WAL entry creation for GIN indexes (Tom)
4529      </para>
4530
4531      <para>
4532       These bugs were masked when <varname>full_page_writes</> was on, but
4533       with it off a WAL replay failure was certain if a crash occurred before
4534       the next checkpoint.
4535      </para>
4536     </listitem>
4537
4538     <listitem>
4539      <para>
4540       Don't error out if recycling or removing an old WAL file fails at the
4541       end of checkpoint (Heikki)
4542      </para>
4543
4544      <para>
4545       It's better to treat the problem as non-fatal and allow the checkpoint
4546       to complete.  Future checkpoints will retry the removal.  Such problems
4547       are not expected in normal operation, but have been seen to be
4548       caused by misdesigned Windows anti-virus and backup software.
4549      </para>
4550     </listitem>
4551
4552     <listitem>
4553      <para>
4554       Ensure WAL files aren't repeatedly archived on Windows (Heikki)
4555      </para>
4556
4557      <para>
4558       This is another symptom that could happen if some other process
4559       interfered with deletion of a no-longer-needed file.
4560      </para>
4561     </listitem>
4562
4563     <listitem>
4564      <para>
4565       Fix PAM password processing to be more robust (Tom)
4566      </para>
4567
4568      <para>
4569       The previous code is known to fail with the combination of the Linux
4570       <literal>pam_krb5</> PAM module with Microsoft Active Directory as the
4571       domain controller.  It might have problems elsewhere too, since it was
4572       making unjustified assumptions about what arguments the PAM stack would
4573       pass to it.
4574      </para>
4575     </listitem>
4576
4577     <listitem>
4578      <para>
4579       Raise the maximum authentication token (Kerberos ticket) size in GSSAPI
4580       and SSPI authentication methods (Ian Turner)
4581      </para>
4582
4583      <para>
4584       While the old 2000-byte limit was more than enough for Unix Kerberos
4585       implementations, tickets issued by Windows Domain Controllers can be
4586       much larger.
4587      </para>
4588     </listitem>
4589
4590     <listitem>
4591      <para>
4592       Ensure that domain constraints are enforced in constructs like
4593       <literal>ARRAY[...]::domain</>, where the domain is over an array type
4594       (Heikki)
4595      </para>
4596     </listitem>
4597
4598     <listitem>
4599      <para>
4600       Fix foreign-key logic for some cases involving composite-type columns
4601       as foreign keys (Tom)
4602      </para>
4603     </listitem>
4604
4605     <listitem>
4606      <para>
4607       Ensure that a cursor's snapshot is not modified after it is created
4608       (Alvaro)
4609      </para>
4610
4611      <para>
4612       This could lead to a cursor delivering wrong results if later operations
4613       in the same transaction modify the data the cursor is supposed to return.
4614      </para>
4615     </listitem>
4616
4617     <listitem>
4618      <para>
4619       Fix <literal>CREATE TABLE</> to properly merge default expressions
4620       coming from different inheritance parent tables (Tom)
4621      </para>
4622
4623      <para>
4624       This used to work but was broken in 8.4.
4625      </para>
4626     </listitem>
4627
4628     <listitem>
4629      <para>
4630       Re-enable collection of access statistics for sequences (Akira Kurosawa)
4631      </para>
4632
4633      <para>
4634       This used to work but was broken in 8.3.
4635      </para>
4636     </listitem>
4637
4638     <listitem>
4639      <para>
4640       Fix processing of ownership dependencies during <literal>CREATE OR
4641       REPLACE FUNCTION</> (Tom)
4642      </para>
4643     </listitem>
4644
4645     <listitem>
4646      <para>
4647       Fix incorrect handling of <literal>WHERE</>
4648       <replaceable>x</>=<replaceable>x</> conditions (Tom)
4649      </para>
4650
4651      <para>
4652       In some cases these could get ignored as redundant, but they aren't
4653       &mdash; they're equivalent to <replaceable>x</> <literal>IS NOT NULL</>.
4654      </para>
4655     </listitem>
4656
4657     <listitem>
4658      <para>
4659       Fix incorrect plan construction when using hash aggregation to implement
4660       <literal>DISTINCT</> for textually identical volatile expressions (Tom)
4661      </para>
4662     </listitem>
4663
4664     <listitem>
4665      <para>
4666       Fix Assert failure for a volatile <literal>SELECT DISTINCT ON</>
4667       expression (Tom)
4668      </para>
4669     </listitem>
4670
4671     <listitem>
4672      <para>
4673       Fix <function>ts_stat()</> to not fail on an empty <type>tsvector</>
4674       value (Tom)
4675      </para>
4676     </listitem>
4677
4678     <listitem>
4679      <para>
4680       Make text search parser accept underscores in XML attributes (Peter)
4681      </para>
4682     </listitem>
4683
4684     <listitem>
4685      <para>
4686       Fix encoding handling in <type>xml</> binary input (Heikki)
4687      </para>
4688
4689      <para>
4690       If the XML header doesn't specify an encoding, we now assume UTF-8 by
4691       default; the previous handling was inconsistent.
4692      </para>
4693     </listitem>
4694
4695     <listitem>
4696      <para>
4697       Fix bug with calling <literal>plperl</> from <literal>plperlu</> or vice
4698       versa (Tom)
4699      </para>
4700
4701      <para>
4702       An error exit from the inner function could result in crashes due to
4703       failure to re-select the correct Perl interpreter for the outer function.
4704      </para>
4705     </listitem>
4706
4707     <listitem>
4708      <para>
4709       Fix session-lifespan memory leak when a PL/Perl function is redefined
4710       (Tom)
4711      </para>
4712     </listitem>
4713
4714     <listitem>
4715      <para>
4716       Ensure that Perl arrays are properly converted to
4717       <productname>PostgreSQL</> arrays when returned by a set-returning
4718       PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen)
4719      </para>
4720
4721      <para>
4722       This worked correctly already for non-set-returning functions.
4723      </para>
4724     </listitem>
4725
4726     <listitem>
4727      <para>
4728       Fix rare crash in exception processing in PL/Python (Peter)
4729      </para>
4730     </listitem>
4731
4732     <listitem>
4733      <para>
4734       Fix <application>ecpg</> problem with comments in <literal>DECLARE
4735       CURSOR</> statements (Michael)
4736      </para>
4737     </listitem>
4738
4739     <listitem>
4740      <para>
4741       Fix <application>ecpg</> to not treat recently-added keywords as
4742       reserved words (Tom)
4743      </para>
4744
4745      <para>
4746       This affected the keywords <literal>CALLED</>, <literal>CATALOG</>,
4747       <literal>DEFINER</>, <literal>ENUM</>, <literal>FOLLOWING</>,
4748       <literal>INVOKER</>, <literal>OPTIONS</>, <literal>PARTITION</>,
4749       <literal>PRECEDING</>, <literal>RANGE</>, <literal>SECURITY</>,
4750       <literal>SERVER</>, <literal>UNBOUNDED</>, and <literal>WRAPPER</>.
4751      </para>
4752     </listitem>
4753
4754     <listitem>
4755      <para>
4756       Re-allow regular expression special characters in <application>psql</>'s
4757       <literal>\df</> function name parameter (Tom)
4758      </para>
4759     </listitem>
4760
4761     <listitem>
4762      <para>
4763       In <filename>contrib/fuzzystrmatch</>, correct the calculation of
4764       <function>levenshtein</> distances with non-default costs (Marcin Mank)
4765      </para>
4766     </listitem>
4767
4768     <listitem>
4769      <para>
4770       In <filename>contrib/pg_standby</>, disable triggering failover with a
4771       signal on Windows (Fujii Masao)
4772      </para>
4773
4774      <para>
4775       This never did anything useful, because Windows doesn't have Unix-style
4776       signals, but recent changes made it actually crash.
4777      </para>
4778     </listitem>
4779
4780     <listitem>
4781      <para>
4782       Put <literal>FREEZE</> and <literal>VERBOSE</> options in the right
4783       order in the <literal>VACUUM</> command that
4784       <filename>contrib/vacuumdb</> produces (Heikki)
4785      </para>
4786     </listitem>
4787
4788     <listitem>
4789      <para>
4790       Fix possible leak of connections when <filename>contrib/dblink</>
4791       encounters an error (Tatsuhito Kasahara)
4792      </para>
4793     </listitem>
4794
4795     <listitem>
4796      <para>
4797       Ensure <application>psql</>'s flex module is compiled with the correct
4798       system header definitions (Tom)
4799      </para>
4800
4801      <para>
4802       This fixes build failures on platforms where
4803       <literal>--enable-largefile</> causes incompatible changes in the
4804       generated code.
4805      </para>
4806     </listitem>
4807
4808     <listitem>
4809      <para>
4810       Make the postmaster ignore any <literal>application_name</> parameter in
4811       connection request packets, to improve compatibility with future libpq
4812       versions (Tom)
4813      </para>
4814     </listitem>
4815
4816     <listitem>
4817      <para>
4818       Update the timezone abbreviation files to match current reality (Joachim
4819       Wieland)
4820      </para>
4821
4822      <para>
4823       This includes adding <literal>IDT</> to the default
4824       timezone abbreviation set.
4825      </para>
4826     </listitem>
4827
4828     <listitem>
4829      <para>
4830       Update time zone data files to <application>tzdata</> release 2009s
4831       for DST law changes in Antarctica, Argentina, Bangladesh, Fiji,
4832       Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical
4833       corrections for Hong Kong.
4834      </para>
4835     </listitem>
4836
4837    </itemizedlist>
4838
4839   </sect2>
4840  </sect1>
4841
4842  <sect1 id="release-8-4-1">
4843   <title>Release 8.4.1</title>
4844
4845   <note>
4846   <title>Release Date</title>
4847   <simpara>2009-09-09</simpara>
4848   </note>
4849
4850   <para>
4851    This release contains a variety of fixes from 8.4.
4852    For information about new features in the 8.4 major release, see
4853    <xref linkend="release-8-4">.
4854   </para>
4855
4856   <sect2>
4857    <title>Migration to Version 8.4.1</title>
4858
4859    <para>
4860     A dump/restore is not required for those running 8.4.X.
4861    </para>
4862
4863   </sect2>
4864
4865   <sect2>
4866    <title>Changes</title>
4867
4868    <itemizedlist>
4869
4870     <listitem>
4871      <para>
4872       Fix WAL page header initialization at the end of archive recovery
4873       (Heikki)
4874      </para>
4875
4876      <para>
4877       This could lead to failure to process the WAL in a subsequent
4878       archive recovery.
4879      </para>
4880     </listitem>
4881
4882     <listitem>
4883      <para>
4884       Fix <quote>cannot make new WAL entries during recovery</> error (Tom)
4885      </para>
4886     </listitem>
4887
4888     <listitem>
4889      <para>
4890       Fix problem that could make expired rows visible after a crash (Tom)
4891      </para>
4892
4893      <para>
4894       This bug involved a page status bit potentially not being set
4895       correctly after a server crash.
4896      </para>
4897     </listitem>
4898
4899     <listitem>
4900      <para>
4901       Disallow <command>RESET ROLE</> and <command>RESET SESSION
4902       AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
4903      </para>
4904
4905      <para>
4906       This covers a case that was missed in the previous patch that
4907       disallowed <command>SET ROLE</> and <command>SET SESSION
4908       AUTHORIZATION</> inside security-definer functions.
4909       (See CVE-2007-6600)
4910      </para>
4911     </listitem>
4912
4913     <listitem>
4914      <para>
4915       Make <command>LOAD</> of an already-loaded loadable module
4916       into a no-op (Tom)
4917      </para>
4918
4919      <para>
4920       Formerly, <command>LOAD</> would attempt to unload and re-load the
4921       module, but this is unsafe and not all that useful.
4922      </para>
4923     </listitem>
4924
4925     <listitem>
4926      <para>
4927       Make window function <literal>PARTITION BY</> and <literal>ORDER BY</>
4928       items always be interpreted as simple expressions (Tom)
4929      </para>
4930
4931      <para>
4932       In 8.4.0 these lists were parsed following the rules used for
4933       top-level <literal>GROUP BY</> and <literal>ORDER BY</> lists.
4934       But this was not correct per the SQL standard, and it led to possible
4935       circularity.
4936      </para>
4937     </listitem>
4938
4939     <listitem>
4940      <para>
4941       Fix several errors in planning of semi-joins (Tom)
4942      </para>
4943
4944      <para>
4945       These led to wrong query results in some cases where <literal>IN</>
4946       or <literal>EXISTS</> was used together with another join.
4947      </para>
4948     </listitem>
4949
4950     <listitem>
4951      <para>
4952       Fix handling of whole-row references to subqueries that are within
4953       an outer join (Tom)
4954      </para>
4955
4956      <para>
4957       An example is
4958       <literal>SELECT COUNT(ss.*) FROM ... LEFT JOIN (SELECT ...) ss ON ...</>.
4959       Here, <literal>ss.*</> would be treated as <literal>ROW(NULL,NULL,...)</>
4960       for null-extended join rows, which is not the same as a simple NULL.
4961       Now it is treated as a simple NULL.
4962      </para>
4963     </listitem>
4964
4965     <listitem>
4966      <para>
4967       Fix Windows shared-memory allocation code (Tsutomu Yamada, Magnus)
4968      </para>
4969
4970      <para>
4971       This bug led to the often-reported <quote>could not reattach
4972       to shared memory</> error message.
4973      </para>
4974     </listitem>
4975
4976     <listitem>
4977      <para>
4978       Fix locale handling with plperl (Heikki)
4979      </para>
4980
4981      <para>
4982       This bug could cause the server's locale setting to change when a
4983       plperl function is called, leading to data corruption.
4984      </para>
4985     </listitem>
4986
4987     <listitem>
4988      <para>
4989       Fix handling of reloptions to ensure setting one option doesn't
4990       force default values for others (Itagaki Takahiro)
4991      </para>
4992     </listitem>
4993
4994     <listitem>
4995      <para>
4996       Ensure that a <quote>fast shutdown</> request will forcibly terminate
4997       open sessions, even if a <quote>smart shutdown</> was already in progress
4998       (Fujii Masao)
4999      </para>
5000     </listitem>
5001
5002     <listitem>
5003      <para>
5004       Avoid memory leak for <function>array_agg()</> in <literal>GROUP BY</>
5005       queries (Tom)
5006      </para>
5007     </listitem>
5008
5009     <listitem>
5010      <para>
5011       Treat <function>to_char(..., 'TH')</> as an uppercase ordinal
5012       suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki)
5013      </para>
5014
5015      <para>
5016       It was previously handled as <literal>'th'</> (lowercase).
5017      </para>
5018     </listitem>
5019
5020     <listitem>
5021      <para>
5022       Include the fractional part in the result of
5023       <function>EXTRACT(second)</> and
5024       <function>EXTRACT(milliseconds)</> for
5025       <type>time</> and <type>time with time zone</> inputs (Tom)
5026      </para>
5027
5028      <para>
5029       This has always worked for floating-point datetime configurations,
5030       but was broken in the integer datetime code.
5031      </para>
5032     </listitem>
5033
5034     <listitem>
5035      <para>
5036       Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal>
5037       when <replaceable>x</> is more than 2 million and integer
5038       datetimes are in use (Alex Hunsaker)
5039      </para>
5040     </listitem>
5041
5042     <listitem>
5043      <para>
5044       Improve performance when processing toasted values in index scans (Tom)
5045      </para>
5046
5047      <para>
5048       This is particularly useful for <ulink
5049       url="http://postgis.refractions.net/">PostGIS</ulink>.
5050      </para>
5051     </listitem>
5052
5053     <listitem>
5054      <para>
5055       Fix a typo that disabled <varname>commit_delay</> (Jeff Janes)
5056      </para>
5057     </listitem>
5058
5059     <listitem>
5060      <para>
5061       Output early-startup messages to <filename>postmaster.log</> if the
5062       server is started in silent mode (Tom)
5063      </para>
5064
5065      <para>
5066       Previously such error messages were discarded, leading to
5067       difficulty in debugging.
5068      </para>
5069     </listitem>
5070
5071     <listitem>
5072      <para>
5073       Remove translated FAQs (Peter)
5074      </para>
5075
5076      <para>
5077       They are now on the <ulink
5078       url="http://wiki.postgresql.org/wiki/FAQ">wiki</ulink>.  The
5079       main FAQ was moved to the wiki some time ago.
5080      </para>
5081     </listitem>
5082
5083     <listitem>
5084      <para>
5085       Fix <application>pg_ctl</> to not go into an infinite loop if
5086       <filename>postgresql.conf</> is empty (Jeff Davis)
5087      </para>
5088     </listitem>
5089
5090     <listitem>
5091      <para>
5092       Fix several errors in <application>pg_dump</>'s
5093       <literal>--binary-upgrade</> mode (Bruce, Tom)
5094      </para>
5095
5096      <para>
5097       <literal>pg_dump --binary-upgrade</> is used by pg_migrator.
5098      </para>
5099     </listitem>
5100
5101     <listitem>
5102      <para>
5103       Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to
5104       properly handle the maximum number of parameters (twenty) (Tom)
5105      </para>
5106     </listitem>
5107
5108     <listitem>
5109      <para>
5110       Improve robustness of <application>libpq</>'s code to recover
5111       from errors during <command>COPY FROM STDIN</> (Tom)
5112      </para>
5113     </listitem>
5114
5115     <listitem>
5116      <para>
5117       Avoid including conflicting readline and editline header files
5118       when both libraries are installed (Zdenek Kotala)
5119      </para>
5120     </listitem>
5121
5122     <listitem>
5123      <para>
5124       Work around gcc bug that causes <quote>floating-point exception</>
5125       instead of <quote>division by zero</> on some platforms (Tom)
5126      </para>
5127     </listitem>
5128
5129     <listitem>
5130      <para>
5131       Update time zone data files to <application>tzdata</> release 2009l
5132       for DST law changes in Bangladesh, Egypt, Mauritius.
5133      </para>
5134     </listitem>
5135
5136    </itemizedlist>
5137
5138   </sect2>
5139  </sect1>
5140
5141  <sect1 id="release-8-4">
5142   <title>Release 8.4</title>
5143
5144   <note>
5145    <title>Release Date</title>
5146    <simpara>2009-07-01</simpara>
5147   </note>
5148
5149   <sect2>
5150    <title>Overview</title>
5151
5152    <para>
5153     After many years of development, <productname>PostgreSQL</> has
5154     become feature-complete in many areas.   This release shows a
5155     targeted approach to adding features (e.g., authentication,
5156     monitoring, space reuse), and adds capabilities defined in the
5157     later SQL standards.  The major areas of enhancement are:
5158    </para>
5159
5160    <itemizedlist>
5161
5162     <!-- This list duplicates items below, but without authors or details-->
5163
5164     <listitem>
5165      <para>
5166       Windowing Functions
5167      </para>
5168     </listitem>
5169
5170     <listitem>
5171      <para>
5172       Common Table Expressions and Recursive Queries
5173      </para>
5174     </listitem>
5175
5176     <listitem>
5177      <para>
5178       Default and variadic parameters for functions
5179      </para>
5180     </listitem>
5181
5182     <listitem>
5183      <para>
5184       Parallel Restore
5185      </para>
5186     </listitem>
5187
5188     <listitem>
5189      <para>
5190       Column Permissions
5191      </para>
5192     </listitem>
5193
5194     <listitem>
5195      <para>
5196       Per-database locale settings
5197      </para>
5198     </listitem>
5199
5200     <listitem>
5201      <para>
5202       Improved hash indexes
5203      </para>
5204     </listitem>
5205
5206     <listitem>
5207      <para>
5208       Improved join performance for <literal>EXISTS</> and <literal>NOT EXISTS</> queries
5209      </para>
5210     </listitem>
5211
5212     <listitem>
5213      <para>
5214       Easier-to-use Warm Standby
5215      </para>
5216     </listitem>
5217
5218     <listitem>
5219      <para>
5220       Automatic sizing of the Free Space Map
5221      </para>
5222     </listitem>
5223
5224     <listitem>
5225      <para>
5226       Visibility Map (greatly reduces vacuum overhead for slowly-changing tables)
5227      </para>
5228     </listitem>
5229
5230     <listitem>
5231      <para>
5232       Version-aware psql (backslash commands work against older servers)
5233      </para>
5234     </listitem>
5235
5236     <listitem>
5237      <para>
5238       Support SSL certificates for user authentication
5239      </para>
5240     </listitem>
5241
5242     <listitem>
5243      <para>
5244       Per-function runtime statistics
5245      </para>
5246     </listitem>
5247
5248     <listitem>
5249      <para>
5250       Easy editing of functions in psql
5251      </para>
5252     </listitem>
5253
5254     <listitem>
5255      <para>
5256       New contrib modules: pg_stat_statements, auto_explain, citext, btree_gin
5257      </para>
5258     </listitem>
5259
5260    </itemizedlist>
5261
5262    <para>
5263     The above items are explained in more detail in the sections below.
5264    </para>
5265
5266   </sect2>
5267
5268   <sect2>
5269    <title>Migration to Version 8.4</title>
5270
5271    <para>
5272     A dump/restore using <application>pg_dump</application> is
5273     required for those wishing to migrate data from any previous
5274     release.
5275    </para>
5276
5277    <para>
5278     Observe the following incompatibilities:
5279    </para>
5280
5281    <sect3>
5282     <title>General</title>
5283     <itemizedlist>
5284
5285      <listitem>
5286       <para>
5287        Use 64-bit integer datetimes by default (Neil Conway)
5288       </para>
5289
5290       <para>
5291        Previously this was selected by <application>configure</>'s
5292        <option>--enable-integer-datetimes</> option.  To retain
5293        the old behavior, build with <option>--disable-integer-datetimes</>.
5294       </para>
5295      </listitem>
5296
5297      <listitem>
5298       <para>
5299        Remove <application>ipcclean</> utility command (Bruce)
5300       </para>
5301
5302       <para>
5303        The utility only worked on a few platforms.  Users should use
5304        their operating system tools instead.
5305       </para>
5306      </listitem>
5307
5308     </itemizedlist>
5309
5310    </sect3>
5311
5312    <sect3>
5313     <title>Server Settings</title>
5314     <itemizedlist>
5315
5316      <listitem>
5317       <para>
5318        Change default setting for
5319        <literal>log_min_messages</> to <literal>warning</> (previously
5320        it was <literal>notice</>) to reduce log file volume (Tom)
5321       </para>
5322      </listitem>
5323
5324      <listitem>
5325       <para>
5326        Change default setting for <literal>max_prepared_transactions</> to
5327        zero (previously it was 5) (Tom)
5328       </para>
5329      </listitem>
5330
5331      <listitem>
5332       <para>
5333        Make <literal>debug_print_parse</>, <literal>debug_print_rewritten</>,
5334        and <literal>debug_print_plan</>
5335        output appear at <literal>LOG</> message level, not
5336        <literal>DEBUG1</> as formerly (Tom)
5337       </para>
5338      </listitem>
5339
5340      <listitem>
5341       <para>
5342        Make <literal>debug_pretty_print</> default to <literal>on</> (Tom)
5343       </para>
5344      </listitem>
5345
5346      <listitem>
5347       <para>
5348        Remove <varname>explain_pretty_print</> parameter (no longer needed) (Tom)
5349       </para>
5350      </listitem>
5351
5352      <listitem>
5353       <para>
5354        Make <varname>log_temp_files</> settable by superusers only, like other
5355        logging options (Simon Riggs)
5356       </para>
5357      </listitem>
5358
5359      <listitem>
5360       <para>
5361        Remove automatic appending of the epoch timestamp when no <literal>%</>
5362        escapes are present in <literal>log_filename</> (Robert Haas)
5363       </para>
5364
5365       <para>
5366        This change was made because some users wanted a fixed log filename,
5367        for use with an external log rotation tool.
5368       </para>
5369      </listitem>
5370
5371      <listitem>
5372       <para>
5373        Remove <varname>log_restartpoints</> from <filename>recovery.conf</>;
5374        instead use <varname>log_checkpoints</> (Simon)
5375       </para>
5376      </listitem>
5377
5378      <listitem>
5379       <para>
5380        Remove <varname>krb_realm</> and <varname>krb_server_hostname</>;
5381        these are now set in <filename>pg_hba.conf</> instead (Magnus)
5382       </para>
5383      </listitem>
5384
5385      <listitem>
5386       <para>
5387        There are also significant changes in <link
5388        linkend="release-8-4-pg-hba-conf"><filename>pg_hba.conf</></link>,
5389        as described below.
5390       </para>
5391      </listitem>
5392
5393     </itemizedlist>
5394
5395    </sect3>
5396
5397    <sect3>
5398     <title>Queries</title>
5399
5400     <itemizedlist>
5401
5402      <listitem>
5403       <para>
5404        Change <command>TRUNCATE</> and <command>LOCK</> to
5405        apply to child tables of the specified table(s) (Peter)
5406       </para>
5407
5408       <para>
5409        These commands now accept an <literal>ONLY</> option that prevents
5410        processing child tables; this option must be used if the old
5411        behavior is needed.
5412       </para>
5413      </listitem>
5414
5415      <listitem>
5416       <para>
5417        <command>SELECT DISTINCT</> and
5418        <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>
5419        no longer always produce sorted output (Tom)
5420       </para>
5421
5422       <para>
5423        Previously, these types of queries always removed duplicate rows
5424        by means of Sort/Unique processing (i.e., sort then remove adjacent
5425        duplicates).  Now they can be implemented by hashing, which will not
5426        produce sorted output.  If an application relied on the output being
5427        in sorted order, the recommended fix is to add an <literal>ORDER BY</>
5428        clause.  As a short-term workaround, the previous behavior can be
5429        restored by disabling <literal>enable_hashagg</>, but that is a very
5430        performance-expensive fix.  <literal>SELECT DISTINCT ON</> never uses
5431        hashing, however, so its behavior is unchanged.
5432       </para>
5433      </listitem>
5434
5435      <listitem>
5436       <para>
5437        Force child tables to inherit <literal>CHECK</> constraints from parents
5438        (Alex Hunsaker, Nikhil Sontakke, Tom)
5439       </para>
5440
5441       <para>
5442        Formerly it was possible to drop such a constraint from a child
5443        table, allowing rows that violate the constraint to be visible
5444        when scanning the parent table.  This was deemed inconsistent,
5445        as well as contrary to SQL standard.
5446       </para>
5447      </listitem>
5448
5449      <listitem>
5450       <para>
5451        Disallow negative <literal>LIMIT</> or <literal>OFFSET</>
5452        values, rather than treating them as zero (Simon)
5453       </para>
5454      </listitem>
5455
5456      <listitem>
5457       <para>
5458        Disallow <command>LOCK TABLE</> outside a transaction block
5459        (Tom)
5460       </para>
5461
5462       <para>
5463        Such an operation is useless because the lock would be released
5464        immediately.
5465       </para>
5466      </listitem>
5467
5468      <listitem>
5469       <para>
5470        Sequences now contain an additional <structfield>start_value</> column
5471        (Zoltan Boszormenyi)
5472       </para>
5473
5474       <para>
5475        This supports <command>ALTER SEQUENCE ... RESTART</>.
5476       </para>
5477      </listitem>
5478
5479     </itemizedlist>
5480
5481    </sect3>
5482
5483
5484    <sect3>
5485     <title>Functions and Operators</title>
5486
5487     <itemizedlist>
5488
5489      <listitem>
5490       <para>
5491        Make <type>numeric</> zero raised to a fractional power return
5492        <literal>0</>, rather than throwing an error, and make
5493        <type>numeric</> zero raised to the zero power return <literal>1</>,
5494        rather than error (Bruce)
5495       </para>
5496
5497       <para>
5498        This matches the longstanding <type>float8</> behavior.
5499       </para>
5500      </listitem>
5501
5502      <listitem>
5503       <para>
5504        Allow unary minus of floating-point values to produce minus zero (Tom)
5505       </para>
5506
5507       <para>
5508        The changed behavior is more <acronym>IEEE</>-standard
5509        compliant.
5510       </para>
5511      </listitem>
5512
5513      <listitem>
5514       <para>
5515        Throw an error if an escape character is the last character in
5516        a <literal>LIKE</> pattern (i.e., it has nothing to escape) (Tom)
5517       </para>
5518
5519       <para>
5520        Previously, such an escape character was silently ignored,
5521        thus possibly masking application logic errors.
5522       </para>
5523      </listitem>
5524
5525      <listitem>
5526       <para>
5527        Remove <literal>~=~</> and <literal>~&lt;&gt;~</> operators
5528        formerly used for <literal>LIKE</> index comparisons (Tom)
5529       </para>
5530
5531       <para>
5532        Pattern indexes now use the regular equality operator.
5533       </para>
5534      </listitem>
5535
5536      <listitem>
5537       <para>
5538        <function>xpath()</> now passes its arguments to <application>libxml</>
5539        without any changes (Andrew)
5540       </para>
5541
5542       <para>
5543        This means that the XML argument must be a well-formed XML document.
5544        The previous coding attempted to allow XML fragments, but it did not
5545        work well.
5546       </para>
5547      </listitem>
5548
5549      <listitem>
5550       <para>
5551        Make <function>xmlelement()</> format attribute values just like
5552        content values (Peter)
5553       </para>
5554
5555       <para>
5556        Previously, attribute values were formatted according to the
5557        normal SQL output behavior, which is sometimes at odds with
5558        XML rules.
5559       </para>
5560      </listitem>
5561
5562      <listitem>
5563       <para>
5564        Rewrite memory management for <application>libxml</>-using functions
5565        (Tom)
5566       </para>
5567
5568       <para>
5569        This change should avoid some compatibility problems with use of
5570        <application>libxml</> in PL/Perl and other add-on code.
5571       </para>
5572      </listitem>
5573
5574      <listitem>
5575       <para>
5576        Adopt a faster algorithm for hash functions (Kenneth Marshall,
5577        based on work of Bob Jenkins)
5578       </para>
5579
5580       <para>
5581        Many of the built-in hash functions now deliver different results on
5582        little-endian and big-endian platforms.
5583       </para>
5584      </listitem>
5585
5586     </itemizedlist>
5587
5588     <sect4>
5589      <title>Temporal Functions and Operators</title>
5590
5591      <itemizedlist>
5592
5593       <listitem>
5594        <para>
5595         <varname>DateStyle</> no longer controls <type>interval</> output
5596         formatting; instead there is a new variable <varname>IntervalStyle</>
5597         (Ron Mayer)
5598        </para>
5599       </listitem>
5600
5601       <listitem>
5602        <para>
5603         Improve consistency of handling of fractional seconds in
5604         <type>timestamp</> and <type>interval</> output (Ron Mayer)
5605        </para>
5606
5607        <para>
5608         This may result in displaying a different number of fractional
5609         digits than before, or rounding instead of truncating.
5610        </para>
5611       </listitem>
5612
5613       <listitem>
5614        <para>
5615         Make <function>to_char()</>'s localized month/day names depend
5616         on <varname>LC_TIME</>, not <varname>LC_MESSAGES</> (Euler
5617         Taveira de Oliveira)
5618        </para>
5619       </listitem>
5620
5621       <listitem>
5622        <para>
5623         Cause <function>to_date()</> and <function>to_timestamp()</>
5624         to more consistently report errors for invalid input (Brendan
5625         Jurd)
5626        </para>
5627
5628        <para>
5629         Previous versions would often ignore or silently misread input
5630         that did not match the format string.  Such cases will now
5631         result in an error.
5632        </para>
5633       </listitem>
5634
5635       <listitem>
5636        <para>
5637         Fix <function>to_timestamp()</> to not require upper/lower case
5638         matching for meridian (<literal>AM</>/<literal>PM</>) and era
5639         (<literal>BC</>/<literal>AD</>) format designations  (Brendan
5640         Jurd)
5641        </para>
5642
5643        <para>
5644         For example, input value <literal>ad</> now matches the format
5645         string <literal>AD</>.
5646        </para>
5647       </listitem>
5648
5649      </itemizedlist>
5650
5651     </sect4>
5652
5653    </sect3>
5654
5655   </sect2>
5656
5657   <sect2>
5658    <title>Changes</title>
5659
5660    <para>
5661     Below you will find a detailed account of the changes between
5662     <productname>PostgreSQL</productname> 8.4 and the previous major
5663     release.
5664    </para>
5665
5666    <sect3>
5667     <title>Performance</title>
5668     <itemizedlist>
5669
5670      <listitem>
5671       <para>
5672        Improve optimizer statistics calculations (Jan Urbanski, Tom)
5673       </para>
5674
5675       <para>
5676        In particular, estimates for full-text-search operators are
5677        greatly improved.
5678       </para>
5679      </listitem>
5680
5681      <listitem>
5682       <para>
5683        Allow <command>SELECT DISTINCT</> and
5684        <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> to
5685        use hashing (Tom)
5686       </para>
5687
5688       <para>
5689        This means that these types of queries no longer automatically
5690        produce sorted output.
5691       </para>
5692      </listitem>
5693
5694      <listitem>
5695       <para>
5696        Create explicit concepts of semi-joins and anti-joins (Tom)
5697       </para>
5698
5699       <para>
5700        This work formalizes our previous ad-hoc treatment of <literal>IN
5701        (SELECT ...)</> clauses, and extends it to <literal>EXISTS</> and
5702        <literal>NOT EXISTS</> clauses.  It should result in significantly
5703        better planning of <literal>EXISTS</> and <literal>NOT EXISTS</>
5704        queries.  In general, logically equivalent <literal>IN</> and
5705        <literal>EXISTS</> clauses should now have similar performance,
5706        whereas previously <literal>IN</> often won.
5707       </para>
5708      </listitem>
5709
5710      <listitem>
5711       <para>
5712        Improve optimization of sub-selects beneath outer joins (Tom)
5713       </para>
5714
5715       <para>
5716        Formerly, a sub-select or view could not be optimized very well if it
5717        appeared within the nullable side of an outer join and contained
5718        non-strict expressions (for instance, constants) in its result list.
5719       </para>
5720      </listitem>
5721
5722      <listitem>
5723       <para>
5724        Improve the performance of <function>text_position()</> and
5725        related functions by using Boyer-Moore-Horspool searching (David
5726        Rowley)
5727       </para>
5728
5729       <para>
5730        This is particularly helpful for long search patterns.
5731       </para>
5732      </listitem>
5733
5734      <listitem>
5735       <para>
5736        Reduce I/O load of writing the statistics collection file
5737        by writing the file only when requested (Martin Pihlak)
5738       </para>
5739      </listitem>
5740
5741      <listitem>
5742       <para>
5743        Improve performance for bulk inserts (Robert Haas, Simon)
5744       </para>
5745      </listitem>
5746
5747      <listitem>
5748       <para>
5749        Increase the default value of <varname>default_statistics_target</>
5750        from <literal>10</> to <literal>100</> (Greg Sabino Mullane,
5751        Tom)
5752       </para>
5753
5754       <para>
5755        The maximum value was also increased from <literal>1000</> to
5756        <literal>10000</>.
5757       </para>
5758      </listitem>
5759
5760      <listitem>
5761       <para>
5762        Perform <varname>constraint_exclusion</> checking by default
5763        in queries involving inheritance or <literal>UNION ALL</> (Tom)
5764       </para>
5765
5766       <para>
5767        A new <varname>constraint_exclusion</> setting,
5768        <literal>partition</>, was added to specify this behavior.
5769       </para>
5770      </listitem>
5771
5772      <listitem>
5773       <para>
5774        Allow I/O read-ahead for bitmap index scans (Greg Stark)
5775       </para>
5776
5777       <para>
5778        The amount of read-ahead is controlled by
5779        <varname>effective_io_concurrency</>.  This feature is available only
5780        if the kernel has <function>posix_fadvise()</> support.
5781       </para>
5782      </listitem>
5783
5784      <listitem>
5785       <para>
5786        Inline simple set-returning <acronym>SQL</> functions in
5787        <literal>FROM</> clauses (Richard Rowell)
5788       </para>
5789      </listitem>
5790
5791      <listitem>
5792       <para>
5793        Improve performance of multi-batch hash joins by providing a special
5794        case for join key values that are especially common in the outer
5795        relation (Bryce Cutt, Ramon Lawrence)
5796       </para>
5797      </listitem>
5798
5799      <listitem>
5800       <para>
5801        Reduce volume of temporary data in multi-batch hash joins
5802        by suppressing <quote>physical tlist</> optimization (Michael
5803        Henderson, Ramon Lawrence)
5804       </para>
5805      </listitem>
5806
5807      <listitem>
5808       <para>
5809        Avoid waiting for idle-in-transaction sessions during
5810        <command>CREATE INDEX CONCURRENTLY</> (Simon)
5811       </para>
5812      </listitem>
5813
5814      <listitem>
5815       <para>
5816        Improve performance of shared cache invalidation (Tom)
5817       </para>
5818      </listitem>
5819
5820     </itemizedlist>
5821
5822    </sect3>
5823
5824    <sect3>
5825     <title>Server</title>
5826
5827     <sect4>
5828      <title>Settings</title>
5829
5830      <itemizedlist>
5831
5832       <listitem>
5833        <para>
5834         Convert many <filename>postgresql.conf</> settings to enumerated
5835         values so that <literal>pg_settings</> can display the valid
5836         values (Magnus)
5837        </para>
5838       </listitem>
5839
5840       <listitem>
5841        <para>
5842         Add <varname>cursor_tuple_fraction</> parameter to control the
5843         fraction of a cursor's rows that the planner assumes will be
5844         fetched (Robert Hell)
5845        </para>
5846       </listitem>
5847
5848       <listitem>
5849        <para>
5850         Allow underscores in the names of custom variable
5851         classes in <filename>postgresql.conf</> (Tom)
5852        </para>
5853       </listitem>
5854
5855      </itemizedlist>
5856
5857     </sect4>
5858
5859     <sect4>
5860      <title>Authentication and security</title>
5861      <itemizedlist>
5862
5863       <listitem>
5864        <para>
5865         Remove support for the (insecure) <literal>crypt</> authentication method
5866         (Magnus)
5867        </para>
5868
5869        <para>
5870         This effectively obsoletes pre-<productname>PostgreSQL</> 7.2 client
5871         libraries, as there is no longer any non-plaintext password method that
5872         they can use.
5873        </para>
5874       </listitem>
5875
5876       <listitem>
5877        <para>
5878         Support regular expressions in <filename>pg_ident.conf</>
5879         (Magnus)
5880        </para>
5881       </listitem>
5882
5883       <listitem>
5884        <para>
5885         Allow <productname>Kerberos</>/<acronym>GSSAPI</> parameters
5886         to be changed without restarting the postmaster (Magnus)
5887        </para>
5888       </listitem>
5889
5890       <listitem>
5891        <para>
5892         Support <acronym>SSL</> certificate chains in server certificate
5893         file (Andrew Gierth)
5894        </para>
5895
5896        <para>
5897         Including the full certificate chain makes the client able
5898         to verify the certificate without having all intermediate CA
5899         certificates present in the local store, which is often the case for
5900         commercial CAs.
5901        </para>
5902       </listitem>
5903
5904       <listitem>
5905        <para>
5906         Report appropriate error message for combination of <literal>MD5</>
5907         authentication and <varname>db_user_namespace</> enabled (Bruce)
5908        </para>
5909       </listitem>
5910      </itemizedlist>
5911
5912     </sect4>
5913
5914     <sect4 id="release-8-4-pg-hba-conf">
5915      <title><filename>pg_hba.conf</></title>
5916      <itemizedlist>
5917
5918       <listitem>
5919        <para>
5920         Change all authentication options to use <literal>name=value</>
5921         syntax (Magnus)
5922        </para>
5923
5924        <para>
5925         This makes incompatible changes to the <literal>ldap</>,
5926         <literal>pam</> and <literal>ident</> authentication methods. All
5927         <filename>pg_hba.conf</> entries with these methods need to be
5928         rewritten using the new format.
5929        </para>
5930       </listitem>
5931
5932       <listitem>
5933        <para>
5934         Remove the <literal>ident sameuser</> option, instead making that
5935         behavior the default if no usermap is specified (Magnus)
5936        </para>
5937       </listitem>
5938
5939       <listitem>
5940        <para>
5941         Allow a usermap parameter for all external authentication methods
5942         (Magnus)
5943        </para>
5944
5945        <para>
5946         Previously a usermap was only supported for <literal>ident</>
5947         authentication.
5948        </para>
5949       </listitem>
5950
5951       <listitem>
5952        <para>
5953         Add <literal>clientcert</> option to control requesting of a
5954         client certificate (Magnus)
5955        </para>
5956
5957        <para>
5958         Previously this was controlled by the presence of a root
5959         certificate file in the server's data directory.
5960        </para>
5961       </listitem>
5962
5963       <listitem>
5964        <para>
5965         Add <literal>cert</> authentication method to allow
5966         <emphasis>user</> authentication via <acronym>SSL</> certificates
5967         (Magnus)
5968        </para>
5969
5970        <para>
5971         Previously <acronym>SSL</> certificates could only verify that
5972         the client had access to a certificate, not authenticate a
5973         user.
5974        </para>
5975       </listitem>
5976
5977       <listitem>
5978        <para>
5979         Allow <literal>krb5</>, <literal>gssapi</> and <literal>sspi</>
5980         realm and <literal>krb5</> host settings to be specified in
5981         <filename>pg_hba.conf</> (Magnus)
5982        </para>
5983
5984        <para>
5985         These override the settings in <filename>postgresql.conf</>.
5986        </para>
5987       </listitem>
5988
5989       <listitem>
5990        <para>
5991         Add <varname>include_realm</> parameter for <literal>krb5</>,
5992         <literal>gssapi</>, and <literal>sspi</> methods (Magnus)
5993        </para>
5994
5995        <para>
5996         This allows identical usernames from different realms to be
5997         authenticated as different database users using usermaps.
5998        </para>
5999       </listitem>
6000
6001       <listitem>
6002        <para>
6003         Parse <filename>pg_hba.conf</> fully when it is loaded,
6004         so that errors are reported immediately (Magnus)
6005        </para>
6006
6007        <para>
6008         Previously, most errors in the file wouldn't be detected until clients
6009         tried to connect, so an erroneous file could render the system
6010         unusable.  With the new behavior, if an error is detected during
6011         reload then the bad file is rejected and the postmaster continues
6012         to use its old copy.
6013        </para>
6014       </listitem>
6015
6016       <listitem>
6017        <para>
6018         Show all parsing errors in <filename>pg_hba.conf</> instead of
6019         aborting after the first one (Selena Deckelmann)
6020        </para>
6021       </listitem>
6022
6023       <listitem>
6024        <para>
6025         Support <literal>ident</> authentication over Unix-domain sockets
6026         on <productname>Solaris</> (Garick Hamlin)
6027        </para>
6028       </listitem>
6029
6030      </itemizedlist>
6031
6032     </sect4>
6033
6034     <sect4>
6035      <title>Continuous Archiving</title>
6036      <itemizedlist>
6037
6038       <listitem>
6039        <para>
6040         Provide an option to <function>pg_start_backup()</> to force its
6041         implied checkpoint to finish as quickly as possible (Tom)
6042        </para>
6043
6044        <para>
6045         The default behavior avoids excess I/O consumption, but that is
6046         pointless if no concurrent query activity is going on.
6047        </para>
6048       </listitem>
6049
6050       <listitem>
6051        <para>
6052         Make <function>pg_stop_backup()</> wait for modified <acronym>WAL</>
6053         files to be archived (Simon)
6054        </para>
6055
6056        <para>
6057         This guarantees that the backup is valid at the time
6058         <function>pg_stop_backup()</> completes.
6059        </para>
6060       </listitem>
6061
6062       <listitem>
6063        <para>
6064         When archiving is enabled, rotate the last WAL segment at shutdown
6065         so that all transactions can be archived immediately
6066         (Guillaume Smet, Heikki)
6067        </para>
6068       </listitem>
6069
6070       <listitem>
6071        <para>
6072         Delay <quote>smart</> shutdown while a continuous archiving base backup
6073         is in progress (Laurenz Albe)
6074        </para>
6075       </listitem>
6076
6077       <listitem>
6078        <para>
6079         Cancel a continuous archiving base backup if <quote>fast</> shutdown
6080         is requested (Laurenz Albe)
6081        </para>
6082       </listitem>
6083
6084       <listitem>
6085        <para>
6086         Allow <filename>recovery.conf</> boolean variables to take the
6087         same range of string values as <filename>postgresql.conf</>
6088         boolean variables
6089         (Bruce)
6090        </para>
6091       </listitem>
6092
6093      </itemizedlist>
6094
6095     </sect4>
6096
6097     <sect4>
6098      <title>Monitoring</title>
6099      <itemizedlist>
6100
6101       <listitem>
6102        <para>
6103         Add <function>pg_conf_load_time()</> to report when
6104         the <productname>PostgreSQL</> configuration files were last loaded
6105         (George Gensure)
6106        </para>
6107       </listitem>
6108
6109       <listitem>
6110        <para>
6111         Add <function>pg_terminate_backend()</> to safely terminate a
6112         backend (the <literal>SIGTERM</> signal works also) (Tom, Bruce)
6113        </para>
6114
6115        <para>
6116         While it's always been possible to <literal>SIGTERM</> a single
6117         backend, this was previously considered unsupported; and testing
6118         of the case found some bugs that are now fixed.
6119        </para>
6120       </listitem>
6121
6122       <listitem>
6123        <para>
6124         Add ability to track user-defined functions' call counts and
6125         runtimes (Martin Pihlak)
6126        </para>
6127
6128        <para>
6129         Function statistics appear in a new system view,
6130         <literal>pg_stat_user_functions</>.  Tracking is controlled
6131         by the new parameter <varname>track_functions</>.
6132        </para>
6133       </listitem>
6134
6135       <listitem>
6136        <para>
6137         Allow specification of the maximum query string size in
6138         <literal>pg_stat_activity</> via new
6139         <varname>track_activity_query_size</> parameter (Thomas Lee)
6140        </para>
6141       </listitem>
6142
6143       <listitem>
6144        <para>
6145         Increase the maximum line length sent to <application>syslog</>, in
6146         hopes of improving performance (Tom)
6147        </para>
6148       </listitem>
6149
6150       <listitem>
6151        <para>
6152         Add read-only configuration variables <varname>segment_size</>,
6153         <varname>wal_block_size</>, and <varname>wal_segment_size</>
6154         (Bernd Helmle)
6155        </para>
6156       </listitem>
6157
6158       <listitem>
6159        <para>
6160         When reporting a deadlock, report the text of all queries involved
6161         in the deadlock to the server log  (Itagaki Takahiro)
6162        </para>
6163       </listitem>
6164
6165       <listitem>
6166        <para>
6167         Add <function>pg_stat_get_activity(pid)</> function to return
6168         information about a specific process id (Magnus)
6169        </para>
6170       </listitem>
6171
6172       <listitem>
6173        <para>
6174         Allow the location of the server's statistics file to be specified
6175         via <varname>stats_temp_directory</> (Magnus)
6176        </para>
6177
6178        <para>
6179         This allows the statistics file to be placed in a
6180         <acronym>RAM</>-resident directory to reduce I/O requirements.
6181         On startup/shutdown, the file is copied to its traditional location
6182         (<literal>$PGDATA/global/</>) so it is preserved across restarts.
6183        </para>
6184       </listitem>
6185
6186      </itemizedlist>
6187
6188     </sect4>
6189
6190    </sect3>
6191
6192    <sect3>
6193     <title>Queries</title>
6194     <itemizedlist>
6195
6196      <listitem>
6197       <para>
6198        Add support for <literal>WINDOW</> functions (Hitoshi Harada)
6199       </para>
6200      </listitem>
6201
6202      <listitem>
6203       <para>
6204        Add support for <literal>WITH</> clauses (CTEs), including <literal>WITH
6205        RECURSIVE</> (Yoshiyuki Asaba, Tatsuo Ishii, Tom)
6206       </para>
6207      </listitem>
6208
6209      <listitem>
6210       <para>
6211        Add <command>TABLE</> command (Peter)
6212       </para>
6213
6214       <para>
6215        <literal>TABLE tablename</> is a SQL standard short-hand for
6216        <literal>SELECT * FROM tablename</>.
6217       </para>
6218      </listitem>
6219
6220      <listitem>
6221       <para>
6222        Allow <literal>AS</> to be optional when specifying a
6223        <command>SELECT</> (or <literal>RETURNING</>) column output
6224        label (Hiroshi Saito)
6225       </para>
6226
6227       <para>
6228        This works so long as the column label is not any
6229        <productname>PostgreSQL</> keyword; otherwise <literal>AS</> is still
6230        needed.
6231       </para>
6232      </listitem>
6233
6234      <listitem>
6235       <para>
6236        Support set-returning functions in <command>SELECT</> result lists
6237        even for functions that return their result via a tuplestore (Tom)
6238       </para>
6239
6240       <para>
6241        In particular, this means that functions written in PL/pgSQL
6242        and other PL languages can now be called this way.
6243       </para>
6244      </listitem>
6245
6246      <listitem>
6247       <para>
6248        Support set-returning functions in the output of aggregation
6249        and grouping queries (Tom)
6250       </para>
6251      </listitem>
6252
6253      <listitem>
6254       <para>
6255        Allow <command>SELECT FOR UPDATE</>/<literal>SHARE</> to work
6256        on inheritance trees (Tom)
6257       </para>
6258      </listitem>
6259
6260      <listitem>
6261       <para>
6262        Add infrastructure for <acronym>SQL/MED</> (Martin Pihlak,
6263        Peter)
6264       </para>
6265
6266       <para>
6267        There are no remote or external <acronym>SQL/MED</> capabilities
6268        yet, but this change provides a standardized and future-proof
6269        system for managing connection information for modules like
6270        <filename>dblink</> and <filename>plproxy</>.
6271       </para>
6272      </listitem>
6273
6274      <listitem>
6275       <para>
6276        Invalidate cached plans when referenced schemas, functions, operators,
6277        or operator classes are modified (Martin Pihlak, Tom)
6278       </para>
6279
6280       <para>
6281        This improves the system's ability to respond to on-the-fly
6282        DDL changes.
6283       </para>
6284      </listitem>
6285      <listitem>
6286       <para>
6287        Allow comparison of composite types and allow arrays of
6288        anonymous composite types (Tom)
6289       </para>
6290
6291       <para>
6292        This allows constructs such as
6293        <literal>row(1, 1.1) = any (array[row(7, 7.7), row(1, 1.0)])</>.
6294        This is particularly useful in recursive queries.
6295       </para>
6296      </listitem>
6297
6298      <listitem>
6299       <para>
6300        Add support for Unicode string literal and identifier specifications
6301        using code points, e.g. <literal>U&amp;'d\0061t\+000061'</>
6302        (Peter)
6303       </para>
6304      </listitem>
6305
6306      <listitem>
6307       <para>
6308        Reject <literal>\000</> in string literals and <command>COPY</> data
6309        (Tom)
6310       </para>
6311
6312       <para>
6313        Previously, this was accepted but had the effect of terminating
6314        the string contents.
6315       </para>
6316      </listitem>
6317
6318      <listitem>
6319       <para>
6320        Improve the parser's ability to report error locations (Tom)
6321       </para>
6322
6323       <para>
6324        An error location is now reported for many semantic errors,
6325        such as mismatched datatypes, that previously could not be localized.
6326       </para>
6327      </listitem>
6328
6329     </itemizedlist>
6330
6331     <sect4>
6332      <title><command>TRUNCATE</></title>
6333      <itemizedlist>
6334
6335       <listitem>
6336        <para>
6337         Support statement-level <literal>ON TRUNCATE</> triggers (Simon)
6338        </para>
6339       </listitem>
6340
6341       <listitem>
6342        <para>
6343         Add <literal>RESTART</>/<literal>CONTINUE IDENTITY</> options
6344         for <command>TRUNCATE TABLE</>
6345         (Zoltan Boszormenyi)
6346        </para>
6347
6348        <para>
6349         The start value of a sequence can be changed by <command>ALTER
6350         SEQUENCE START WITH</>.
6351        </para>
6352       </listitem>
6353
6354       <listitem>
6355        <para>
6356         Allow <command>TRUNCATE tab1, tab1</> to succeed (Bruce)
6357        </para>
6358       </listitem>
6359
6360       <listitem>
6361        <para>
6362         Add a separate <command>TRUNCATE</> permission (Robert Haas)
6363        </para>
6364       </listitem>
6365
6366      </itemizedlist>
6367
6368     </sect4>
6369
6370     <sect4>
6371      <title><command>EXPLAIN</></title>
6372      <itemizedlist>
6373
6374       <listitem>
6375        <para>
6376         Make <command>EXPLAIN VERBOSE</> show the output columns of each
6377         plan node (Tom)
6378        </para>
6379
6380        <para>
6381         Previously <command>EXPLAIN VERBOSE</> output an internal
6382         representation of the query plan.  (That behavior is now
6383         available via <varname>debug_print_plan</>.)
6384        </para>
6385       </listitem>
6386
6387       <listitem>
6388        <para>
6389         Make <command>EXPLAIN</> identify subplans and initplans with
6390         individual labels (Tom)
6391        </para>
6392       </listitem>
6393
6394       <listitem>
6395        <para>
6396         Make <command>EXPLAIN</> honor <varname>debug_print_plan</> (Tom)
6397        </para>
6398       </listitem>
6399
6400       <listitem>
6401        <para>
6402         Allow <command>EXPLAIN</> on <command>CREATE TABLE AS</> (Peter)
6403        </para>
6404       </listitem>
6405
6406      </itemizedlist>
6407
6408     </sect4>
6409
6410     <sect4>
6411      <title><literal>LIMIT</>/<literal>OFFSET</></title>
6412      <itemizedlist>
6413
6414       <listitem>
6415        <para>
6416         Allow sub-selects in <literal>LIMIT</> and <literal>OFFSET</> (Tom)
6417        </para>
6418       </listitem>
6419
6420       <listitem>
6421        <para>
6422         Add <acronym>SQL</>-standard syntax for
6423         <literal>LIMIT</>/<literal>OFFSET</> capabilities (Peter)
6424        </para>
6425
6426        <para>
6427         To wit,
6428         <literal>OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS}
6429         ONLY</>.
6430        </para>
6431       </listitem>
6432
6433      </itemizedlist>
6434
6435     </sect4>
6436
6437    </sect3>
6438
6439    <sect3>
6440     <title>Object Manipulation</title>
6441     <itemizedlist>
6442
6443      <listitem>
6444       <para>
6445        Add support for column-level privileges (Stephen Frost, KaiGai
6446        Kohei)
6447       </para>
6448      </listitem>
6449
6450      <listitem>
6451       <para>
6452        Refactor multi-object <command>DROP</> operations to reduce the
6453        need for <literal>CASCADE</> (Alex Hunsaker)
6454       </para>
6455
6456       <para>
6457        For example, if table <literal>B</> has a dependency on table
6458        <literal>A</>, the command <literal>DROP TABLE A, B</> no longer
6459        requires the <literal>CASCADE</> option.
6460       </para>
6461      </listitem>
6462
6463      <listitem>
6464       <para>
6465        Fix various problems with concurrent <command>DROP</> commands
6466        by ensuring that locks are taken before we begin to drop dependencies
6467        of an object (Tom)
6468       </para>
6469      </listitem>
6470
6471      <listitem>
6472       <para>
6473        Improve reporting of dependencies during <command>DROP</>
6474        commands (Tom)
6475       </para>
6476      </listitem>
6477
6478      <listitem>
6479       <para>
6480        Add <literal>WITH [NO] DATA</> clause to <command>CREATE TABLE
6481        AS</>, per the <acronym>SQL</> standard (Peter, Tom)
6482       </para>
6483      </listitem>
6484
6485      <listitem>
6486       <para>
6487        Add support for user-defined I/O conversion casts (Heikki)
6488       </para>
6489      </listitem>
6490
6491      <listitem>
6492       <para>
6493        Allow <command>CREATE AGGREGATE</> to use an <type>internal</>
6494        transition datatype (Tom)
6495       </para>
6496      </listitem>
6497
6498      <listitem>
6499       <para>
6500        Add <literal>LIKE</> clause to <command>CREATE TYPE</> (Tom)
6501       </para>
6502
6503       <para>
6504        This simplifies creation of data types that use the same internal
6505        representation as an existing type.
6506       </para>
6507      </listitem>
6508
6509      <listitem>
6510       <para>
6511        Allow specification of the type category and <quote>preferred</>
6512        status for user-defined base types (Tom)
6513       </para>
6514
6515       <para>
6516        This allows more control over the coercion behavior of user-defined
6517        types.
6518       </para>
6519      </listitem>
6520
6521      <listitem>
6522       <para>
6523        Allow <command>CREATE OR REPLACE VIEW</> to add columns to the
6524        end of a view (Robert Haas)
6525       </para>
6526      </listitem>
6527
6528     </itemizedlist>
6529
6530     <sect4>
6531      <title><command>ALTER</></title>
6532      <itemizedlist>
6533
6534       <listitem>
6535        <para>
6536         Add <command>ALTER TYPE RENAME</> (Petr Jelinek)
6537        </para>
6538       </listitem>
6539
6540       <listitem>
6541        <para>
6542         Add <command>ALTER SEQUENCE ... RESTART</> (with no parameter) to
6543         reset a sequence to its initial value (Zoltan Boszormenyi)
6544        </para>
6545       </listitem>
6546
6547       <listitem>
6548        <para>
6549         Modify the <command>ALTER TABLE</> syntax to allow all reasonable
6550         combinations for tables, indexes, sequences, and views (Tom)
6551        </para>
6552
6553        <para>
6554         This change allows the following new syntaxes:
6555
6556         <itemizedlist>
6557          <listitem>
6558           <para>
6559            <command>ALTER SEQUENCE OWNER TO</>
6560           </para>
6561          </listitem>
6562          <listitem>
6563           <para>
6564            <command>ALTER VIEW ALTER COLUMN SET/DROP DEFAULT</>
6565           </para>
6566          </listitem>
6567          <listitem>
6568           <para>
6569            <command>ALTER VIEW OWNER TO</>
6570           </para>
6571          </listitem>
6572          <listitem>
6573           <para>
6574            <command>ALTER VIEW SET SCHEMA</>
6575           </para>
6576          </listitem>
6577         </itemizedlist>
6578
6579         There is no actual new functionality here, but formerly
6580         you had to say <command>ALTER TABLE</> to do these things,
6581         which was confusing.
6582        </para>
6583       </listitem>
6584
6585       <listitem>
6586        <para>
6587         Add support for the syntax <command>ALTER TABLE ... ALTER COLUMN
6588         ... SET DATA TYPE</> (Peter)
6589        </para>
6590
6591        <para>
6592         This is <acronym>SQL</>-standard syntax for functionality that
6593         was already supported.
6594        </para>
6595       </listitem>
6596
6597       <listitem>
6598        <para>
6599         Make <command>ALTER TABLE SET WITHOUT OIDS</> rewrite the table
6600         to physically remove <type>OID</> values (Tom)
6601        </para>
6602
6603        <para>
6604         Also, add <command>ALTER TABLE SET WITH OIDS</> to rewrite the
6605         table to add <type>OID</>s.
6606        </para>
6607       </listitem>
6608
6609      </itemizedlist>
6610
6611     </sect4>
6612
6613     <sect4>
6614      <title>Database Manipulation</title>
6615      <itemizedlist>
6616
6617       <listitem>
6618        <para>
6619         Improve reporting of
6620         <command>CREATE</>/<command>DROP</>/<command>RENAME DATABASE</>
6621         failure when uncommitted prepared transactions are the cause
6622         (Tom)
6623        </para>
6624       </listitem>
6625
6626       <listitem>
6627        <para>
6628         Make <varname>LC_COLLATE</> and <varname>LC_CTYPE</> into
6629         per-database settings (Radek Strnad, Heikki)
6630        </para>
6631
6632        <para>
6633         This makes collation similar to encoding, which was always
6634         configurable per database.
6635        </para>
6636       </listitem>
6637
6638       <listitem>
6639        <para>
6640         Improve checks that the database encoding, collation
6641         (<varname>LC_COLLATE</>), and character classes
6642         (<varname>LC_CTYPE</>) match (Heikki, Tom)
6643        </para>
6644
6645        <para>
6646         Note in particular that a new database's encoding and locale
6647         settings can be changed only when copying from <literal>template0</>.
6648         This prevents possibly copying data that doesn't match the settings.
6649        </para>
6650       </listitem>
6651
6652       <listitem>
6653        <para>
6654         Add <command>ALTER DATABASE SET TABLESPACE</> to move a database
6655         to a new tablespace (Guillaume Lelarge, Bernd Helmle)
6656        </para>
6657       </listitem>
6658
6659      </itemizedlist>
6660
6661     </sect4>
6662
6663    </sect3>
6664
6665    <sect3>
6666     <title>Utility Operations</title>
6667
6668     <itemizedlist>
6669
6670      <listitem>
6671       <para>
6672        Add a <literal>VERBOSE</> option to the <command>CLUSTER</> command and
6673        <application>clusterdb</> (Jim Cox)
6674       </para>
6675      </listitem>
6676
6677      <listitem>
6678       <para>
6679        Decrease memory requirements for recording pending trigger
6680        events (Tom)
6681       </para>
6682      </listitem>
6683
6684     </itemizedlist>
6685
6686     <sect4>
6687      <title>Indexes</title>
6688      <itemizedlist>
6689
6690       <listitem>
6691        <para>
6692         Dramatically improve the speed of building and accessing hash
6693         indexes (Tom Raney, Shreya Bhargava)
6694        </para>
6695
6696        <para>
6697         This allows hash indexes to be sometimes faster than btree
6698         indexes.  However, hash indexes are still not crash-safe.
6699        </para>
6700       </listitem>
6701
6702       <listitem>
6703        <para>
6704         Make hash indexes store only the hash code, not the full value of
6705         the indexed column (Xiao Meng)
6706        </para>
6707
6708        <para>
6709         This greatly reduces the size of hash indexes for long indexed
6710         values, improving performance.
6711        </para>
6712       </listitem>
6713
6714       <listitem>
6715        <para>
6716         Implement fast update option for GIN indexes (Teodor, Oleg)
6717        </para>
6718
6719        <para>
6720         This option greatly improves update speed at a small penalty in search
6721         speed.
6722        </para>
6723       </listitem>
6724
6725       <listitem>
6726        <para>
6727         <literal>xxx_pattern_ops</> indexes can now be used for simple
6728         equality comparisons, not only for <literal>LIKE</> (Tom)
6729        </para>
6730       </listitem>
6731
6732      </itemizedlist>
6733
6734     </sect4>
6735
6736     <sect4>
6737      <title>Full Text Indexes</title>
6738      <itemizedlist>
6739
6740       <listitem>
6741        <para>
6742         Remove the requirement to use <literal>@@@</> when doing
6743         <acronym>GIN</> weighted lookups on full text indexes (Tom, Teodor)
6744        </para>
6745
6746        <para>
6747         The normal <literal>@@</> text search operator can be used
6748         instead.
6749        </para>
6750       </listitem>
6751
6752       <listitem>
6753        <para>
6754         Add an optimizer selectivity function for <literal>@@</> text
6755         search operations (Jan Urbanski)
6756        </para>
6757       </listitem>
6758
6759       <listitem>
6760        <para>
6761         Allow prefix matching in full text searches (Teodor Sigaev,
6762         Oleg Bartunov)
6763        </para>
6764       </listitem>
6765
6766       <listitem>
6767        <para>
6768         Support multi-column <acronym>GIN</> indexes (Teodor Sigaev)
6769        </para>
6770       </listitem>
6771
6772       <listitem>
6773        <para>
6774         Improve support for Nepali language and Devanagari alphabet (Teodor)
6775        </para>
6776       </listitem>
6777
6778      </itemizedlist>
6779
6780     </sect4>
6781
6782     <sect4>
6783      <title><command>VACUUM</></title>
6784      <itemizedlist>
6785
6786       <listitem>
6787        <para>
6788         Track free space in separate per-relation <quote>fork</> files (Heikki)
6789        </para>
6790
6791        <para>
6792         Free space discovered by <command>VACUUM</> is now recorded in
6793         <filename>*_fsm</> files, rather than in a fixed-sized shared memory
6794         area.  The <varname>max_fsm_pages</> and <varname>max_fsm_relations</>
6795         settings have been removed, greatly simplifying administration of
6796         free space management.
6797        </para>
6798       </listitem>
6799
6800       <listitem>
6801        <para>
6802         Add a visibility map to track pages that do not require
6803         vacuuming (Heikki)
6804        </para>
6805
6806        <para>
6807         This allows <command>VACUUM</> to avoid scanning all of
6808         a table when only a portion of the table needs vacuuming.
6809         The visibility map is stored in per-relation <quote>fork</> files.
6810        </para>
6811       </listitem>
6812
6813       <listitem>
6814        <para>
6815         Add <varname>vacuum_freeze_table_age</> parameter to control
6816         when <command>VACUUM</> should ignore the visibility map and
6817         do a full table scan to freeze tuples (Heikki)
6818        </para>
6819       </listitem>
6820
6821       <listitem>
6822        <para>
6823         Track transaction snapshots more carefully (Alvaro)
6824        </para>
6825
6826        <para>
6827         This improves <command>VACUUM</>'s ability to reclaim space
6828         in the presence of long-running transactions.
6829        </para>
6830       </listitem>
6831
6832       <listitem>
6833        <para>
6834         Add ability to specify per-relation autovacuum and <acronym>TOAST</>
6835         parameters in <command>CREATE TABLE</> (Alvaro, Euler Taveira de
6836         Oliveira)
6837        </para>
6838
6839        <para>
6840         Autovacuum options used to be stored in a system table.
6841        </para>
6842       </listitem>
6843
6844       <listitem>
6845        <para>
6846         Add <literal>--freeze</> option to <application>vacuumdb</>
6847         (Bruce)
6848        </para>
6849       </listitem>
6850
6851      </itemizedlist>
6852
6853     </sect4>
6854
6855    </sect3>
6856
6857    <sect3>
6858     <title>Data Types</title>
6859     <itemizedlist>
6860
6861      <listitem>
6862       <para>
6863        Add a <literal>CaseSensitive</> option for text search synonym
6864        dictionaries (Simon)
6865       </para>
6866      </listitem>
6867
6868      <listitem>
6869       <para>
6870        Improve the precision of <type>NUMERIC</> division (Tom)
6871       </para>
6872      </listitem>
6873
6874      <listitem>
6875       <para>
6876        Add basic arithmetic operators for <type>int2</> with <type>int8</>
6877        (Tom)
6878       </para>
6879
6880       <para>
6881        This eliminates the need for explicit casting in some situations.
6882       </para>
6883      </listitem>
6884
6885      <listitem>
6886       <para>
6887        Allow <type>UUID</> input to accept an optional hyphen after
6888        every fourth digit (Robert Haas)
6889       </para>
6890      </listitem>
6891
6892      <listitem>
6893       <para>
6894        Allow <literal>on</>/<literal>off</> as input for the boolean data type
6895        (Itagaki Takahiro)
6896       </para>
6897      </listitem>
6898
6899      <listitem>
6900       <para>
6901        Allow spaces around <literal>NaN</> in the input string for
6902        type <type>numeric</> (Sam Mason)
6903       </para>
6904      </listitem>
6905
6906     </itemizedlist>
6907
6908     <sect4>
6909      <title>Temporal Data Types</title>
6910      <itemizedlist>
6911
6912       <listitem>
6913        <para>
6914         Reject year <literal>0 BC</> and years <literal>000</> and
6915         <literal>0000</> (Tom)
6916        </para>
6917
6918        <para>
6919         Previously these were interpreted as <literal>1 BC</>.
6920         (Note: years <literal>0</> and <literal>00</> are still assumed to be
6921         the year 2000.)
6922        </para>
6923       </listitem>
6924
6925       <listitem>
6926        <para>
6927         Include <literal>SGT</> (Singapore time) in the default list of
6928         known time zone abbreviations (Tom)
6929        </para>
6930       </listitem>
6931
6932       <listitem>
6933        <para>
6934         Support <literal>infinity</> and <literal>-infinity</> as
6935         values of type <type>date</> (Tom)
6936        </para>
6937       </listitem>
6938
6939       <listitem>
6940        <para>
6941         Make parsing of <type>interval</> literals more standard-compliant
6942         (Tom, Ron Mayer)
6943        </para>
6944
6945        <para>
6946         For example, <literal>INTERVAL '1' YEAR</> now does what it's
6947         supposed to.
6948        </para>
6949       </listitem>
6950
6951       <listitem>
6952        <para>
6953         Allow <type>interval</> fractional-seconds precision to be specified
6954         after the <literal>second</> keyword, for <acronym>SQL</> standard
6955         compliance (Tom)
6956        </para>
6957
6958        <para>
6959         Formerly the precision had to be specified after the keyword
6960         <type>interval</>.  (For backwards compatibility, this syntax is still
6961         supported, though deprecated.)  Data type definitions will now be
6962         output using the standard format.
6963        </para>
6964       </listitem>
6965
6966       <listitem>
6967        <para>
6968         Support the <acronym>IS0 8601</> <type>interval</> syntax (Ron
6969         Mayer, Kevin Grittner)
6970        </para>
6971
6972        <para>
6973         For example, <literal>INTERVAL 'P1Y2M3DT4H5M6.7S'</> is now
6974         supported.
6975        </para>
6976       </listitem>
6977
6978       <listitem>
6979        <para>
6980         Add <varname>IntervalStyle</> parameter
6981         which controls how <type>interval</> values are output (Ron Mayer)
6982        </para>
6983
6984        <para>
6985         Valid values are:  <literal>postgres</>, <literal>postgres_verbose</>,
6986         <literal>sql_standard</>, <literal>iso_8601</>.  This setting also
6987         controls the handling of negative <type>interval</> input when only
6988         some fields have positive/negative designations.
6989        </para>
6990       </listitem>
6991
6992       <listitem>
6993        <para>
6994         Improve consistency of handling of fractional seconds in
6995         <type>timestamp</> and <type>interval</> output (Ron Mayer)
6996        </para>
6997       </listitem>
6998
6999      </itemizedlist>
7000
7001     </sect4>
7002
7003     <sect4>
7004      <title>Arrays</title>
7005      <itemizedlist>
7006
7007       <listitem>
7008        <para>
7009         Improve the handling of casts applied to <literal>ARRAY[]</>
7010         constructs, such as <literal>ARRAY[...]::integer[]</>
7011         (Brendan Jurd)
7012        </para>
7013
7014        <para>
7015         Formerly <productname>PostgreSQL</> attempted to determine a data type
7016         for the <literal>ARRAY[]</> construct without reference to the ensuing
7017         cast.  This could fail unnecessarily in many cases, in particular when
7018         the <literal>ARRAY[]</> construct was empty or contained only
7019         ambiguous entries such as <literal>NULL</>.  Now the cast is consulted
7020         to determine the type that the array elements must be.
7021        </para>
7022       </listitem>
7023
7024       <listitem>
7025        <para>
7026         Make <acronym>SQL</>-syntax <type>ARRAY</> dimensions optional
7027         to match the <acronym>SQL</> standard (Peter)
7028        </para>
7029       </listitem>
7030
7031       <listitem>
7032        <para>
7033         Add <function>array_ndims()</> to return the number
7034         of dimensions of an array (Robert Haas)
7035        </para>
7036       </listitem>
7037
7038       <listitem>
7039        <para>
7040         Add <function>array_length()</> to return the length
7041         of an array for a specified dimension (Jim Nasby, Robert
7042         Haas, Peter Eisentraut)
7043        </para>
7044       </listitem>
7045
7046       <listitem>
7047        <para>
7048         Add aggregate function <function>array_agg()</>, which
7049         returns all aggregated values as a single array (Robert Haas,
7050         Jeff Davis, Peter)
7051        </para>
7052       </listitem>
7053
7054       <listitem>
7055        <para>
7056         Add <function>unnest()</>, which converts an array to
7057         individual row values (Tom)
7058        </para>
7059
7060        <para>
7061         This is the opposite of <function>array_agg()</>.
7062        </para>
7063       </listitem>
7064
7065       <listitem>
7066        <para>
7067         Add <function>array_fill()</> to create arrays initialized with
7068         a value (Pavel Stehule)
7069        </para>
7070       </listitem>
7071
7072       <listitem>
7073        <para>
7074         Add <function>generate_subscripts()</> to simplify generating
7075         the range of an array's subscripts (Pavel Stehule)
7076        </para>
7077       </listitem>
7078
7079      </itemizedlist>
7080
7081     </sect4>
7082
7083     <sect4>
7084      <title>Wide-Value Storage (<acronym>TOAST</>)</title>
7085      <itemizedlist>
7086
7087       <listitem>
7088        <para>
7089         Consider <acronym>TOAST</> compression on values as short as
7090         32 bytes (previously 256 bytes) (Greg Stark)
7091        </para>
7092       </listitem>
7093
7094       <listitem>
7095        <para>
7096         Require 25% minimum space savings before using <acronym>TOAST</>
7097         compression (previously 20% for small values and any-savings-at-all
7098         for large values) (Greg)
7099        </para>
7100       </listitem>
7101
7102       <listitem>
7103        <para>
7104         Improve <acronym>TOAST</> heuristics for rows that have a mix of large
7105         and small toastable fields, so that we prefer to push large values out
7106         of line and don't compress small values unnecessarily (Greg, Tom)
7107        </para>
7108       </listitem>
7109
7110      </itemizedlist>
7111
7112     </sect4>
7113
7114    </sect3>
7115
7116    <sect3>
7117     <title>Functions</title>
7118     <itemizedlist>
7119
7120      <listitem>
7121       <para>
7122        Document that <function>setseed()</> allows values from
7123        <literal>-1</> to <literal>1</> (not just <literal>0</> to
7124        <literal>1</>), and enforce the valid range (Kris Jurka)
7125       </para>
7126      </listitem>
7127
7128      <listitem>
7129       <para>
7130        Add server-side function <function>lo_import(filename, oid)</>
7131        (Tatsuo)
7132       </para>
7133      </listitem>
7134
7135      <listitem>
7136       <para>
7137        Add <function>quote_nullable()</>, which behaves like
7138        <function>quote_literal()</> but returns the string <literal>NULL</> for
7139        a null argument (Brendan Jurd)
7140       </para>
7141      </listitem>
7142
7143      <listitem>
7144       <para>
7145        Improve full text search <function>headline()</> function to
7146        allow extracting several fragments of text (Sushant Sinha)
7147       </para>
7148      </listitem>
7149
7150      <listitem>
7151       <para>
7152        Add <function>suppress_redundant_updates_trigger()</> trigger
7153        function to avoid overhead for non-data-changing updates (Andrew)
7154       </para>
7155      </listitem>
7156
7157      <listitem>
7158       <para>
7159        Add <function>div(numeric, numeric)</> to perform <type>numeric</>
7160        division without rounding (Tom)
7161       </para>
7162      </listitem>
7163
7164      <listitem>
7165       <para>
7166        Add <type>timestamp</> and <type>timestamptz</> versions of
7167        <function>generate_series()</> (Hitoshi Harada)
7168       </para>
7169      </listitem>
7170
7171     </itemizedlist>
7172
7173     <sect4>
7174      <title>Object Information Functions</title>
7175      <itemizedlist>
7176
7177       <listitem>
7178        <para>
7179         Implement <function>current_query()</> for use by functions
7180         that need to know the currently running query (Tomas Doran)
7181        </para>
7182       </listitem>
7183
7184       <listitem>
7185        <para>
7186         Add <function>pg_get_keywords()</> to return a list of the
7187         parser keywords (Dave Page)
7188        </para>
7189       </listitem>
7190
7191       <listitem>
7192        <para>
7193         Add <function>pg_get_functiondef()</> to see a function's
7194         definition (Abhijit Menon-Sen)
7195        </para>
7196       </listitem>
7197
7198       <listitem>
7199        <para>
7200         Allow the second argument of <function>pg_get_expr()</> to be zero
7201         when deparsing an expression that does not contain variables (Tom)
7202        </para>
7203       </listitem>
7204
7205       <listitem>
7206        <para>
7207         Modify <function>pg_relation_size()</> to use <literal>regclass</>
7208         (Heikki)
7209        </para>
7210
7211        <para>
7212         <function>pg_relation_size(data_type_name)</> no longer works.
7213        </para>
7214       </listitem>
7215
7216       <listitem>
7217        <para>
7218         Add <literal>boot_val</> and <literal>reset_val</> columns to
7219         <literal>pg_settings</> output (Greg Smith)
7220        </para>
7221       </listitem>
7222
7223       <listitem>
7224        <para>
7225         Add source file name and line number columns to
7226         <literal>pg_settings</> output for variables set in a configuration
7227         file (Magnus, Alvaro)
7228        </para>
7229
7230        <para>
7231         For security reasons, these columns are only visible to superusers.
7232        </para>
7233       </listitem>
7234
7235       <listitem>
7236        <para>
7237         Add support for <varname>CURRENT_CATALOG</>,
7238         <varname>CURRENT_SCHEMA</>, <varname>SET CATALOG</>, <varname>SET
7239         SCHEMA</> (Peter)
7240        </para>
7241
7242        <para>
7243         These provide <acronym>SQL</>-standard syntax for existing features.
7244        </para>
7245       </listitem>
7246
7247       <listitem>
7248        <para>
7249         Add <function>pg_typeof()</> which returns the data type
7250         of any value (Brendan Jurd)
7251        </para>
7252       </listitem>
7253
7254       <listitem>
7255        <para>
7256         Make <function>version()</> return information about whether
7257         the server is a 32- or 64-bit binary (Bruce)
7258        </para>
7259       </listitem>
7260
7261       <listitem>
7262        <para>
7263         Fix the behavior of information schema columns
7264         <structfield>is_insertable_into</> and <structfield>is_updatable</> to
7265         be consistent (Peter)
7266        </para>
7267       </listitem>
7268
7269       <listitem>
7270        <para>
7271         Improve the behavior of information schema
7272         <structfield>datetime_precision</> columns (Peter)
7273        </para>
7274
7275        <para>
7276         These columns now show zero for <type>date</> columns, and 6
7277         (the default precision) for <type>time</>, <type>timestamp</>, and
7278         <type>interval</> without a declared precision, rather than showing
7279         null as formerly.
7280        </para>
7281       </listitem>
7282
7283       <listitem>
7284        <para>
7285         Convert remaining builtin set-returning functions to use
7286         <literal>OUT</> parameters (Jaime Casanova)
7287        </para>
7288
7289        <para>
7290         This makes it possible to call these functions without specifying
7291         a column list:  <function>pg_show_all_settings()</>,
7292         <function>pg_lock_status()</>, <function>pg_prepared_xact()</>,
7293         <function>pg_prepared_statement()</>, <function>pg_cursor()</>
7294        </para>
7295       </listitem>
7296
7297       <listitem>
7298        <para>
7299         Make <function>pg_*_is_visible()</> and
7300         <function>has_*_privilege()</> functions return <literal>NULL</>
7301         for invalid OIDs, rather than reporting an error (Tom)
7302        </para>
7303       </listitem>
7304
7305       <listitem>
7306        <para>
7307         Extend <function>has_*_privilege()</> functions to allow inquiring
7308         about the OR of multiple privileges in one call (Stephen
7309         Frost, Tom)
7310        </para>
7311       </listitem>
7312
7313       <listitem>
7314        <para>
7315         Add <function>has_column_privilege()</> and
7316         <function>has_any_column_privilege()</> functions (Stephen
7317         Frost, Tom)
7318        </para>
7319       </listitem>
7320
7321      </itemizedlist>
7322
7323     </sect4>
7324
7325     <sect4>
7326      <title>Function Creation</title>
7327      <itemizedlist>
7328
7329       <listitem>
7330        <para>
7331         Support variadic functions (functions with a variable number
7332         of arguments) (Pavel Stehule)
7333        </para>
7334
7335        <para>
7336         Only trailing arguments can be optional, and they all must be
7337         of the same data type.
7338        </para>
7339       </listitem>
7340
7341       <listitem>
7342        <para>
7343         Support default values for function arguments (Pavel Stehule)
7344        </para>
7345       </listitem>
7346
7347       <listitem>
7348        <para>
7349         Add <command>CREATE FUNCTION ... RETURNS TABLE</> clause (Pavel
7350         Stehule)
7351        </para>
7352       </listitem>
7353
7354       <listitem>
7355        <para>
7356         Allow <acronym>SQL</>-language functions to return the output
7357         of an <command>INSERT</>/<command>UPDATE</>/<command>DELETE</>
7358         <literal>RETURNING</> clause (Tom)
7359        </para>
7360       </listitem>
7361
7362      </itemizedlist>
7363
7364     </sect4>
7365
7366     <sect4>
7367      <title>PL/pgSQL Server-Side Language</title>
7368      <itemizedlist>
7369
7370       <listitem>
7371        <para>
7372         Support <literal>EXECUTE USING</> for easier insertion of data
7373         values into a dynamic query string (Pavel Stehule)
7374        </para>
7375       </listitem>
7376
7377       <listitem>
7378        <para>
7379         Allow looping over the results of a cursor using a <literal>FOR</>
7380         loop (Pavel Stehule)
7381        </para>
7382       </listitem>
7383
7384       <listitem>
7385        <para>
7386         Support <literal>RETURN QUERY EXECUTE</> (Pavel
7387         Stehule)
7388        </para>
7389       </listitem>
7390
7391       <listitem>
7392        <para>
7393         Improve the <literal>RAISE</> command (Pavel Stehule)
7394
7395         <itemizedlist>
7396          <listitem>
7397           <para>
7398            Support <literal>DETAIL</> and <literal>HINT</> fields
7399           </para>
7400          </listitem>
7401          <listitem>
7402           <para>
7403            Support specification of the <literal>SQLSTATE</> error code
7404           </para>
7405          </listitem>
7406          <listitem>
7407           <para>
7408            Support an exception name parameter
7409           </para>
7410          </listitem>
7411          <listitem>
7412           <para>
7413            Allow <literal>RAISE</> without parameters in an exception
7414            block to re-throw the current error
7415           </para>
7416          </listitem>
7417         </itemizedlist>
7418        </para>
7419       </listitem>
7420
7421       <listitem>
7422        <para>
7423         Allow specification of <varname>SQLSTATE</> codes
7424         in <literal>EXCEPTION</> lists (Pavel Stehule)
7425        </para>
7426
7427        <para>
7428         This is useful for handling custom <varname>SQLSTATE</> codes.
7429        </para>
7430       </listitem>
7431
7432       <listitem>
7433        <para>
7434         Support the <literal>CASE</> statement (Pavel Stehule)
7435        </para>
7436       </listitem>
7437
7438       <listitem>
7439        <para>
7440         Make <command>RETURN QUERY</> set the special <literal>FOUND</> and
7441         <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variables
7442         (Pavel Stehule)
7443        </para>
7444       </listitem>
7445
7446       <listitem>
7447        <para>
7448         Make <command>FETCH</> and <command>MOVE</> set the
7449         <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variable
7450         (Andrew Gierth)
7451        </para>
7452       </listitem>
7453
7454       <listitem>
7455        <para>
7456         Make <command>EXIT</> without a label always exit the innermost
7457         loop (Tom)
7458        </para>
7459
7460        <para>
7461         Formerly, if there were a <literal>BEGIN</> block more closely nested
7462         than any loop, it would exit that block instead.  The new behavior
7463         matches Oracle(TM) and is also what was previously stated by our own
7464         documentation.
7465        </para>
7466       </listitem>
7467
7468       <listitem>
7469        <para>
7470         Make processing of string literals and nested block comments
7471         match the main SQL parser's processing (Tom)
7472        </para>
7473
7474        <para>
7475         In particular, the format string in <command>RAISE</> now works
7476         the same as any other string literal, including being subject
7477         to <varname>standard_conforming_strings</>.  This change also
7478         fixes other cases in which valid commands would fail when
7479         <varname>standard_conforming_strings</> is on.
7480        </para>
7481       </listitem>
7482
7483       <listitem>
7484        <para>
7485         Avoid memory leakage when the same function is called at varying
7486         exception-block nesting depths (Tom)
7487        </para>
7488       </listitem>
7489
7490      </itemizedlist>
7491
7492     </sect4>
7493
7494    </sect3>
7495
7496    <sect3>
7497     <title>Client Applications</title>
7498
7499     <itemizedlist>
7500
7501      <listitem>
7502       <para>
7503        Fix <literal>pg_ctl restart</> to preserve command-line arguments
7504        (Bruce)
7505       </para>
7506      </listitem>
7507
7508      <listitem>
7509       <para>
7510        Add <literal>-w</>/<literal>--no-password</> option that
7511        prevents password prompting in all utilities that have a
7512        <literal>-W</>/<literal>--password</> option (Peter)
7513       </para>
7514      </listitem>
7515
7516      <listitem>
7517       <para>
7518        Remove <option>-q</> (quiet) option of <application>createdb</>,
7519        <application>createuser</>, <application>dropdb</>,
7520        <application>dropuser</> (Peter)
7521       </para>
7522
7523       <para>
7524        These options have had no effect since <productname>PostgreSQL</>
7525        8.3.
7526       </para>
7527      </listitem>
7528
7529     </itemizedlist>
7530
7531     <sect4>
7532      <title><application>psql</></title>
7533      <itemizedlist>
7534
7535       <listitem>
7536        <para>
7537         Remove verbose startup banner; now just suggest <literal>help</>
7538         (Joshua Drake)
7539        </para>
7540       </listitem>
7541
7542       <listitem>
7543        <para>
7544         Make <literal>help</> show common backslash commands (Greg
7545         Sabino Mullane)
7546        </para>
7547       </listitem>
7548
7549       <listitem>
7550        <para>
7551         Add <literal>\pset format wrapped</> mode to wrap output to the
7552         screen width, or file/pipe output too if <literal>\pset columns</>
7553         is set (Bryce Nesbitt)
7554        </para>
7555       </listitem>
7556
7557       <listitem>
7558        <para>
7559         Allow all supported spellings of boolean values in <command>\pset</>,
7560         rather than just <literal>on</> and <literal>off</> (Bruce)
7561        </para>
7562
7563        <para>
7564         Formerly, any string other than <quote>off</> was silently taken
7565         to mean <literal>true</>.  <application>psql</> will now complain
7566         about unrecognized spellings (but still take them as <literal>true</>).
7567        </para>
7568       </listitem>
7569
7570       <listitem>
7571        <para>
7572         Use the pager for wide output (Bruce)
7573        </para>
7574       </listitem>
7575
7576       <listitem>
7577        <para>
7578         Require a space between a one-letter backslash command and its first
7579         argument (Bernd Helmle)
7580        </para>
7581
7582        <para>
7583         This removes a historical source of ambiguity.
7584        </para>
7585       </listitem>
7586
7587       <listitem>
7588        <para>
7589         Improve tab completion support for schema-qualified and
7590         quoted identifiers (Greg Sabino Mullane)
7591        </para>
7592       </listitem>
7593
7594       <listitem>
7595        <para>
7596         Add optional <literal>on</>/<literal>off</> argument for
7597         <command>\timing</> (David Fetter)
7598        </para>
7599       </listitem>
7600
7601       <listitem>
7602        <para>
7603         Display access control rights on multiple lines (Brendan
7604         Jurd, Andreas Scherbaum)
7605        </para>
7606       </listitem>
7607
7608       <listitem>
7609        <para>
7610         Make <command>\l</> show database access privileges (Andrew Gilligan)
7611        </para>
7612       </listitem>
7613
7614       <listitem>
7615        <para>
7616         Make <command>\l+</> show database sizes, if permissions
7617         allow (Andrew Gilligan)
7618        </para>
7619       </listitem>
7620
7621       <listitem>
7622        <para>
7623         Add the <command>\ef</> command to edit function definitions
7624         (Abhijit Menon-Sen)
7625        </para>
7626       </listitem>
7627
7628      </itemizedlist>
7629
7630     </sect4>
7631
7632     <sect4>
7633      <title><application>psql</> \d* commands</title>
7634
7635      <itemizedlist>
7636
7637       <listitem>
7638        <para>
7639         Make <command>\d*</> commands that do not have a pattern argument
7640         show system objects only if the <literal>S</> modifier is specified
7641         (Greg Sabino Mullane, Bruce)
7642        </para>
7643
7644        <para>
7645         The former behavior was inconsistent across different variants
7646         of <command>\d</>, and in most cases it provided no easy way to see
7647         just user objects.
7648        </para>
7649       </listitem>
7650
7651       <listitem>
7652        <para>
7653         Improve <command>\d*</> commands to work with older
7654         <productname>PostgreSQL</> server versions (back to 7.4),
7655         not only the current server version
7656         (Guillaume Lelarge)
7657        </para>
7658       </listitem>
7659
7660       <listitem>
7661        <para>
7662         Make <command>\d</> show foreign-key constraints that reference
7663         the selected table (Kenneth D'Souza)
7664        </para>
7665       </listitem>
7666
7667       <listitem>
7668        <para>
7669         Make <command>\d</> on a sequence show its column values
7670         (Euler Taveira de Oliveira)
7671        </para>
7672       </listitem>
7673
7674       <listitem>
7675        <para>
7676         Add column storage type and other relation options to the
7677         <command>\d+</> display (Gregory Stark, Euler Taveira de
7678         Oliveira)
7679        </para>
7680       </listitem>
7681
7682       <listitem>
7683        <para>
7684         Show relation size in <command>\dt+</> output (Dickson S.
7685         Guedes)
7686        </para>
7687       </listitem>
7688
7689       <listitem>
7690        <para>
7691         Show the possible values of <literal>enum</> types in <command>\dT+</>
7692         (David Fetter)
7693        </para>
7694       </listitem>
7695
7696       <listitem>
7697        <para>
7698         Allow <command>\dC</> to accept a wildcard pattern, which matches
7699         either datatype involved in the cast (Tom)
7700        </para>
7701       </listitem>
7702
7703       <listitem>
7704        <para>
7705         Add a function type column to <command>\df</>'s output, and add
7706         options to list only selected types of functions (David Fetter)
7707        </para>
7708       </listitem>
7709
7710       <listitem>
7711        <para>
7712         Make <command>\df</> not hide functions that take or return
7713         type <type>cstring</> (Tom)
7714        </para>
7715
7716        <para>
7717         Previously, such functions were hidden because most of them are
7718         datatype I/O functions, which were deemed uninteresting.  The new
7719         policy about hiding system functions by default makes this wart
7720         unnecessary.
7721        </para>
7722       </listitem>
7723
7724      </itemizedlist>
7725
7726     </sect4>
7727
7728     <sect4>
7729      <title><application>pg_dump</></title>
7730      <itemizedlist>
7731
7732       <listitem>
7733        <para>
7734         Add a <literal>--no-tablespaces</> option to
7735         <application>pg_dump</>/<application>pg_dumpall</>/<application>pg_restore</>
7736         so that dumps can be restored to clusters that have non-matching
7737         tablespace layouts (Gavin Roy)
7738        </para>
7739       </listitem>
7740
7741       <listitem>
7742        <para>
7743         Remove <option>-d</> and <option>-D</> options from
7744         <application>pg_dump</> and <application>pg_dumpall</> (Tom)
7745        </para>
7746
7747        <para>
7748         These options were too frequently confused with the option to
7749         select a database name in other <productname>PostgreSQL</>
7750         client applications.  The functionality is still available,
7751         but you must now spell out the long option name
7752         <option>--inserts</> or <option>--column-inserts</>.
7753        </para>
7754       </listitem>
7755
7756       <listitem>
7757        <para>
7758         Remove <option>-i</>/<option>--ignore-version</> option from
7759         <application>pg_dump</> and <application>pg_dumpall</> (Tom)
7760        </para>
7761
7762        <para>
7763         Use of this option does not throw an error, but it has no
7764         effect.  This option was removed because the version checks
7765         are necessary for safety.
7766        </para>
7767       </listitem>
7768
7769       <listitem>
7770        <para>
7771         Disable <varname>statement_timeout</> during dump and restore
7772         (Joshua Drake)
7773        </para>
7774       </listitem>
7775
7776       <listitem>
7777        <para>
7778         Add <application>pg_dump</>/<application>pg_dumpall</> option
7779         <option>--lock-wait-timeout</> (David Gould)
7780        </para>
7781
7782        <para>
7783         This allows dumps to fail if unable to acquire a shared lock
7784         within the specified amount of time.
7785        </para>
7786       </listitem>
7787
7788       <listitem>
7789        <para>
7790         Reorder <application>pg_dump</> <literal>--data-only</> output
7791         to dump tables referenced by foreign keys before
7792         the referencing tables (Tom)
7793        </para>
7794
7795        <para>
7796         This allows data loads when foreign keys are already present.
7797         If circular references make a safe ordering impossible, a
7798         <literal>NOTICE</> is issued.
7799        </para>
7800       </listitem>
7801
7802       <listitem>
7803        <para>
7804         Allow <application>pg_dump</>, <application>pg_dumpall</>, and
7805         <application>pg_restore</> to use a specified role (Benedek
7806         L&aacute;szl&oacute;)
7807        </para>
7808       </listitem>
7809
7810       <listitem>
7811        <para>
7812         Allow <application>pg_restore</> to use multiple concurrent
7813         connections to do the restore (Andrew)
7814        </para>
7815
7816        <para>
7817         The number of concurrent connections is controlled by the option
7818         <literal>--jobs</>.  This is supported only for custom-format archives.
7819        </para>
7820       </listitem>
7821
7822      </itemizedlist>
7823
7824     </sect4>
7825
7826    </sect3>
7827
7828    <sect3>
7829     <title>Programming Tools</title>
7830
7831     <sect4>
7832      <title><application>libpq</></title>
7833      <itemizedlist>
7834
7835       <listitem>
7836        <para>
7837         Allow the <type>OID</> to be specified when importing a large
7838         object, via new function <function>lo_import_with_oid()</> (Tatsuo)
7839        </para>
7840       </listitem>
7841
7842       <listitem>
7843        <para>
7844         Add <quote>events</> support (Andrew Chernow, Merlin Moncure)
7845        </para>
7846
7847        <para>
7848         This adds the ability to register callbacks to manage private
7849         data associated with <structname>PGconn</> and <structname>PGresult</>
7850         objects.
7851        </para>
7852       </listitem>
7853
7854       <listitem>
7855        <para>
7856         Improve error handling to allow the return of multiple
7857         error messages as multi-line error reports (Magnus)
7858        </para>
7859       </listitem>
7860
7861       <listitem>
7862        <para>
7863         Make <function>PQexecParams()</> and related functions return
7864         <varname>PGRES_EMPTY_QUERY</> for an empty query (Tom)
7865        </para>
7866
7867        <para>
7868         They previously returned <varname>PGRES_COMMAND_OK</>.
7869        </para>
7870       </listitem>
7871
7872       <listitem>
7873        <para>
7874         Document how to avoid the overhead of <function>WSACleanup()</>
7875         on Windows (Andrew Chernow)
7876        </para>
7877       </listitem>
7878
7879       <listitem>
7880        <para>
7881         Do not rely on Kerberos tickets to determine the default database
7882         username (Magnus)
7883        </para>
7884
7885        <para>
7886         Previously, a Kerberos-capable build of libpq would use the
7887         principal name from any available Kerberos ticket as default
7888         database username, even if the connection wasn't using Kerberos
7889         authentication.  This was deemed inconsistent and confusing.
7890         The default username is now determined the same way with or
7891         without Kerberos.  Note however that the database username must still
7892         match the ticket when Kerberos authentication is used.
7893        </para>
7894       </listitem>
7895      </itemizedlist>
7896
7897     </sect4>
7898
7899     <sect4>
7900      <title><application>libpq</> <acronym>SSL</> (Secure Sockets Layer)
7901       support</title>
7902      <itemizedlist>
7903
7904       <listitem>
7905        <para>
7906         Fix certificate validation for <acronym>SSL</> connections
7907         (Magnus)
7908        </para>
7909
7910        <para>
7911         <application>libpq</> now supports verifying both the certificate
7912         and the name of the server when making <acronym>SSL</>
7913         connections. If a root certificate is not available to use for
7914         verification, <acronym>SSL</> connections will fail. The
7915         <literal>sslmode</> parameter is used to enable certificate
7916         verification and set the level of checking.
7917         The default is still not to do any verification, allowing connections
7918         to SSL-enabled servers without requiring a root certificate on the
7919         client.
7920        </para>
7921       </listitem>
7922
7923       <listitem>
7924        <para>
7925         Support wildcard server certificates (Magnus)
7926        </para>
7927
7928        <para>
7929         If a certificate <acronym>CN</> starts with <literal>*</>, it will
7930         be treated as a wildcard when matching the hostname, allowing the
7931         use of the same certificate for multiple servers.
7932        </para>
7933       </listitem>
7934
7935       <listitem>
7936        <para>
7937         Allow the file locations for client certificates to be specified
7938         (Mark Woodward, Alvaro, Magnus)
7939        </para>
7940       </listitem>
7941
7942       <listitem>
7943        <para>
7944         Add a <function>PQinitOpenSSL</> function to allow greater control
7945         over OpenSSL/libcrypto initialization (Andrew Chernow)
7946        </para>
7947       </listitem>
7948
7949       <listitem>
7950        <para>
7951         Make <application>libpq</> unregister its <application>OpenSSL</>
7952         callbacks when no database connections remain open
7953         (Bruce, Magnus, Russell Smith)
7954        </para>
7955
7956        <para>
7957         This is required for applications that unload the libpq library,
7958         otherwise invalid <application>OpenSSL</> callbacks will remain.
7959        </para>
7960       </listitem>
7961
7962      </itemizedlist>
7963
7964     </sect4>
7965
7966     <sect4>
7967      <title><application>ecpg</></title>
7968      <itemizedlist>
7969
7970       <listitem>
7971        <para>
7972         Add localization support for messages (Euler Taveira de
7973         Oliveira)
7974        </para>
7975       </listitem>
7976
7977       <listitem>
7978        <para>
7979         ecpg parser is now automatically generated from the server
7980         parser (Michael)
7981        </para>
7982
7983        <para>
7984         Previously the ecpg parser was hand-maintained.
7985        </para>
7986       </listitem>
7987
7988      </itemizedlist>
7989
7990     </sect4>
7991
7992     <sect4>
7993      <title>Server Programming Interface (<acronym>SPI</>)</title>
7994      <itemizedlist>
7995
7996       <listitem>
7997        <para>
7998         Add support for single-use plans with out-of-line
7999         parameters (Tom)
8000        </para>
8001       </listitem>
8002
8003       <listitem>
8004        <para>
8005         Add new <varname>SPI_OK_REWRITTEN</> return code for
8006         <function>SPI_execute()</> (Heikki)
8007        </para>
8008
8009        <para>
8010         This is used when a command is rewritten to another type of
8011         command.
8012        </para>
8013       </listitem>
8014
8015       <listitem>
8016        <para>
8017         Remove unnecessary inclusions from <filename>executor/spi.h</> (Tom)
8018        </para>
8019
8020        <para>
8021         SPI-using modules might need to add some <literal>#include</>
8022         lines if they were depending on <filename>spi.h</> to include
8023         things for them.
8024        </para>
8025       </listitem>
8026
8027      </itemizedlist>
8028
8029     </sect4>
8030
8031    </sect3>
8032
8033    <sect3>
8034     <title>Build Options</title>
8035     <itemizedlist>
8036
8037      <listitem>
8038       <para>
8039        Update build system to use <productname>Autoconf</> 2.61 (Peter)
8040       </para>
8041      </listitem>
8042
8043      <listitem>
8044       <para>
8045        Require <productname>GNU bison</> for source code builds (Peter)
8046       </para>
8047
8048       <para>
8049        This has effectively been required for several years, but now there
8050        is no infrastructure claiming to support other parser tools.
8051       </para>
8052      </listitem>
8053
8054      <listitem>
8055       <para>
8056        Add <application>pg_config</> <literal>--htmldir</> option
8057        (Peter)
8058       </para>
8059      </listitem>
8060
8061      <listitem>
8062       <para>
8063        Pass <type>float4</> by value inside the server (Zoltan
8064        Boszormenyi)
8065       </para>
8066
8067       <para>
8068        Add <application>configure</> option
8069        <literal>--disable-float4-byval</> to use the old behavior.
8070        External C functions that use old-style (version 0) call convention
8071        and pass or return <type>float4</> values will be broken by this
8072        change, so you may need the <application>configure</> option if you
8073        have such functions and don't want to update them.
8074       </para>
8075      </listitem>
8076
8077      <listitem>
8078       <para>
8079        Pass <type>float8</>, <type>int8</>, and related datatypes
8080        by value inside the server on 64-bit platforms (Zoltan Boszormenyi)
8081       </para>
8082
8083       <para>
8084        Add <application>configure</> option
8085        <literal>--disable-float8-byval</> to use the old behavior.
8086        As above, this change might break old-style external C functions.
8087       </para>
8088      </listitem>
8089
8090      <listitem>
8091       <para>
8092        Add configure options <literal>--with-segsize</>,
8093        <literal>--with-blocksize</>, <literal>--with-wal-blocksize</>,
8094        <literal>--with-wal-segsize</> (Zdenek Kotala, Tom)
8095       </para>
8096
8097       <para>
8098        This simplifies build-time control over several constants that
8099        previously could only be changed by editing
8100        <filename>pg_config_manual.h</>.
8101       </para>
8102      </listitem>
8103
8104      <listitem>
8105       <para>
8106        Allow threaded builds on <productname>Solaris</> 2.5 (Bruce)
8107       </para>
8108      </listitem>
8109
8110      <listitem>
8111       <para>
8112        Use the system's <function>getopt_long()</> on <productname>Solaris</>
8113        (Zdenek Kotala, Tom)
8114       </para>
8115
8116       <para>
8117        This makes option processing more consistent with what Solaris users
8118        expect.
8119       </para>
8120      </listitem>
8121
8122      <listitem>
8123       <para>
8124        Add support for the <productname>Sun Studio</> compiler on
8125        <productname>Linux</> (Julius Stroffek)
8126       </para>
8127      </listitem>
8128
8129      <listitem>
8130       <para>
8131        Append the major version number to the backend <application>gettext</>
8132        domain, and the <literal>soname</> major version number to
8133        libraries' <application>gettext</> domain (Peter)
8134       </para>
8135
8136       <para>
8137        This simplifies parallel installations of multiple versions.
8138       </para>
8139      </listitem>
8140
8141      <listitem>
8142       <para>
8143        Add support for code coverage testing with <application>gcov</>
8144        (Michelle Caisse)
8145       </para>
8146      </listitem>
8147
8148      <listitem>
8149       <para>
8150        Allow out-of-tree builds on <productname>Mingw</> and
8151        <productname>Cygwin</> (Richard Evans)
8152       </para>
8153      </listitem>
8154
8155      <listitem>
8156       <para>
8157        Fix the use of <productname>Mingw</> as a cross-compiling source
8158        platform (Peter)
8159       </para>
8160      </listitem>
8161
8162     </itemizedlist>
8163
8164    </sect3>
8165
8166    <sect3>
8167     <title>Source Code</title>
8168     <itemizedlist>
8169
8170      <listitem>
8171       <para>
8172        Support 64-bit time zone data files (Heikki)
8173       </para>
8174
8175       <para>
8176        This adds support for daylight saving time (<acronym>DST</>)
8177        calculations beyond the year 2038.
8178       </para>
8179      </listitem>
8180
8181      <listitem>
8182       <para>
8183        Deprecate use of platform's <type>time_t</> data type (Tom)
8184       </para>
8185
8186       <para>
8187        Some platforms have migrated to 64-bit <type>time_t</>, some have
8188        not, and Windows can't make up its mind what it's doing.  Define
8189        <type>pg_time_t</> to have the same meaning as <type>time_t</>,
8190        but always be 64 bits (unless the platform has no 64-bit integer type),
8191        and use that type in all module APIs and on-disk data formats.
8192       </para>
8193      </listitem>
8194
8195      <listitem>
8196       <para>
8197        Fix bug in handling of the time zone database when cross-compiling
8198        (Richard Evans)
8199       </para>
8200      </listitem>
8201
8202      <listitem>
8203       <para>
8204        Link backend object files in one step, rather than in stages
8205        (Peter)
8206       </para>
8207      </listitem>
8208
8209      <listitem>
8210       <para>
8211        Improve <application>gettext</> support to allow better translation
8212        of plurals (Peter)
8213       </para>
8214      </listitem>
8215
8216      <listitem>
8217       <para>
8218        Add message translation support to the PL languages (Alvaro, Peter)
8219       </para>
8220      </listitem>
8221
8222      <listitem>
8223       <para>
8224        Add more <application>DTrace</> probes (Robert Lor)
8225       </para>
8226      </listitem>
8227
8228      <listitem>
8229       <para>
8230        Enable <application>DTrace</> support on <application>Mac OS X
8231        Leopard</> and other non-Solaris platforms (Robert Lor)
8232       </para>
8233      </listitem>
8234
8235      <listitem>
8236       <para>
8237        Simplify and standardize conversions between C strings and
8238        <type>text</> datums, by providing common functions for the purpose
8239        (Brendan Jurd, Tom)
8240       </para>
8241      </listitem>
8242
8243      <listitem>
8244       <para>
8245        Clean up the <filename>include/catalog/</> header files so that
8246        frontend programs can include them without including
8247        <filename>postgres.h</>
8248        (Zdenek Kotala)
8249       </para>
8250      </listitem>
8251
8252      <listitem>
8253       <para>
8254        Make <type>name</> char-aligned, and suppress zero-padding of
8255        <type>name</> entries in indexes (Tom)
8256       </para>
8257      </listitem>
8258
8259      <listitem>
8260       <para>
8261        Recover better if dynamically-loaded code executes <function>exit()</>
8262        (Tom)
8263       </para>
8264      </listitem>
8265
8266      <listitem>
8267       <para>
8268        Add a hook to let plug-ins monitor the executor (Itagaki
8269        Takahiro)
8270       </para>
8271      </listitem>
8272
8273      <listitem>
8274       <para>
8275        Add a hook to allow the planner's statistics lookup behavior to
8276        be overridden (Simon Riggs)
8277       </para>
8278      </listitem>
8279
8280      <listitem>
8281       <para>
8282        Add <function>shmem_startup_hook()</> for custom shared memory
8283        requirements (Tom)
8284       </para>
8285      </listitem>
8286
8287      <listitem>
8288       <para>
8289        Replace the index access method <function>amgetmulti</> entry point
8290        with <function>amgetbitmap</>, and extend the API for
8291        <function>amgettuple</> to support run-time determination of
8292        operator lossiness (Heikki, Tom, Teodor)
8293       </para>
8294
8295       <para>
8296        The API for GIN and GiST opclass <function>consistent</> functions
8297        has been extended as well.
8298       </para>
8299      </listitem>
8300
8301      <listitem>
8302       <para>
8303        Add support for partial-match searches in <acronym>GIN</> indexes
8304        (Teodor Sigaev, Oleg Bartunov)
8305       </para>
8306      </listitem>
8307
8308      <listitem>
8309       <para>
8310        Replace <structname>pg_class</> column <structfield>reltriggers</>
8311        with boolean <structfield>relhastriggers</> (Simon)
8312       </para>
8313
8314       <para>
8315        Also remove unused <structname>pg_class</> columns
8316        <structfield>relukeys</>, <structfield>relfkeys</>, and
8317        <structfield>relrefs</>.
8318       </para>
8319      </listitem>
8320
8321      <listitem>
8322       <para>
8323        Add a <structfield>relistemp</> column to <structname>pg_class</>
8324        to ease identification of temporary tables (Tom)
8325       </para>
8326      </listitem>
8327
8328      <listitem>
8329       <para>
8330        Move platform <acronym>FAQ</>s into the main documentation
8331        (Peter)
8332       </para>
8333      </listitem>
8334
8335      <listitem>
8336       <para>
8337        Prevent parser input files from being built with any conflicts
8338        (Peter)
8339       </para>
8340      </listitem>
8341
8342      <listitem>
8343       <para>
8344        Add support for the <literal>KOI8U</> (Ukrainian) encoding
8345        (Peter)
8346       </para>
8347      </listitem>
8348
8349      <listitem>
8350       <para>
8351        Add Japanese message translations (Japan PostgreSQL Users Group)
8352       </para>
8353
8354       <para>
8355        This used to be maintained as a separate project.
8356       </para>
8357      </listitem>
8358
8359      <listitem>
8360       <para>
8361        Fix problem when setting <varname>LC_MESSAGES</> on
8362        <application>MSVC</>-built systems (Hiroshi Inoue, Hiroshi
8363        Saito, Magnus)
8364       </para>
8365      </listitem>
8366
8367     </itemizedlist>
8368
8369    </sect3>
8370
8371    <sect3>
8372     <title>Contrib</title>
8373
8374     <itemizedlist>
8375
8376      <listitem>
8377       <para>
8378        Add <filename>contrib/auto_explain</> to automatically run
8379        <command>EXPLAIN</> on queries exceeding a specified duration
8380        (Itagaki Takahiro, Tom)
8381       </para>
8382      </listitem>
8383
8384      <listitem>
8385       <para>
8386        Add <filename>contrib/btree_gin</> to allow GIN indexes to
8387        handle more datatypes (Oleg, Teodor)
8388       </para>
8389      </listitem>
8390
8391      <listitem>
8392       <para>
8393        Add <filename>contrib/citext</> to provide a case-insensitive,
8394        multibyte-aware text data type (David Wheeler)
8395       </para>
8396      </listitem>
8397
8398      <listitem>
8399       <para>
8400        Add <filename>contrib/pg_stat_statements</> for server-wide
8401        tracking of statement execution statistics (Itagaki Takahiro)
8402       </para>
8403      </listitem>
8404
8405      <listitem>
8406       <para>
8407        Add duration and query mode options to <filename>contrib/pgbench</>
8408        (Itagaki Takahiro)
8409       </para>
8410      </listitem>
8411
8412      <listitem>
8413       <para>
8414        Make <filename>contrib/pgbench</> use table names
8415        <structname>pgbench_accounts</>, <structname>pgbench_branches</>,
8416        <structname>pgbench_history</>, and <structname>pgbench_tellers</>,
8417        rather than just <structname>accounts</>, <structname>branches</>,
8418        <structname>history</>, and <structname>tellers</> (Tom)
8419       </para>
8420
8421       <para>
8422        This is to reduce the risk of accidentally destroying real data
8423        by running <application>pgbench</>.
8424       </para>
8425      </listitem>
8426
8427      <listitem>
8428       <para>
8429        Fix <filename>contrib/pgstattuple</> to handle tables and
8430        indexes with over 2 billion pages (Tatsuhito Kasahara)
8431       </para>
8432      </listitem>
8433
8434      <listitem>
8435       <para>
8436        In <filename>contrib/fuzzystrmatch</>, add a version of the
8437        Levenshtein string-distance function that allows the user to
8438        specify the costs of insertion, deletion, and substitution
8439        (Volkan Yazici)
8440       </para>
8441      </listitem>
8442
8443      <listitem>
8444       <para>
8445        Make <filename>contrib/ltree</> support multibyte encodings
8446        (laser)
8447       </para>
8448      </listitem>
8449
8450      <listitem>
8451       <para>
8452        Enable <filename>contrib/dblink</> to use connection information
8453        stored in the SQL/MED catalogs (Joe Conway)
8454       </para>
8455      </listitem>
8456
8457      <listitem>
8458       <para>
8459        Improve <filename>contrib/dblink</>'s reporting of errors from
8460        the remote server (Joe Conway)
8461       </para>
8462      </listitem>
8463
8464      <listitem>
8465       <para>
8466        Make <filename>contrib/dblink</> set <varname>client_encoding</>
8467        to match the local database's encoding (Joe Conway)
8468       </para>
8469
8470       <para>
8471        This prevents encoding problems when communicating with a remote
8472        database that uses a different encoding.
8473       </para>
8474      </listitem>
8475
8476      <listitem>
8477       <para>
8478        Make sure <filename>contrib/dblink</> uses a password supplied
8479        by the user, and not accidentally taken from the server's
8480        <filename>.pgpass</> file (Joe Conway)
8481       </para>
8482
8483       <para>
8484        This is a minor security enhancement.
8485       </para>
8486      </listitem>
8487
8488      <listitem>
8489       <para>
8490        Add <function>fsm_page_contents()</>
8491        to <filename>contrib/pageinspect</> (Heikki)
8492       </para>
8493      </listitem>
8494
8495      <listitem>
8496       <para>
8497        Modify <function>get_raw_page()</> to support free space map
8498        (<filename>*_fsm</>) files.  Also update
8499        <filename>contrib/pg_freespacemap</>.
8500       </para>
8501      </listitem>
8502
8503      <listitem>
8504       <para>
8505        Add support for multibyte encodings to <filename>contrib/pg_trgm</>
8506        (Teodor)
8507       </para>
8508      </listitem>
8509
8510      <listitem>
8511       <para>
8512        Rewrite <filename>contrib/intagg</> to use new
8513        functions <function>array_agg()</> and <function>unnest()</>
8514        (Tom)
8515       </para>
8516      </listitem>
8517
8518      <listitem>
8519       <para>
8520        Make <filename>contrib/pg_standby</> recover all available WAL before
8521        failover (Fujii Masao, Simon, Heikki)
8522       </para>
8523
8524       <para>
8525        To make this work safely, you now need to set the new
8526        <literal>recovery_end_command</> option in <filename>recovery.conf</>
8527        to clean up the trigger file after failover. <application>pg_standby</>
8528        will no longer remove the trigger file itself.
8529       </para>
8530      </listitem>
8531
8532      <listitem>
8533       <para>
8534        <filename>contrib/pg_standby</>'s <option>-l</> option is now a no-op,
8535        because it is unsafe to use a symlink (Simon)
8536       </para>
8537      </listitem>
8538
8539     </itemizedlist>
8540
8541    </sect3>
8542   </sect2>
8543  </sect1>