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